Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add markdown-oxide lsp #3030

Merged
merged 8 commits into from
Feb 29, 2024
Merged

Conversation

Feel-ix-343
Copy link
Contributor

Session.vim Outdated Show resolved Hide resolved
@Feel-ix-343 Feel-ix-343 marked this pull request as ready for review February 25, 2024 13:30
@@ -0,0 +1,18 @@
return {
default_config = {
root_dir = function()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you can use single_file_support directly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The language server uses root_dir in the initialization, so right now single_file_support does not work.

I do think that root_dir makes sense as is because this way the context in which the file is opened is sent as the root_dir, which makes sense for vaults with folders. The same root dir will be sent if neovim is called with nvim ., nvim file, and nvim folder/file, which adhears to the vault structure and the LSP completion structure

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you set the single_file_support the root dir is cwd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As many people do track their vaults with git, I think it is best to both resolve .git as root and cwd; I think root_dir is best.

My recent commits have this

Feel-ix-343 and others added 2 commits February 28, 2024 07:25
Co-authored-by: Raphael <[email protected]>
@glepnir glepnir merged commit 8ec68f7 into neovim:master Feb 29, 2024
8 of 9 checks passed
@Feel-ix-343
Copy link
Contributor Author

Awesome; works on my end!

@Feel-ix-343
Copy link
Contributor Author

Hey @glepnir I don't think the single_file_support is working. There are some issues open on my repo saying that the LS doesn't start unless there is a git repo -- in which case root_dir would be sent. I think single_file_support is supposed to send the root_dir but as of neovim 0.9.5 and nightly, root_dir is not being sent (unless there is a git repo).

I believe the solution for neovim 0.9.5 is to send the cwd(), and for nightly to send the vim.uv.cwd()

Shall I open a new PR?

@glepnir
Copy link
Member

glepnir commented Mar 26, 2024

emm sure. but i may take a look code of there .forget some code on how neovim initialize client when root is emtpy. :p . most work on neovim core rencently ..

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