Tree-sitter Grammar for Janet added to nvim-treesitter #1118
Replies: 3 comments 3 replies
-
Beta Was this translation helpful? Give feedback.
-
I've been test driving it for a bit now (with the vimscript plugin disabled) and the main thing that quite bothers me is the lack of some important features. |
Beta Was this translation helpful? Give feedback.
-
For future reference, I'm posting some relatively minimal configurations ( Just using nvim-treesitter (as noted above, this only provides highlighting): " Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'nvim-treesitter/nvim-treesitter'
call plug#end()
" adapted:
" https://github.com/janet-lang/janet.vim/blob/master/ftdetect/janet.vim
au BufRead,BufNewFile *.janet,*.jdn setlocal filetype=janet
lua <<EOF
require('nvim-treesitter.configs').setup {
ensure_installed = "all",
highlight = {
enable = true,
disable = { "css" },
},
}
EOF With janet.vim and nvim-treesitter (has various essentials including indentation): " Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'bakpakin/janet.vim'
Plug 'nvim-treesitter/nvim-treesitter'
call plug#end()
lua <<EOF
require('nvim-treesitter.configs').setup {
ensure_installed = "all",
highlight = {
enable = true,
disable = { "css" },
},
}
EOF |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The master branch of nvim-treesitter now has support for Janet.
It's possible that users of Conjure might notice some differences if this functionality is used.
Once the grammar is installed for nvim-treesitter, Conjure should automatically make use of it for form recognition / navigation [1]. If there were cases where forms were not-quite-recognized when not using tree-sitter, possibly this tree-sitter-based arrangement might make some difference [2].
Here's what it can look like (with TSPlayground open on the left):
I've found using TSPlayground can be handy when trying to learn / decode programming languages I'm not so familiar with.
[1] I'm not a heavy user of Conjure or Neovim and haven't figured out differences in behavior (^^;
[2] If something works worse than before, please mention it -- though possibly Conjure's discord might be a better place for that.
Beta Was this translation helpful? Give feedback.
All reactions