Skip to content

Commit

Permalink
fix astro highlight based on virchau13/tree-sitter-astro#16
Browse files Browse the repository at this point in the history
  • Loading branch information
harleylara committed Jul 17, 2023
1 parent 9adbd6e commit 3fc18db
Showing 1 changed file with 38 additions and 35 deletions.
73 changes: 38 additions & 35 deletions nvim/.config/nvim/lua/plugins/treesitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,43 @@ return {
dependencies = {
'nvim-treesitter/nvim-treesitter-context',
},
opts = {
highlight = {
-- `false` will disable the whole extension
enable = true,
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
-- the name of the parser)
-- list of language that will be disabled
disable = {"html"},
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
disable = {"python"},
},
ensure_installed = {
'tsx',
'lua',
'json',
'css',
'html',
'python',
'javascript',
'typescript',
'astro',
'markdown',
'markdown_inline'
},
autotag = {
enable = true,
config = function()
local opts = {
highlight = {
-- `false` will disable the whole extension
enable = true,
-- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
-- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
-- the name of the parser)
-- list of language that will be disabled
-- disable = {"html"},
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
indent = {
enable = true,
disable = {"python"},
},
ensure_installed = {
'tsx',
'lua',
'json',
'css',
'html',
'python',
'javascript',
'typescript',
'astro',
'markdown',
'markdown_inline'
},
autotag = {
enable = true,
}
}
}
require('nvim-treesitter.configs').setup(opts)
end
}

0 comments on commit 3fc18db

Please sign in to comment.