avante
This commit is contained in:
@ -12,49 +12,49 @@ end
|
||||
|
||||
|
||||
return {
|
||||
{
|
||||
"kosayoda/nvim-lightbulb",
|
||||
commit = "1cae7b7153ae98dcf1b11173a443ac1b6d8e3d49",
|
||||
event = { "LspAttach" },
|
||||
opts = {
|
||||
autocmd = { enabled = true },
|
||||
virtual_text = {
|
||||
enabled = true,
|
||||
text = " ",
|
||||
hl = "DiagnosticWarn",
|
||||
},
|
||||
sign = { enabled = false },
|
||||
},
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = "make install_jsregexp",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end,
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
},
|
||||
{
|
||||
"ray-x/go.nvim",
|
||||
dependencies = { -- optional packages
|
||||
"ray-x/guihua.lua",
|
||||
"neovim/nvim-lspconfig",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
-- cond = not use_google(),
|
||||
config = function()
|
||||
local capabilities = flags.blink
|
||||
and require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
or require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
capabilities.offsetEncoding = { "utf-16" }
|
||||
require("go").setup({
|
||||
lsp_cfg = { capabilities = capabilities },
|
||||
lsp_keymaps = false,
|
||||
lsp_inlay_hints = {
|
||||
enable = not use_google(), -- doesn't work with ciderlsp
|
||||
},
|
||||
})
|
||||
-- Run gofmt + goimports on save
|
||||
{
|
||||
"kosayoda/nvim-lightbulb",
|
||||
commit = "1cae7b7153ae98dcf1b11173a443ac1b6d8e3d49",
|
||||
event = { "LspAttach" },
|
||||
opts = {
|
||||
autocmd = { enabled = true },
|
||||
virtual_text = {
|
||||
enabled = true,
|
||||
text = " ",
|
||||
hl = "DiagnosticWarn",
|
||||
},
|
||||
sign = { enabled = false },
|
||||
},
|
||||
},
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = "make install_jsregexp",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end,
|
||||
dependencies = { "rafamadriz/friendly-snippets" },
|
||||
},
|
||||
{
|
||||
"ray-x/go.nvim",
|
||||
dependencies = { -- optional packages
|
||||
"ray-x/guihua.lua",
|
||||
"neovim/nvim-lspconfig",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
},
|
||||
-- cond = not use_google(),
|
||||
config = function()
|
||||
local capabilities = flags.blink
|
||||
and require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
or require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
capabilities.offsetEncoding = { "utf-16" }
|
||||
require("go").setup({
|
||||
lsp_cfg = { capabilities = capabilities },
|
||||
lsp_keymaps = false,
|
||||
lsp_inlay_hints = {
|
||||
enable = not use_google(), -- doesn't work with ciderlsp
|
||||
},
|
||||
})
|
||||
-- Run gofmt + goimports on save
|
||||
|
||||
local format_sync_grp = vim.api.nvim_create_augroup("goimports", {})
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
@ -97,41 +97,44 @@ return {
|
||||
local lspconfig = require("lspconfig")
|
||||
local lsp_configs = require("lspconfig.configs")
|
||||
|
||||
lsp_configs.ciderlsp = {
|
||||
default_config = {
|
||||
cmd = {
|
||||
"/google/bin/releases/cider/ciderlsp/ciderlsp",
|
||||
"--tooltag=nvim-lsp",
|
||||
"--noforward_sync_responses",
|
||||
},
|
||||
filetypes = {
|
||||
"c",
|
||||
"cpp",
|
||||
"java",
|
||||
"kotlin",
|
||||
"objc",
|
||||
"proto",
|
||||
"textproto",
|
||||
"go",
|
||||
"python",
|
||||
"bzl",
|
||||
"typescript",
|
||||
},
|
||||
offset_encoding = "utf-8",
|
||||
root_dir = lspconfig.util.root_pattern(".citc"),
|
||||
settings = {},
|
||||
},
|
||||
}
|
||||
lsp_configs.ciderlsp = {
|
||||
default_config = {
|
||||
cmd = {
|
||||
"/google/bin/releases/cider/ciderlsp/ciderlsp",
|
||||
"--tooltag=nvim-lsp",
|
||||
"--noforward_sync_responses",
|
||||
},
|
||||
filetypes = {
|
||||
"c",
|
||||
"cpp",
|
||||
"java",
|
||||
"kotlin",
|
||||
"objc",
|
||||
"proto",
|
||||
"textproto",
|
||||
"go",
|
||||
"python",
|
||||
"bzl",
|
||||
"typescript",
|
||||
},
|
||||
offset_encoding = "utf-8",
|
||||
root_dir = lspconfig.util.root_pattern(".citc"),
|
||||
settings = {},
|
||||
},
|
||||
}
|
||||
|
||||
if use_google() then
|
||||
lspconfig.ciderlsp.setup({})
|
||||
end
|
||||
if use_google() then
|
||||
lspconfig.ciderlsp.setup({})
|
||||
end
|
||||
|
||||
require("lspconfig").gdscript.setup({})
|
||||
vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]])
|
||||
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]])
|
||||
lspconfig.gdscript.setup({})
|
||||
-- require('lspconfig').gdscript.setup { cmd = { "ncat", "localhost", "6005" }, root_dir = function()
|
||||
-- return vim.fs.dirname(vim.fs.find('project.godot', { upward = true })[1])
|
||||
-- end
|
||||
-- }
|
||||
|
||||
require("lspconfig").gdshader_lsp.setup({})
|
||||
end,
|
||||
},
|
||||
vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]])
|
||||
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4 wrap]])
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user