Closed jipgg closed 3 months ago
My settings still are being respected, can you run :LspInfo
and :checkhealth luau-lsp
when luau-lsp is attached and send the output?
The outputs: I've made a public repo of my nvim config (its not a sizable one) in case that would help resolving the issue. I've tried loading it from an exrc file with no luck. The other options seem to be working correctly, just the server configurations.
Edit: @jipgg btw I just realized you put diagnostics
settings under completion
, so thats probably why strictDatamodelTypes doesn't work, it should be under luau-lsp
. I replicated the settings for auto imports and it works only for services and not for requires as expected.
:lua vim.print(require("luau-lsp.util").get_client().settings)
or :LazyDev lsp
:LuauLsp restart
131d385
ae76ec9
3ad89b5
(run :Lazy sync
)function() end
) Actually I think this shouldn't change anything because you seem to already load luau-lsp at startupI'm using the latest commit right now and the settings are all respected
Pinning to 3ad89b5
resolves the issue. Looking at the output of :LspInfo
it seems to be rawdogging the executable on the other versions (image on my previous comment), and only invoking the mason CMD file on the older commit.
I do have a separate luau-lsp.exe
added to my PATH which seems to be the one that is getting invoked instead of the mason copy thats in nvim-data. Removing said executable from my path breaks functionality entirely and gives an error message on the later commits while silently breaking functionality on the commit that works.
This is however speculation based on a severe lack of knowledge about LSPs, but hopefully this extra information might make it easier for you to diagnose what the problem might be. Regardless, thank you for your help. it's working as expected now.
Ok, I see the problem: mason-lspconfig.nvim
will modify the cmd on Windows. mason.nvim
creates a luau-lsp.CMD
file under the binaries directory. vim.lsp.start_client
uses uv.spawn
under the hood, which doesn't execute batch scripts (.CMD files). It wasn't a problem before the commit you are using because I was depending on lspconfig, and mason-lspconfig would "fix" that. I'll add tests for Windows and fix that. Thanks!
@jipgg Hello, I recently discovered this was related to the fact that you didn't send the capabilities in the server config, I've updated the plugin, so no changes are required on your side, you just need to update the plugin
Currently my LSP options seemingly aren't getting initialized correctly anymore since syncing the plugin to the latest commits. In my case imports and strict datamodel types aren't being set to their respective state that i specified; Being import disabled and server diagnostics being non-strict while having both configured to be the opposite. In case it could be an error on my part, below is my current config for the plugin that is passed to the mason handlers setup: