changed treesitter
This commit is contained in:
parent
f309e61af6
commit
9523a0d8d6
1 changed files with 62 additions and 54 deletions
|
@ -1,57 +1,65 @@
|
|||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
build = ':TSUpdate',
|
||||
dependencies = {
|
||||
'windwp/nvim-ts-autotag',
|
||||
},
|
||||
config = function()
|
||||
-- import nvim-treesitter plugin
|
||||
local treesitter = require 'nvim-treesitter.configs'
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
build = ":TSUpdate",
|
||||
dependencies = {
|
||||
"windwp/nvim-ts-autotag",
|
||||
},
|
||||
config = function()
|
||||
-- import nvim-treesitter plugin
|
||||
local treesitter = require("nvim-treesitter.configs")
|
||||
|
||||
-- configure treesitter
|
||||
treesitter.setup { -- enable syntax highlighting
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
-- enable indentation
|
||||
indent = { enable = true },
|
||||
-- enable autotagging (w/ nvim-ts-autotag plugin)
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
-- ensure these language parsers are installed
|
||||
ensure_installed = {
|
||||
'json',
|
||||
'javascript',
|
||||
'typescript',
|
||||
'tsx',
|
||||
'yaml',
|
||||
'html',
|
||||
'css',
|
||||
'prisma',
|
||||
'markdown',
|
||||
'markdown_inline',
|
||||
'svelte',
|
||||
'graphql',
|
||||
'bash',
|
||||
'lua',
|
||||
'vim',
|
||||
'dockerfile',
|
||||
'gitignore',
|
||||
'query',
|
||||
'vimdoc',
|
||||
'c',
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = '<C-space>',
|
||||
node_incremental = '<C-space>',
|
||||
scope_incremental = false,
|
||||
node_decremental = '<bs>',
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
-- configure treesitter
|
||||
treesitter.setup({ -- enable syntax highlighting
|
||||
highlight = {
|
||||
enable = true,
|
||||
},
|
||||
-- enable indentation
|
||||
indent = { enable = true },
|
||||
-- enable autotagging (w/ nvim-ts-autotag plugin)
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
-- ensure these language parsers are installed
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"fish",
|
||||
"http",
|
||||
"html",
|
||||
"php",
|
||||
"css",
|
||||
"scss",
|
||||
"gitignore",
|
||||
"git_config",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"dockerfile",
|
||||
"yaml",
|
||||
"json",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"graphql",
|
||||
"lua",
|
||||
"query",
|
||||
"c",
|
||||
"prisma",
|
||||
"svelte",
|
||||
"hyprlang",
|
||||
"ini",
|
||||
"passwd",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<C-space>",
|
||||
node_incremental = "<C-space>",
|
||||
scope_incremental = false,
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue