Compare commits
3 Commits
0aef98bb0a
...
8a4fdc0e0b
Author | SHA1 | Date | |
---|---|---|---|
8a4fdc0e0b | |||
822daa2ff0 | |||
28070c2640 |
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" },
|
||||
@ -48,6 +47,7 @@
|
||||
"leap.nvim": { "branch": "main", "commit": "626be4c4ec040aeaf6466c9aae17ee0ab09f1a5b" },
|
||||
"libp.nvim": { "branch": "main", "commit": "636b1748e92f66022c1763f32b2ded6b8606eda5" },
|
||||
"lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" },
|
||||
"lsp-timeout.nvim": { "branch": "main", "commit": "6325906730330105a9adc41d0ceb8499b3072e2b" },
|
||||
"lsp-virtual-improved.nvim": { "branch": "master", "commit": "db9cd544b7febdf4c48374e351b3903143b4477d" },
|
||||
"lsp-zero.nvim": { "branch": "v3.x", "commit": "e00dcf8a6019a88139626c1668dccdc295abd324" },
|
||||
"lsp_lines.nvim": { "branch": "main", "commit": "dbfd8e96ec2696e1ceedcd23fd70e842256e3dea" },
|
||||
@ -79,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" },
|
||||
|
@ -13,7 +13,6 @@ function M.setup(capabilities)
|
||||
"--forward_sync_responses",
|
||||
-- "--debug_relay",
|
||||
},
|
||||
offset_encoding = "utf-8",
|
||||
filetypes = {
|
||||
"c",
|
||||
"cpp",
|
||||
@ -32,35 +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",
|
||||
},
|
||||
offset_encoding = "utf-8",
|
||||
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()
|
||||
@ -97,13 +95,13 @@ function M.setup(capabilities)
|
||||
end
|
||||
|
||||
lspconfig.ciderlsp.setup({
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
||||
gapabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
|
||||
on_attach = cider_on_attach,
|
||||
handlers = cider_lsp_handlers,
|
||||
})
|
||||
lspconfig.analysislsp.setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
-- lspconfig.analysislsp.setup({
|
||||
-- capabilities = capabilities,
|
||||
-- })
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -12,8 +12,6 @@ return {
|
||||
{ "nvim-lua/plenary.nvim", lazy = false },
|
||||
{ "squk/java-syntax.vim", ft = "java" },
|
||||
{ "udalov/kotlin-vim", event = "VeryLazy", ft = "kotlin" },
|
||||
{ "ray-x/go.nvim", ft = "go" },
|
||||
{ "ray-x/guihua.lua", ft = "go" },
|
||||
{ "andymass/vim-matchup", event = "VimEnter" },
|
||||
{ "jghauser/mkdir.nvim", event = "BufWritePre" },
|
||||
-- Session management
|
||||
|
@ -44,7 +44,7 @@ return {
|
||||
"hinell/lsp-timeout.nvim",
|
||||
event = { "LspAttach" },
|
||||
dependencies = { "neovim/nvim-lspconfig" },
|
||||
cond = not use_google(),
|
||||
-- cond = not use_google(),
|
||||
config = function()
|
||||
vim.g.lspTimeoutConfig = {
|
||||
filetypes = {
|
||||
@ -56,14 +56,31 @@ return {
|
||||
}
|
||||
end,
|
||||
},
|
||||
{
|
||||
"ray-x/go.nvim",
|
||||
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",
|
||||
dependencies = {
|
||||
"hrsh7th/nvim-cmp",
|
||||
"nvim-lua/lsp-status.nvim",
|
||||
"VonHeikemen/lsp-zero.nvim",
|
||||
"ray-x/go.nvim",
|
||||
"ray-x/guihua.lua",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>" },
|
||||
@ -92,6 +109,7 @@ return {
|
||||
local capabilities =
|
||||
require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
capabilities = vim.tbl_extend("keep", capabilities or {}, lsp_status.capabilities)
|
||||
capabilities.offsetEncoding = { "utf-16" }
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
local configs = require("lspconfig.configs")
|
||||
@ -106,19 +124,12 @@ 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({
|
||||
lsp_cfg = {
|
||||
capabilities = capabilities,
|
||||
},
|
||||
})
|
||||
end
|
||||
local format_sync_grp = vim.api.nvim_create_augroup("GoFormat", {})
|
||||
-- Run gofmt + goimports on save
|
||||
local format_sync_grp = vim.api.nvim_create_augroup("goimports", {})
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
pattern = "*.go",
|
||||
callback = function()
|
||||
require("go.format").goimport()
|
||||
require("go.format").goimports()
|
||||
end,
|
||||
group = format_sync_grp,
|
||||
})
|
||||
|
@ -2,6 +2,15 @@ return {
|
||||
{
|
||||
"vxpm/ferris.nvim",
|
||||
ft = "rust",
|
||||
config = function()
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.offsetEncoding = { "utf-16" }
|
||||
require("lspconfig").rust_analyzer.setup({
|
||||
-- offset_encoding = "utf-8",
|
||||
-- capabilities,
|
||||
settings = { ["rust-analyzer"] = {} },
|
||||
})
|
||||
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