Skip to content

Conversation

@FoamScience
Copy link
Contributor

Although not common, the associated LSP (foam_ls) can handle single files just fine.
And Neovim's LSP client errors out if a nil root folder is returned; so we look for the git root, or just use the file's folder.

I only made changes to lsp/foam_ls.lua. Let me know if changes are also required for the one in lua/lspconfig/configs.

@justinmk justinmk merged commit a13a128 into neovim:master Sep 21, 2025
6 checks passed
@justinmk
Copy link
Member

or just use the file's folder.

Note that will result in a new client for each file.

@FoamScience
Copy link
Contributor Author

or just use the file's folder.

Note that will result in a new client for each file.

Thanks for the quick merge! I didn't think about that! but I think it's alright, as for most users the root dir will be resolved correctly; dangling single files are not useful in this language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants