You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read the appropiate plugin's documentation.
I have searched that this issue has not been reported before.
By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.
Describe the bug
The djlsp package is not found by mason.lspconfig, causing an error when added to lspconfig servers
Error executing vim.schedule lua callback: ...l/share/nvim/lazy/mason.nvim/lua/mason-registry/init.lua:80: Cannot find package "djlsp".
stack traceback:
[C]: in function 'error'
...l/share/nvim/lazy/mason.nvim/lua/mason-registry/init.lua:80: in function 'get_package'
...on-tool-installer.nvim/lua/mason-tool-installer/init.lua:166: in function 'callback'
...share/nvim/lazy/mason.nvim/lua/mason-core/async/init.lua:87: in function 'step'
...share/nvim/lazy/mason.nvim/lua/mason-core/async/init.lua:96: in function 'run'
...l/share/nvim/lazy/mason.nvim/lua/mason-registry/init.lua:202: in function 'refresh'
...on-tool-installer.nvim/lua/mason-tool-installer/init.lua:195: in function ''
vim/_editor.lua: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Workaround
Manually install django-template-lsp using :Mason
Execute djlsp.setup at the end of init.lua
diff --git a/init.lua b/init.lua
index 610018e..5e3c46b 100644
--- a/init.lua+++ b/init.lua@@ -972,5 +972,6 @@ require('lazy').setup({
},
})
+require('lspconfig').djlsp.setup {}
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et
output of :LspInfo
==============================================================================
lspconfig: require("lspconfig.health").check()
LSP configs active in this session (globally) ~
- Configured servers: lua_ls, djlsp
- OK Deprecated servers: (none)
LSP configs active in this buffer (bufnr: 1) ~
- Language client log: ~/.local/state/nvim/lsp.log
- Detected filetype: `htmldjango`
- 0 client(s) attached to this buffer
- Other clients that match the "htmldjango" filetype:
- Config: djlsp
filetypes: html, htmldjango
cmd: ~/Code/django-w3schools/djlsp
version: `?` (Failed to get version) Tried:
`djlsp --version`
`djlsp -version`
`djlsp version`
`djlsp --help`
executable: true
autostart: true
root directory: ~/code/django-project/
Docs for active configs:
- djlsp docs:
https://github.com/fourdigits/django-template-lsp
`djlsp`, a language server for Django templates.
Before Reporting an Issue
I have read the kickstart.nvim README.md.
I have read the appropiate plugin's documentation.
I have searched that this issue has not been reported before.
By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.
Describe the bug
The djlsp package is not found by mason.lspconfig, causing an error when added to lspconfig servers
To Reproduce
Workaround
django-template-lsp
using :Masonoutput of
:LspInfo
Desktop
Neovim Version
The text was updated successfully, but these errors were encountered: