Browse Source

feat: update go lsp

master
Tovi Jaeschke-Rogers 7 months ago
parent
commit
5aae64e50e
2 changed files with 18 additions and 14 deletions
  1. +16
    -11
      .config/nvim/lua/tovi/plugins/lsp/lspconfig.lua
  2. +2
    -3
      .zshrc

+ 16
- 11
.config/nvim/lua/tovi/plugins/lsp/lspconfig.lua View File

@ -204,17 +204,22 @@ return {
}
})
-- configure python server
lspconfig["pyright"].setup({
capabilities = capabilities,
on_attach = on_attach,
})
-- configure python server
lspconfig["gopls"].setup({
capabilities = capabilities,
on_attach = on_attach,
})
lspconfig.gopls.setup {
on_attach = on_attach,
capabilities = capabilities,
cmd = {"gopls"},
filetypes = { "go", "gomod", "gowork", "gotmpl" },
root_dir = util.root_pattern("go.work", "go.mod", ".git"),
settings = {
gopls = {
completeUnimported = true,
usePlaceholders = true,
analyses = {
unusedparams = true,
},
},
},
}
-- configure lua server (with special settings)
lspconfig["lua_ls"].setup({


+ 2
- 3
.zshrc View File

@ -68,7 +68,6 @@ HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
HISTSIZE=99999999
SAVEHIST=$HISTSIZE
export PATH="~/.local/bin/:$PATH"
if [[ $(uname) == 'Darwin' ]]; then
fi
@ -92,8 +91,6 @@ export FNM_NODE_DIST_MIRROR="https://nodejs.org/dist"
export FNM_ARCH="x64"
rehash
# export PHPCS_STANDARD=~/.config/phpcs.xml
if [[ $(uname) == 'Darwin' ]]; then
export HOMEBREW_NO_AUTO_UPDATE=1
@ -103,6 +100,8 @@ if [[ $(uname) == 'Darwin' ]]; then
eval "$(rbenv init - zsh)"
fi
export PATH="${HOME}/.local/bin/:${HOME}/go/bin:${PATH}"
source <(fzf --zsh)
export NVM_DIR="$HOME/.nvm"


Loading…
Cancel
Save