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 {
|
return {
|
||||||
'nvim-treesitter/nvim-treesitter',
|
"nvim-treesitter/nvim-treesitter",
|
||||||
event = { 'BufReadPre', 'BufNewFile' },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
build = ':TSUpdate',
|
build = ":TSUpdate",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'windwp/nvim-ts-autotag',
|
"windwp/nvim-ts-autotag",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- import nvim-treesitter plugin
|
-- import nvim-treesitter plugin
|
||||||
local treesitter = require 'nvim-treesitter.configs'
|
local treesitter = require("nvim-treesitter.configs")
|
||||||
|
|
||||||
-- configure treesitter
|
-- configure treesitter
|
||||||
treesitter.setup { -- enable syntax highlighting
|
treesitter.setup({ -- enable syntax highlighting
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
-- enable indentation
|
-- enable indentation
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
-- enable autotagging (w/ nvim-ts-autotag plugin)
|
-- enable autotagging (w/ nvim-ts-autotag plugin)
|
||||||
autotag = {
|
autotag = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
-- ensure these language parsers are installed
|
-- ensure these language parsers are installed
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
'json',
|
"bash",
|
||||||
'javascript',
|
"fish",
|
||||||
'typescript',
|
"http",
|
||||||
'tsx',
|
"html",
|
||||||
'yaml',
|
"php",
|
||||||
'html',
|
"css",
|
||||||
'css',
|
"scss",
|
||||||
'prisma',
|
"gitignore",
|
||||||
'markdown',
|
"git_config",
|
||||||
'markdown_inline',
|
"markdown",
|
||||||
'svelte',
|
"markdown_inline",
|
||||||
'graphql',
|
"dockerfile",
|
||||||
'bash',
|
"yaml",
|
||||||
'lua',
|
"json",
|
||||||
'vim',
|
"javascript",
|
||||||
'dockerfile',
|
"typescript",
|
||||||
'gitignore',
|
"tsx",
|
||||||
'query',
|
"graphql",
|
||||||
'vimdoc',
|
"lua",
|
||||||
'c',
|
"query",
|
||||||
},
|
"c",
|
||||||
incremental_selection = {
|
"prisma",
|
||||||
enable = true,
|
"svelte",
|
||||||
keymaps = {
|
"hyprlang",
|
||||||
init_selection = '<C-space>',
|
"ini",
|
||||||
node_incremental = '<C-space>',
|
"passwd",
|
||||||
scope_incremental = false,
|
"vim",
|
||||||
node_decremental = '<bs>',
|
"vimdoc",
|
||||||
},
|
},
|
||||||
},
|
incremental_selection = {
|
||||||
}
|
enable = true,
|
||||||
end,
|
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