autozimu / LanguageClient-neovim

Language Server Protocol (LSP) support for vim and neovim.
MIT License
3.55k stars 273 forks source link

Equivalent setup steps for init.lua vs init.vim #1254

Open jeffsaremi opened 2 years ago

jeffsaremi commented 2 years ago

What is the equivalent of this if I'm using init.lua file:

let g:LanguageClient_serverCommands = {
    \ 'rust': ['~/.cargo/bin/rustup', 'run', 'stable', 'rls'],
    \ 'javascript': ['/usr/local/bin/javascript-typescript-stdio'],
    \ 'javascript.jsx': ['tcp://127.0.0.1:2089'],
    \ 'python': ['/usr/local/bin/pyls'],
    \ 'ruby': ['~/.rbenv/shims/solargraph', 'stdio'],
    \ }

thanks

arafatamim commented 2 years ago
vim.g["LanguageClient_serverCommands"] = {
  rust = { "~/.cargo/bin/rustup", "run", "stable", "rls" },
  javascript = { "/usr/local/bin/javascript-typescript-stdio" },
  ["javascript.jsx"] =  { "tcp://127.0.0.1:2089" },
  ...
}

Any reason you're using this over the builtin LSP client btw?