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

@ -0,0 +1,3 @@
set tabstop=2
set softtabstop=2
set shiftwidth=2

View File

@ -36,9 +36,8 @@
"gcert.nvim": { "branch": "main", "commit": "7f1eee55a7469523550c049df8f991a0a1430a37" }, "gcert.nvim": { "branch": "main", "commit": "7f1eee55a7469523550c049df8f991a0a1430a37" },
"gdrama-syntax.vim": { "branch": "main", "commit": "004eda58d6e3ce3d1b46bbf257bd99784c475a0e" }, "gdrama-syntax.vim": { "branch": "main", "commit": "004eda58d6e3ce3d1b46bbf257bd99784c475a0e" },
"git-conflict.nvim": { "branch": "main", "commit": "4c8e252b87d54d944c1e56bfb477f78b6fdaf661" }, "git-conflict.nvim": { "branch": "main", "commit": "4c8e252b87d54d944c1e56bfb477f78b6fdaf661" },
"go.nvim": { "branch": "master", "commit": "d5e2b8cdd84afdb0c49c42a6e8972acc645e0283" },
"googlepaths.nvim": { "branch": "main", "commit": "54b972d91573879e19d87d3e7e85f558e0e83160" }, "googlepaths.nvim": { "branch": "main", "commit": "54b972d91573879e19d87d3e7e85f558e0e83160" },
"guihua.lua": { "branch": "master", "commit": "5204646be15997ed101631d75df02512ecd6c2bb" }, "gopher.nvim": { "branch": "main", "commit": "ac27f4b6794c872140fb205313d79ab166892fe9" },
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" }, "harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
"hg": { "branch": "main", "commit": "1c4bdf80174ec840ba76c4dc7032c4313db62199" }, "hg": { "branch": "main", "commit": "1c4bdf80174ec840ba76c4dc7032c4313db62199" },
"java-syntax.vim": { "branch": "master", "commit": "9a3d76a8c6cd7765ba93a7bdd9280594167e3f1b" }, "java-syntax.vim": { "branch": "master", "commit": "9a3d76a8c6cd7765ba93a7bdd9280594167e3f1b" },
@ -80,7 +79,7 @@
"nvim-lint": { "branch": "master", "commit": "861a04313501563bb1b11f125ae9b7237a517b9b" }, "nvim-lint": { "branch": "master", "commit": "861a04313501563bb1b11f125ae9b7237a517b9b" },
"nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" }, "nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" },
"nvim-luapad": { "branch": "master", "commit": "a5b3d6aa1fe5fe75e6124927392a9d3a60a0ecce" }, "nvim-luapad": { "branch": "master", "commit": "a5b3d6aa1fe5fe75e6124927392a9d3a60a0ecce" },
"nvim-nio": { "branch": "master", "commit": "d8743224616f8107347ddebc77cdbf1e488bdee2" }, "nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" },
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
"nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" }, "nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" },
"nvim-surround": { "branch": "main", "commit": "6d0dc3dbb557bcc6a024969da461df4ba803fc48" }, "nvim-surround": { "branch": "main", "commit": "6d0dc3dbb557bcc6a024969da461df4ba803fc48" },

View File

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

View File

@ -58,9 +58,22 @@ return {
}, },
{ {
"ray-x/go.nvim", "ray-x/go.nvim",
ft = "go", dependencies = { -- optional packages
-- cond = not use_google(), "ray-x/guihua.lua",
dependencies = { "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", "neovim/nvim-lspconfig",
@ -111,16 +124,6 @@ return {
vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]]) vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]])
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]]) 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 -- Run gofmt + goimports on save
local format_sync_grp = vim.api.nvim_create_augroup("goimports", {}) local format_sync_grp = vim.api.nvim_create_augroup("goimports", {})
vim.api.nvim_create_autocmd("BufWritePre", { vim.api.nvim_create_autocmd("BufWritePre", {
@ -130,7 +133,6 @@ return {
end, end,
group = format_sync_grp, group = format_sync_grp,
}) })
-- end
end, end,
}, },
} }

View File

@ -1,4 +1,5 @@
# alias go=colorgo # alias go=colorgo
alias cd=pushd
alias vim='nvim' alias vim='nvim'
alias vimdiff='nvim -d' alias vimdiff='nvim -d'
# alias cat='bat' # alias cat='bat'