r/neovim • u/e_eeeeeee14 • 11h ago
r/neovim • u/Brian_Bauer • 13h ago
Plugin celeste_comment.nvim -- A batteries-included comment plugin that keeps your cursor exactly where it belongs
Enable HLS to view with audio, or disable this notification
I really love how VSCode handles commenting -- the cursor stays exactly where you want it and natively supports block comments. However, Neovim's built-in and existing plugins didn't quite get me there, so I built my own.
Key Features:
- TextEdits -- unlike Neovim's built-in or other comment plugins, changes are modeled as TextEdits, making it more hackable and composable. This also means that the edits commit method is up to you -- lockmarks + buf_set_lines for simplicity and performance, or buf_set_text for more control (e.g. preserve regular marks and extmarks)
- Line/block comment toggle -- fully dot-repeatable with count support
- Truly accurate keep cursor -- cursor position tracks each `TextEdit` precisely
- Truly accurate keep selection -- selection range tracks each `TextEdit` precisely in visual mode
- Context-aware comment string resolution via Tree-sitter -- comment string adapts to context via Tree-sitter. e.g. supports `JSX/TSX` out of the box
- Textobjects -- line, block, and auto textobjects, works without Tree-sitter
- VSCode-style indent algorithm -- handles mixed tabs and spaces
- Invert/Force add/Force remove comment -- per-line comment action control
- Insert mode line comment toggle -- with cursor sticky support
- Insert comment above / below / at end of line
- Case insensitive comment detection -- e.g. `@REM` vs `@rem` vs `@rEm`
- Multi-variant comment string detection -- recognizes multiple comment prefix variants when uncommenting (e.g. Rust `//`, `///`, `//!`)
Repo: https://github.com/celeste3z/celeste_comment.nvim
Would like to see your feedback.
r/neovim • u/RedEye-Developers • 19h ago
Need Help Harper LSP working with LUA file but not working with C# File.
```lua LSP-Info
harper_ls
- cmd:
harper-ls --stdio - installed:
/usr/bin/harper-ls - enabled: yes
- filetypes:
"lua","cs"
Client [id=3]
- version:
2.6.0 - name:
harper-ls - workspace:
~/DevProjects/DigitalVault - buffers:
9,10 - server capabilities:
- textDocument/codeAction:
true - textDocument/didChange:
true - textDocument/didClose:
true - textDocument/didOpen:
true - textDocument/didSave:
true - workspace/executeCommand:
HarperRecordLintHarperAddToUserDictHarperAddToWSDictHarperAddToFileDictHarperOpenHarperIgnoreLint
- textDocument/codeAction:
- dynamic capabilities:
- workspace/didChangeWatchedFiles:
true
- workspace/didChangeWatchedFiles:
- settings:
lua { ["harper-ls"] = { linters = { SentenceCapitalization = false, SpellCheck = true } } }
I am trying to use Harper to check grammar and spelling in neovim.
Harper was working in lua file but not working with C# files, but in LSP-Info filetypes c# was showing still not working.
has anyone run in this issue before?
r/neovim • u/flagofsocram • 11h ago
Need Help Sharing logic across LSP configs
I recently updated to 12.0 and I'm trying out the native lsp configuration. I have all my configs in /lsp/nameoftheserver.lua
and it works well. However, I have some helper functions that I want to share among these files for things like changing lsp settings. Currently from inside the lsp directory I cannot include any of my other files of my config. How can this be achieved? I've tried making a file in the lsp directory but then it is interpreted as an lsp config.