This commit is contained in:
Christian Nieves
2024-05-08 15:49:55 +00:00
parent 822daa2ff0
commit 8a4fdc0e0b
5 changed files with 53 additions and 48 deletions

View File

@ -31,34 +31,34 @@ function M.setup(capabilities)
},
}
configs.analysislsp = {
default_config = {
cmd = {
"/google/bin/users/lerm/glint-ale/analysis_lsp/server",
"--lint_on_save=false",
"--max_qps=10",
},
filetypes = {
"c",
"cpp",
"java",
"kotlin",
"objc",
"proto",
"textproto",
"go",
"python",
"bzl",
-- "markdown",
"typescript",
"javascript",
},
root_dir = function(fname)
return string.match(fname, "(/google/src/cloud/[%w_-]+/[%w_-]+/google3/).+$")
end,
settings = {},
},
}
-- configs.analysislsp = {
-- default_config = {
-- cmd = {
-- "/google/bin/users/lerm/glint-ale/analysis_lsp/server",
-- "--lint_on_save=false",
-- "--max_qps=10",
-- },
-- filetypes = {
-- "c",
-- "cpp",
-- "java",
-- "kotlin",
-- "objc",
-- "proto",
-- "textproto",
-- "go",
-- "python",
-- "bzl",
-- -- "markdown",
-- "typescript",
-- "javascript",
-- },
-- root_dir = function(fname)
-- return string.match(fname, "(/google/src/cloud/[%w_-]+/[%w_-]+/google3/).+$")
-- end,
-- settings = {},
-- },
-- }
local my_on_attach = function(client, bufnr)
require("lualine").refresh()
@ -99,9 +99,9 @@ function M.setup(capabilities)
on_attach = cider_on_attach,
handlers = cider_lsp_handlers,
})
lspconfig.analysislsp.setup({
capabilities = capabilities,
})
-- lspconfig.analysislsp.setup({
-- capabilities = capabilities,
-- })
end
end

View File

@ -58,9 +58,22 @@ return {
},
{
"ray-x/go.nvim",
ft = "go",
-- cond = not use_google(),
dependencies = { "ray-x/guihua.lua" },
dependencies = { -- optional packages
"ray-x/guihua.lua",
"neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter",
},
config = function()
local capabilities =
require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
capabilities.offsetEncoding = { "utf-16" }
require("go").setup({
capabilities = capabilities,
})
end,
event = { "VeryLazy" },
ft = { "go", "gomod" },
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
},
{
"neovim/nvim-lspconfig",
@ -111,16 +124,6 @@ return {
vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]])
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]])
-- Golang
-- if not use_google then
require("go").setup({
capabilities = capabilities,
-- root_dir = function(fname)
-- return string.match(fname, "(/google/src/cloud/[%w_-]+/[%w_-]+/google3/).+$")
-- end,
-- lsp_cfg = {},
})
-- Run gofmt + goimports on save
local format_sync_grp = vim.api.nvim_create_augroup("goimports", {})
vim.api.nvim_create_autocmd("BufWritePre", {
@ -130,7 +133,6 @@ return {
end,
group = format_sync_grp,
})
-- end
end,
},
}