Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
docs(neovim): add configuration guide for Neovim as LSP client #270
docs(neovim): add configuration guide for Neovim as LSP client #270
Changes from 2 commits
411c58f
009df8d
a13afaf
6ae2a0b
bb94158
e06f586
001b82d
088da04
68bf19a
19bb536
4705d77
810dfe0
2c167cf
9a341b4
c204d72
cd1e96f
3e05ef2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it makes sense to provide this autocmd? I'd expect everyone to already have something like this in their config.
However, for the completeness (e.g. for Neovim newcomers) it might make sense to keep it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth to consider: using
ftplugin
.Putting the below command in either
ftplugin/r.lua
orafter/ftplugin/r.lua
would have a roughly the same effect. I supposed it's a style preference of usingpattern
vs. filetypes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are right, either are fine. Maybe we can propose both solution/approach. Using the filter might be better for those that also have
rlanguageserver
to be specific on which one to use?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When responding to another comment, I just realized that
on_attach
seems to make the all-in-onesetup()
call:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will use your solution, it makes sens and likely easier to configure for neovim newcomer. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an out-of-the-box functionality or does one need to configure tree-sitter injections? 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is out of the box, my conform config is pretty simple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TymekDev and @PMassicotte can you please double check that Air works in various Quarto and RMarkdown documents? I have my doubts because I went looking in conform and could not find any specific Quarto support for LSP/formatting passthrough.
If it does seem to be working, I'd love to know what I missed so I can study how it works on the conform side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DavisVaughan conform.nvim supports injected language formatting this is probably what's meant here, see the following: https://github.com/stevearc/conform.nvim/blob/master/doc/advanced_topics.md#injected-language-formatting-code-blocks. I can confirm that it works with Rmarkdown and Quarto files, I'm guessing since Rmarkdown and Quarto inherit from markdown treesitter it works "out of the box".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a
lazy.nvim
-specific setup. I'd suggest using a generic setup (example below) and point to conform's README for a way to install the plugin.What about filetypes for R markdown and Quatro?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently not supported.
#265