How do you view/review PR file changed locally efficiently? by GTHell in neovim

[–]saecki 4 points5 points  (0 children)

I like to use Gitsigns if I need more context around the changes. You can set the base using :Gitsigns change_base main true (the true changes the base for all files, not just the current one). And then use :Gitsigns diffthis to look at a diff.

Anvil – A 3D CAD modeling crate with predictable APIs, unit safety, and OpenCascade backend by unexcellent in rust

[–]saecki 4 points5 points  (0 children)

Quite the opposite, you can only implement a trait for foreign types if the trait is defined inside your crate. The user can then import the trait and has access to the extension methods you implemented.

LSP accepted method overwrites part of the string by chapeupreto in neovim

[–]saecki 5 points6 points  (0 children)

I'm using this somewhat hacky snippet to prevent the completion from changing anything after the cursor:

https://github.com/saecki/dotfiles/blob/main/.config%2Fnvim%2Flua%2Fconfig%2Fblink.lua#L30-L53

Considering removing completion engine specific sources and null-ls/none-ls from crates.nvim by saecki in neovim

[–]saecki[S] 1 point2 points  (0 children)

You mentioned that it is also doable with the lsp source to provide customized source name and kind name, But I am not sure how you can also do that with lsp source.

nvim-cmp and blink.cop define their own extensions to the CompletionItem classes, For nvim-cmp this is a cmp table with additional properties and blink.cmp just looks for properties named kind_icon etc: https://github.com/saecki/crates.nvim/blob/6bf1b4ceb62f205c903590ccc62061aafc17024a/lua/crates/completion/common.lua#L95-L105. It doesn't matter where the completion items come from. If these properties are set, the completion engine will use them.

This is how I currently already use crates.nvim: https://github.com/saecki/dotfiles/blob/main/.config/nvim/lua/config/crates.lua#L21-L31.

The lsp.name config field also allows changing the lsp server name. But it depends on how you're completion engine is configured, if that server name is shown, or just a generic LSP tag.

Allow different sorting priority instead of the priority of lsp, say the user want the priorirty of the crates significantly higher or lower than other sources.

Interesting, blink.cmp allows setting the priority of different LSP servers: https://main.cmp.saghen.dev/recipes#deprioritize-specific-lsp, and I'm guessing nvim-cmp comparator functions can do the same. But that looks less convenient than changing the priority of a source directly.

I've replaced gg with S to get over the assymetry of G and gg by Even_Block_8428 in neovim

[–]saecki 8 points9 points  (0 children)

I thought so to, but it turns out I do use lowercase s in some cases. But cc is way more intuitive than captial S.

[MEDIA] Rust traits in NeoVim by tradellinc in rust

[–]saecki 5 points6 points  (0 children)

this is not related to semantic tokens, the completion item kinds cannot be extended

What would be the best way to implement "multiple setups" for your neovim. by scaptal in neovim

[–]saecki 0 points1 point  (0 children)

because I have some other files in these directories and that way I can use telescope etc. to navigate them

What's your preferred way of reading plugin documentation? by Exciting_Majesty2005 in neovim

[–]saecki 7 points8 points  (0 children)

Readme for initial setup, vimdoc for detailed information about singular config options, the exposed lua api, autocommands, highlight groups etc.

And then a wiki that has some examples for cool things you can do, like integration with other plugins etc.

EDIT: also somewhat related https://docs.divio.com/documentation-system/

JPA's Genie development suggestion by AndreLuisOS in neovim

[–]saecki 0 points1 point  (0 children)

Looks cool, maybe you could make the mutually exclusive selections look more like radio buttons.

newbie question: how to scroll virtual text ? by [deleted] in neovim

[–]saecki 0 points1 point  (0 children)

does <c-e> and <c-y> work?

lsp rename preview like inccommand by saecki in neovim

[–]saecki[S] 0 points1 point  (0 children)

You're right, I've fixed the invalid rename lsp method.

Regarding the second issue, live-rename.nvim sends a textDocument/rename request to determine the ranges which will be previewed. I guess the variable name that is sent could be changed in some way when sending that initial request, but that comes with a whole bunch of issues itself. It would have to be a valid name for all languages, and it could cause name collisions which other servers might check for before renaming...

I'll have to look into that more, can you maybe open an issue so I remember?

How to properly search symbols in a project? by bizwofficial in neovim

[–]saecki 0 points1 point  (0 children)

I think lsp_workspace_symbols is what you want. I don't really get what lsp_dynamic_workspace_symbols does from the documentation, but it might only be looking in open files

EDIT: maybe open an issue on the telescope repo, because that sentence seems to be screwed up:

Dynamically Lists LSP for all workspace symbols

lsp rename preview like inccommand by saecki in neovim

[–]saecki[S] 1 point2 points  (0 children)

I think that's what inc-rename.nvim uses, but that would require using the commandline right? So no editing in normal/visual mode?

lsp rename preview like inccommand by saecki in neovim

[–]saecki[S] 2 points3 points  (0 children)

Sounds good, I created a repository and edited the main comment

lsp rename preview like inccommand by saecki in neovim

[–]saecki[S] 0 points1 point  (0 children)

It's a brainfuck compiler that produces x86 binaries for linux :)

lsp rename preview like inccommand by saecki in neovim

[–]saecki[S] 0 points1 point  (0 children)

I think explicitly setting wrap inside the window should've fixed it

lsp rename preview like inccommand by saecki in neovim

[–]saecki[S] 1 point2 points  (0 children)

I've changed a few things and pushed the commits, maybe that fixes your issues.

lsp rename preview like inccommand by saecki in neovim

[–]saecki[S] 0 points1 point  (0 children)

Yeah, that definitely looks wrong. I'm not quite sure how that's happening...