hi, thank you for the effort on this project, I am really looking forward to get this working on my favorite editor,
but for some reason it is not and I am asking for help here, here is the configuration I am using on Lazy:
lua/pluggins/treesitter.lua
return {
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
config = function ()
require('nvim-treesitter.parsers').get_parser_configs().crystal = {
install_info = {
url = 'https://github.com/crystal-lang-tools/tree-sitter-crystal',
branch = 'main',
files = {"src/parser.c", "src/scanner.c"},
generate = false,
generate_from_json = false,
queries = 'queries/nvim'
},
filetype = 'cr'
}
vim.treesitter.language.register('crystal', { 'cr' })
require('nvim-treesitter.configs').setup({
ensure_installed = {
'javascript', 'typescript', 'groovy', 'java', 'c',
'lua', 'vim', 'vimdoc', 'query',
'crystal'
},
sync_install = false,
auto_install = true,
indent = {
enabled = true
},
highlight = {
enable = true,
additional_vim_regex_highlighting = { 'markdown' }
}
})
end
}
here is the status on :checkhealth nvim-treesitter
==============================================================================
nvim-treesitter: ✅
Installation ~
- ✅ OK `tree-sitter` found 0.26.6 (parser generator, only needed for :TSInstallFromGrammar)
- ✅ OK `node` found (only needed for :TSInstallFromGrammar)
- ✅ OK `git` executable found.
- ✅ OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
Version: Apple clang version 15.0.0 (clang-1500.3.9.4)
- ✅ OK Neovim was compiled with tree-sitter runtime ABI version 15 (required >=13). Parsers must be compatible with runtime ABI.
OS Info:
{
machine = "arm64",
release = "23.6.0",
sysname = "Darwin",
version = "Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6030"
} ~
Parser/Features H L F I J
- asm ✓ . . . ✓
- bash ✓ ✓ ✓ . ✓
- c ✓ ✓ ✓ ✓ ✓
- cmake ✓ . ✓ ✓ ✓
- cpp ✓ ✓ ✓ ✓ ✓
- crystal . . . . .
- css ✓ . ✓ ✓ ✓
- csv ✓ . . . .
- diff ✓ . ✓ . ✓
- dockerfile ✓ . . . ✓
- groovy ✓ ✓ ✓ ✓ ✓
- html ✓ ✓ ✓ ✓ ✓
- ini ✓ . ✓ . ✓
- java ✓ ✓ ✓ ✓ ✓
- javascript ✓ ✓ ✓ ✓ ✓
- json ✓ ✓ ✓ ✓ .
- lua ✓ ✓ ✓ ✓ ✓
- make ✓ . ✓ . ✓
- markdown ✓ . ✓ ✓ ✓
- markdown_inline ✓ . . . ✓
- nginx ✓ . ✓ . ✓
- pem ✓ . ✓ . ✓
- properties ✓ ✓ . . ✓
- python ✓ ✓ ✓ ✓ ✓
- query ✓ ✓ ✓ ✓ ✓
- ruby ✓ ✓ ✓ ✓ ✓
- scss ✓ . ✓ ✓ ✓
- ssh_config ✓ ✓ ✓ ✓ ✓
- toml ✓ ✓ ✓ ✓ ✓
- typescript ✓ ✓ ✓ ✓ ✓
- v ✓ ✓ ✓ ✓ ✓
- vim ✓ ✓ ✓ . ✓
- vimdoc ✓ . . . ✓
- vue ✓ . ✓ ✓ ✓
- xml ✓ ✓ ✓ ✓ ✓
- yaml ✓ ✓ ✓ ✓ ✓
Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang} ~
before that I was using filetype fix to have some highlights, like:
lua/remap.lua
vim.filetype.add({extension = {cr = 'ruby'}})
but now everything is colorless :/ anyway, if someone needs more context to help me out here, just ask, thanks !!!
hi, thank you for the effort on this project, I am really looking forward to get this working on my favorite editor,
but for some reason it is not and I am asking for help here, here is the configuration I am using on Lazy:
here is the status on
:checkhealth nvim-treesitterbefore that I was using filetype fix to have some highlights, like:
but now everything is colorless :/ anyway, if someone needs more context to help me out here, just ask, thanks !!!