Can't get gopls to work with nvim-lsp

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/neovim

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • SaaSHub - Software Alternatives and Reviews
  • nvim-lspconfig

    Quickstart configs for Nvim LSP

    https://github.com/neovim/nvim-lspconfig/blob/041dfd7fb648d24c80cb8829dda2469f66f88490/lua/lspconfig/gopls.lua#L8 is the lspconfig, that rootdir I linked to is what triggers the lsp to load. For go it's looking for a go.mod file or a .git directory. You can override that in your server setup if you want it to always load.

  • goimports

    [mirror] Go Tools (by golang)

    You have to install gopls https://github.com/golang/tools/tree/master/gopls which is the server language.

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • dotfiles

    :open_file_folder: Personal configs: nvim, zsh (by ChrisAmelia)

    And for the config, see https://github.com/ChrisAmelia/dotfiles/blob/master/nvim/lua/lsp.lua#L108-L120

  • example

    Go example projects

    So I just cloned this git repo https://github.com/golang/example and as soon as I entered the hello/hello.go file I was able to get autocomplete and error checking. I don't understand why it isn't working with just a .go file I made.

  • vim

    My configuration for neovim. (by cwebster2)

    check out my lsp setup at https://github.com/cwebster2/vim/blob/nvim-lua/lua/lsp.lua

  • InfluxDB

    Build time-series-based applications quickly and at scale.. InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts