[feat] Add ast_grep and don't override LspInlayHint

This commit is contained in:
Uttarayan Mondal
2024-01-23 13:23:39 +05:30
parent ee7787b396
commit 82b60b024b
2 changed files with 8 additions and 1 deletions

View File

@@ -42,4 +42,3 @@ vim.cmd('hi EndOfBuffer guibg=' .. colors.black)
-- vim.cmd('hi ToggleTerm1Buffer guibg='..colors.black)
vim.cmd('hi NonText guibg=' .. colors.black)
vim.cmd('hi link LspInlayHint Comment')
vim.cmd('hi LspInlayHint guibg=nil')

View File

@@ -27,4 +27,12 @@ require("mason-lspconfig").setup_handlers {
single_file_support = true,
}
end,
["ast_grep"] = function()
lspconfig.ast_grep.setup {
cmd = { "sg", "lsp" },
filetypes = { "c", "cpp", "rust", "typescript" },
root_dir = lspconfig.util.root_pattern("compile_commands.json", "compile_flags.txt", ".git"),
single_file_support = true,
}
end
}