Skip to content

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

License

Notifications You must be signed in to change notification settings

icedman/nvim-textmate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


nvim-textmate

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

"Buy Me A Coffee"

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)

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published