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

Adding some documentation on setting up LSP for neovim 0.8+ #783

Merged
merged 1 commit into from Jul 27, 2023

Conversation

scottfines
Copy link

Should be a minor change to the Editors README on how to set up sourcekit-lsp for nevim 0.8 and above. The code segments are taken from my own tested configuration, along with as much notation as I could be reasonably confident in.

Copy link
Member

@etcwilde etcwilde left a comment

Choose a reason for hiding this comment

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

The indentation looks maybe a bit excessive (though personal opinion), the code snippet themselves look fine. Maybe add a few links to documentations on the tools so that folks can configure the server for themselves.

e.g https://neovim.io/doc/user/lsp.html#lsp-config, https://neovim.io/doc/user/lsp.html, etc...

@scottfines
Copy link
Author

I adjusted the indentation to line up with what I see in the rest of the doc (2 spaces), hopefully that will be more consistent. Also added a link to neovim's LSP configuration page for further information. There are some plugins that (theoretically) smooth this out, but since I haven't used them, I'm somewhat reluctant to even tangentially endorse them in the docs.

Copy link
Member

@etcwilde etcwilde left a comment

Choose a reason for hiding this comment

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

Thanks for making those changes.

There are some plugins that (theoretically) smooth this out, but since I haven't used them, I'm somewhat reluctant to even tangentially endorse them in the docs.

I've been pretty happy with vim-lsp, though that's listed above. It works reasonably well with neovim too. I haven't tried any of the neovim/lua specific versions either.


```lua
require'lspconfig'.sourcekit.setup{
cmd = {'$TOOLCHAIN_PATH/usr/bin/sourcekit-lsp'}
Copy link
Member

Choose a reason for hiding this comment

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

One more to adjust the indentation on. :)

Copy link
Author

Choose a reason for hiding this comment

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

oops! my bad! fixed :)

@etcwilde
Copy link
Member

@swift-ci please test

@etcwilde
Copy link
Member

Windows failure:

[swift]                                 Updating 'C:\Users\swift-ci\jenkins\workspace\sourcekit-lsp-PR-windows\swift'
[swift]                                 + git fetch --recurse-submodules=yes --tags
[swift]                                 b'From https://github.com/apple/swift'
[swift]                                 b' * branch                    HEAD       -> FETCH_HEAD'
[swift]                                 + git checkout main
[swift]                                 b"error: pathspec 'main' did not match any file(s) known to git"

@etcwilde
Copy link
Member

@swift-ci please test Windows

@ahoppen
Copy link
Collaborator

ahoppen commented Jul 27, 2023

@swift-ci Please test Windows

Copy link
Collaborator

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Thanks for adding the documentation @scottfines. That will surely make it easier for people to get started with sourcekit-lsp + neovim 👍🏽

@ahoppen ahoppen merged commit a6e8568 into apple:main Jul 27, 2023
3 checks passed
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.

None yet

3 participants