LunarVim / Neovim-from-scratch

📚 A Neovim config designed from scratch to be understandable
https://www.chrisatmachine.com/
GNU General Public License v3.0
5.36k stars 1.17k forks source link

Lsp not working correctly with lua files #84

Closed zakissimo closed 2 years ago

zakissimo commented 2 years ago

Since I last updated I can't get the lua language server to lunch, not sure if it's global or just me. Pyright lunches correctly, seems like null-ls as well but nothing when I open a lua file.

Here's my LspInfo (I have a python file and a lua file open, the active buffer is the lua file):

 Language client log: /home/zak/.cache/nvim/lsp.log
 Detected filetype:   lua

 1 client(s) attached to this buffer: 

 Client: null-ls (id: 1, pid: 5001, bufnr: [1, 5, 6, 8])
    filetypes:       less, html, yaml, graphql, markdown, json, javascript, javascriptreact, typescript, typescriptreact, vue, css, scss, python, lua, sh
    autostart:       false
    root directory:  /home/zak/.config/nvim
    cmd:             nvim

 1 active client(s) not attached to this buffer: 

 Client: pyright (id: 2, pid: 12431, bufnr: [8])
    filetypes:       python
    autostart:       true
    root directory:  Running in single file mode.
    cmd:             pyright-langserver --stdio

 Configured servers list: cmake, pyright, tsserver, bashls, emmet_ls, eslint, ltex, jsonls

and here's my checkhealth (lsp installer section):

nvim-lsp-installer: require("nvim-lsp-installer.health").check()
========================================================================
## nvim-lsp-installer report
  - OK: neovim version >= 0.6.0
  - WARNING: **Ruby**: not available
  - WARNING: **RubyGem**: not available
  - WARNING: **Composer**: not available
  - WARNING: **PHP**: not available
  - WARNING: **javac**: not available
  - WARNING: **java**: not available
  - WARNING: **julia**: not available
  - OK: **python3_host_prog**: `Python 3.10.2`
  - OK: **tar**: `tar (GNU tar) 1.34`
  - OK: **gzip**: `gzip 1.11`
  - OK: **curl**: `curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/1.1.1m zlib/1.2.11 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.10.0 nghttp2/1.46.0`
  - OK: **wget**: `GNU Wget 1.21.2 built on linux-gnu.`
  - OK: **python3**: `Python 3.10.2`
  - OK: **node**: `v17.3.0`
  - OK: **Go**: `go version go1.17.6 linux/amd64`
  - OK: **bash**: `GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)`
  - OK: **sh**: `Ok`
  - OK: **npm**: `8.4.1`
  - OK: **pip3**: `pip 20.3.4 from /usr/lib/python3.10/site-packages/pip (python 3.10)`
  - 
zakissimo commented 2 years ago

Nervermind, I realised that you need to install the server with LspInstallInfo and not otherwise. I had it installed with Yay... That's why it didn't work. Everything works as intended now.