GithubHelp home page GithubHelp logo

bobf / nvim-textmate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from icedman/nvim-textmate

0.0 1.0 0.0 5.59 MB

A textmate-based syntax highlighter for neovim - compatible with VScode

License: GNU General Public License v2.0

Shell 0.06% JavaScript 33.20% Ruby 0.43% C++ 7.91% Python 0.99% Perl 0.01% C 57.24% PHP 0.01% Objective-C 0.01% Java 0.01% Lua 0.08% Groovy 0.02% Clojure 0.01% R 0.01% Go 0.01% CoffeeScript 0.01% C# 0.01% F# 0.01% Rust 0.01% PowerShell 0.01%

nvim-textmate's Introduction

nvim-textmate

A textmate-based syntax highlighter to nvim, compatible with VScode themes and grammars

Screen Shot

install

git clone http://github.com/icedman/nvim-textmate
cd nvim-textmate
make

packer.nvim

use "icedman/nvim-textmate"

setup

-- init.lua
require('nvim-textmate')


or with setup options
require('nvim-textmate').setup({
    quick_load = true,
    theme_name = 'Dracula',
    override_colorscheme = false
})

setup options

  • quick_load - defers loading of grammar and theme at the opening of a buffer
  • theme_name - select a textmate format or vscode compatible theme
  • override_colorscheme - apply colorscheme from textmate theme
  • custom_scope_map - add more scope to namespace mapping (see colormap.lua)
  • extension_paths - set vscode extension search path
  • debug_scopes - print scope name under cursor

extensions

Copy vscode theme and grammar extensions to any of these directories:

~/.config/nvim/lua/nvim-textmate/
~/.editor/extensions/
~/.vscode/extensions/

commands

  • TxMtEnable
  • TxMtDisable
  • TxMtToggle
  • TxMtTheme
  • TxMtDebugScopes

known issues

  • a colorscheme must be loaded prior to running nvim-textmate
  • cpp - Some grammars take a bit of time to load. cpp, the largest grammar file causes a visible lag on first load; hence the quick_load option is available.
  • markdown - Other grammars - like markdown will load other grammar languages for inline code and will re-render after the other languages are loaded.
  • scrolling and text editing - syntax highlighting is currently done at these events as a debounced (defer_fn) function.

warning

  • This plugin is just a proof of concept - from a novice lua coder, and much worse - from a non neovim user (not yet at least)

nvim-textmate's People

Contributors

icedman avatar bobf avatar ilkecan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.