uh
This commit is contained in:
3
config/.config/nvim/after/ftplugin/go.vim
Normal file
3
config/.config/nvim/after/ftplugin/go.vim
Normal file
@ -0,0 +1,3 @@
|
||||
set tabstop=2
|
||||
set softtabstop=2
|
||||
set shiftwidth=2
|
@ -36,9 +36,8 @@
|
||||
"gcert.nvim": { "branch": "main", "commit": "7f1eee55a7469523550c049df8f991a0a1430a37" },
|
||||
"gdrama-syntax.vim": { "branch": "main", "commit": "004eda58d6e3ce3d1b46bbf257bd99784c475a0e" },
|
||||
"git-conflict.nvim": { "branch": "main", "commit": "4c8e252b87d54d944c1e56bfb477f78b6fdaf661" },
|
||||
"go.nvim": { "branch": "master", "commit": "d5e2b8cdd84afdb0c49c42a6e8972acc645e0283" },
|
||||
"googlepaths.nvim": { "branch": "main", "commit": "54b972d91573879e19d87d3e7e85f558e0e83160" },
|
||||
"guihua.lua": { "branch": "master", "commit": "5204646be15997ed101631d75df02512ecd6c2bb" },
|
||||
"gopher.nvim": { "branch": "main", "commit": "ac27f4b6794c872140fb205313d79ab166892fe9" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
|
||||
"hg": { "branch": "main", "commit": "1c4bdf80174ec840ba76c4dc7032c4313db62199" },
|
||||
"java-syntax.vim": { "branch": "master", "commit": "9a3d76a8c6cd7765ba93a7bdd9280594167e3f1b" },
|
||||
@ -80,7 +79,7 @@
|
||||
"nvim-lint": { "branch": "master", "commit": "861a04313501563bb1b11f125ae9b7237a517b9b" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" },
|
||||
"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-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" },
|
||||
"nvim-surround": { "branch": "main", "commit": "6d0dc3dbb557bcc6a024969da461df4ba803fc48" },
|
||||
|
@ -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
|
||||
|
||||
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
# alias go=colorgo
|
||||
alias cd=pushd
|
||||
alias vim='nvim'
|
||||
alias vimdiff='nvim -d'
|
||||
# alias cat='bat'
|
||||
|
Reference in New Issue
Block a user