nvim: treesitter + lsp

This commit is contained in:
Daniel Lundin 2022-12-28 14:36:01 +01:00
parent 71fb14c028
commit ec15b966ab
2 changed files with 51 additions and 1 deletions

View file

@ -50,6 +50,7 @@ function M.config()
-- layout_defaults = {flip_columns = 160},
layout_config = {
preview_cutoff = 10,
prompt_position = "top",
},
mappings = {
i = {

View file

@ -11,7 +11,48 @@ return {
},
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = "all",
ensure_installed = {
"bash",
"c",
"cmake",
"cpp",
"css",
"diff",
"gitignore",
"go",
"graphql",
"help",
"html",
"http",
"java",
"javascript",
"jsdoc",
"json",
"jsonc",
"latex",
"lua",
"markdown",
"markdown_inline",
"meson",
"ninja",
"php",
"python",
"query",
"regex",
"rust",
"scss",
"sql",
"svelte",
"teal",
"toml",
"tsx",
"typescript",
"vhs",
"vim",
"vue",
"wgsl",
"yaml",
},
highlight = {
enable = true,
use_languagetree = true,
@ -21,6 +62,8 @@ return {
enable = false,
},
context_commentstring = { enable = true, enable_autocmd = false },
playground = {
enable = true,
disable = {},
@ -38,6 +81,12 @@ return {
},
},
query_linter = {
enable = true,
use_virtual_text = true,
lint_events = { "BufWrite", "CursorHold" },
},
textobjects = {
move = {
enable = true,