nvim: add gopls lsp, set some options
Prithu Goswami pg@prithu.dev
Sun, 25 Sep 2022 23:58:53 +0530
4 files changed,
10 insertions(+),
1 deletions(-)
M
config/nvim/init.lua
→
config/nvim/init.lua
@@ -117,7 +117,7 @@ null_ls.builtins.formatting.black.with({extra_args={"--fast"}}),
null_ls.builtins.formatting.isort, null_ls.builtins.diagnostics.flake8.with({ condition = function(utils) - return utils.root_has_file({"pyproject.toml", ".flake8"}) + return utils.root_has_file({".flake8"}) end, }), null_ls.builtins.diagnostics.mypy.with({
M
config/nvim/lua/lsp/init.lua
→
config/nvim/lua/lsp/init.lua
@@ -91,3 +91,8 @@ }
} } } + +lspconfig.gopls.setup{ + capabilities = capabilities, + on_attach = on_attach +}
M
config/nvim/lua/options.lua
→
config/nvim/lua/options.lua
@@ -6,6 +6,7 @@ vim.opt.smartindent = true
vim.opt.autoindent = true vim.opt.undofile = true --o.colorcolumn = '80' +vim.opt.scrolloff = 8 vim.opt.mouse = 'a' vim.opt.wildmenu = true vim.opt.showmatch = true@@ -15,6 +16,8 @@ vim.opt.foldmethod = 'indent'
vim.opt.foldlevelstart = 10 vim.opt.foldnestmax = 10 vim.opt.number = true +vim.opt.signcolumn = "yes" +vim.opt.numberwidth = 4 vim.opt.backspace = 'indent,eol,start' vim.opt.termguicolors = true
M
home/.profile
→
home/.profile
@@ -11,6 +11,7 @@ export OPENER=xdg-open
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.local/bin:$PATH" +export PATH="$HOME/go/bin:$PATH" source $HOME/.config/secrets export PATH="$HOME/.poetry/bin:$PATH"