Skip to content

Instantly share code, notes, and snippets.

@Vicfred
Last active May 8, 2025 07:57
Show Gist options
  • Save Vicfred/55b53c2d515229667528ebf614adedc5 to your computer and use it in GitHub Desktop.
Save Vicfred/55b53c2d515229667528ebf614adedc5 to your computer and use it in GitHub Desktop.
configure autocomplete for nim vim coc on gentoo

Install nim with choosenim

curl https://nim-lang.org/choosenim/init.sh -sSf | sh

Install nimlsp

nimble install nimlsp

Edit ~/.vim/coc-settings.json

{
  "languageserver": {
    "d": {
      "command": "/usr/bin/serve-d",
      "filetypes": ["d"],
      "trace.server": "on",
      "rootPatterns": ["dub.json", "dub.sdl"],
      "initializationOptions": {
      },
      "settings": {
      }
    },
    "nim": {
      "command": "nimlsp",
      "filetypes": ["nim"]
    },
    "haskell": {
      "command": "haskell-language-server-wrapper",
      "args": ["--lsp"],
      "rootPatterns": ["*.cabal", "stack.yaml", "cabal.project", "package.yaml", "hie.yaml"],
      "filetypes": ["haskell", "lhaskell", "hs"],
      "settings" : {
      }
    }
  },
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment