Conversation
Full of bugs, but the "resolve" works in some cases
Bug fixes
Add some TODOs Fix selene warning
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 68 out of 69 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (4)
nvimcom/src/apps/utilities.c:1
- Debug logging statement left in production code. This should either be removed or conditionally compiled based on a debug flag.
nvimcom/src/apps/logging.c:1 - [nitpick] Silent failure when log file cannot be opened could make debugging difficult. Consider adding a fallback mechanism or one-time stderr warning.
nvimcom/src/apps/rnvimserver.c:1 - Callback functions
on_attach,on_init,on_exit, andon_errorare only enabled whenlsp_debugis true, but they still executevim.notify()calls. These notifications should be gated or removed in production.
nvimcom/src/apps/rnvimserver.c:1 - [nitpick] Magic number 380 used for truncating debug output should be defined as a named constant for clarity and maintainability.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| local set_directories = function() | ||
| -- config.rnvim_home should be the directory where the plugin files are. | ||
| config.rnvim_home = vim.fn.expand("<script>:h:h") | ||
| local rndir = debug.getinfo(1, "S").source |
There was a problem hiding this comment.
Pattern matching to extract plugin directory path could fail on Windows due to backslash path separators. Consider using vim.fn.fnamemodify() or normalizing path separators.
| local rndir = debug.getinfo(1, "S").source | |
| local rndir = debug.getinfo(1, "S").source | |
| -- Normalize path separators to forward slashes for cross-platform compatibility | |
| rndir = rndir:gsub("\\", "/") |
| if not compl_region then | ||
| M.send_msg({ code = "E" .. req_id }) | ||
| return | ||
| end |
There was a problem hiding this comment.
The compl_region variable is initialized to true but never modified elsewhere in the code. Document the purpose of this variable or remove it if unused.
|
One thing, could it be possible to complete data frame columns using the |
PMassicotte
left a comment
There was a problem hiding this comment.
Should we make a migration guide?
|
|
||
| -- check if the cursor is within comment or string | ||
| local snm = "" | ||
| local c = vim.treesitter.get_captures_at_pos(0, lnum, cnum - 1) |
There was a problem hiding this comment.
| local c = vim.treesitter.get_captures_at_pos(0, lnum, cnum - 1) | |
| local ok, c = pcall(vim.treesitter.get_captures_at_pos, 0, lnum, cnum - 1) | |
| if not ok then c = {} end |
Maybe replace all occurrences with similar check?
|
Should we propose something like return {
{
"R-nvim/R.nvim",
version = "^1", -- Use 1.x.x (new LSP)
version = "^0", -- Use old version with cmp-r
config = function()
require("r").setup({
...
})
end,
},
} |
Too long! I hope we do not have to do any other transition like that in the next 20 years.
Not yet, I think. We are free to break compatibility with old code because we haven't released version 1.0.0 yet. I prefer to stay on version 0.99.x for a few months until we fix the bugs that will be reported. At least on Windows, I know there are bugs to be fixed. We can suggest a specific commit for anyone with problems with the "lsp" version. The last commit on the "main" branch was
Yes, editing the function |
Totally fine with me. I can take a look to the ~ implementation in the upcoming days. Good opportunity to get more used to the lsp code base. Ready to get this big one merged? I have not found any issues lately. |
|
Maybe just add something in |
I'll release 0.99.1 and the note to the README before merging the "lsp" branch. Then, wait for bug reports... |
|
Congrats on getting this merged! A big step for R.nvim 🥳 |
|
Tree-sitter restriction: It only tries to get the summary if the object under the cursor is "variable". The purpose of this restriction was to avoid sending meaningless requests to R. Perhaps we should eliminate this restriction. |
|
I created the branch "fix_lsp". We can fix minor bugs there for a few days, but merge it immediately if we fix a serious bug. |
|
On the "fix_lsp" branch, we have a new issue. The hover over res <- lm(mpg ~ wt + hp, data = mtcars) |
|
If we used tree-sitter information, we would know that |
|
Perhaps you could make adjustments to the function
|
I think we could really benefit from using TS instead of string based search. What do you think? I do not mind to look at it, but will take few days, a lot of meetings/workshops to do this week on my side :) |
Reading this now. I've said the same thing in the other thread. It's better to continue later, when we are both free. |



No description provided.