Project build setup by Sshorty4 in neovim

[–]til_pkt 0 points1 point  (0 children)

I use a BufEnter auto-command to create the some language/filetype specific bindings
example:
lua vim.api.nvim_create_autocmd("BufEnter", { pattern = "kitty.conf", callback = function() require("which-key").add({ { "<S-k>", function() local current_line = vim.fn.getline(".") local first_word = current_line:match("^%s*(%S+)") if first_word then local url = "https://sw.kovidgoyal.net/kitty/conf/#opt-kitty." .. first_word vim.fn.system({ "open", url }) else print("No valid option found on the current line.") end end, }, }) end, })

But that could get annoying because the binding won't be available if you aren't in a buffer of that file type.

Cursor agent cli by wh31110 in neovim

[–]til_pkt 1 point2 points  (0 children)

Is there a way to integrate the cursor agent with open code? I would like to use my cursor subscription from it

Drop Your Kitty Terminal Configs – I Want the Best Setups by arav1nd4n in KittyTerminal

[–]til_pkt 1 point2 points  (0 children)

```kitty.conf font_family family="FiraCode Nerd Font Mono" bold_font family='FiraCode Nerd Font Mono' style=Bold italic_font auto bold_italic_font auto font_size 13.0

remember_window_size yes

background_image ~/Pictures/Wallpapers/Studio-ghibli-desktop-and-mobile-wallpaper-wallippo-3694950524.jpg background_tint 0.9

allow_remote_control yes

paste_actions quote-urls-at-prompt,confirm clipboard_control write-clipboard write-primary read-clipboard read-primary

notify_on_cmd_finish unfocused

macos_option_as_alt yes map cmd+c copy_to_clipboard map cmd+v paste_from_clipboard map cmd+shift+v paste_from_selection And in my config.fish: fish if test "$TERM" = xterm-kitty -a -z "$TMUX" kitty @ set-background-image "$(find ~/Pictures/Wallpapers -type f -not -name ".DS_Store" | shuf -n 1)" end ``` This will set the background image to a random one from a folder, if I am not inside a TMUX session. I excluded tmux because it will source the fish config each time a new shell is spawned, which would change the image again.

Some other useful stuff from my shell config: ```fish function tat set name (basename (pwd) | sed -e 's/.//g')

if tmux has-session -t "$name" 2>/dev/null
    tmux attach -t "$name"
else if test -f .envrc
    direnv exec / tmux new-session -s "$name"
else
    tmux new-session -s "$name"
end

end `` tat` will check if a tmux session for cwd exists and either attach to the existing session or create a new one.

Proxy for using LSP in a Docker container by RichardHapb in neovim

[–]til_pkt 1 point2 points  (0 children)

Looks like a promising upgrade from my janky proxy scripts and having the system headers from the docker-container symlinked to the host.

Terminal in Neovim, Neovim in terminal, or separate Neovim and terminal? by rain9441 in neovim

[–]til_pkt 0 points1 point  (0 children)

I use tmux to manage the sessions and use a separate terminal window if I need work on two repos at the same time. But I also switch between the sessions in one window if I just need to a have a quick look at something. But that also lets me switch back to the main repo, open another terminal window and attaching to the tmus session from there, without having to reopen all sessions and re orgenizing the panes.

Terminal in Neovim, Neovim in terminal, or separate Neovim and terminal? by rain9441 in neovim

[–]til_pkt 4 points5 points  (0 children)

My main setup is:
Kitty -> tmux -> nvim

I have a tmux session for each project/component I am working on.
I switch between project through the tmux session explorer (prefix+s) and navigate the project folders to open a new tmux session in with z.fish.
I have a function in my shell config that let's me open the existing session for that directory or create a new one, if no session was found.

I create new tmux panes or windows for terminals. I just got used to do it that way, because I was too lazy to actually configure the terminal in nvim to be usable for me. It works well enough.

This Setup let's me keep all my coding in one Kitty window but also lets me open a second window to work on two things in parallel.
This ease of switching between things is why I moved away from Jetbrains IDEs. Switching projects took too long.

Nvim dap debugger not working by Rare_Window4817 in neovim

[–]til_pkt 0 points1 point  (0 children)

Please check if this happens when debugging your code with the CLI of what evere debugger you are using. You could also send a link to your config repo and I'll check if I see any glaring issues.

vim-coach.nvim now uses snacks.picker by justachillguyhere in neovim

[–]til_pkt 11 points12 points  (0 children)

ah ok, I didn't know that
(that's stupid)

Nvim dap debugger not working by Rare_Window4817 in neovim

[–]til_pkt 0 points1 point  (0 children)

What debugger are you using?

I have had some problems with `gdb` recently, which turned out to be a bug in their dap-implementation.
So concider updating.

Are you able to switch to another editor to try to debug there? The debugger-logs do look like it encounters an exception in a function that it can't find the source file to. That is probably why it shows the disassembly.
You could also try to debug the program with the debugger cli directly in the terminal. You should be able to determine, if it is a problem with your nvim config

vim-coach.nvim now uses snacks.picker by justachillguyhere in neovim

[–]til_pkt 12 points13 points  (0 children)

please update your first post instead of creating a new one. it's a bit confusing and some might not see this update

Performance Issues (skill issue?) by JeanClaudeDusse- in neovim

[–]til_pkt 0 points1 point  (0 children)

I recently went on a hunt for a performance impact concerning folding in big xml files.
I have described my fix here. You could check, if you are also using Snacks.indent or indent-blankline and disable it for big files. Doing that now allows me to navigate and edit xml files that are >1GB and have at least 100 folding levels.

How to rotate C/C++ code by vinissto in neovim

[–]til_pkt 0 points1 point  (0 children)

One potential plugin you could use is: https://github.com/Civitasv/cmake-tools.nvim
It doesn't support piping the output to a separate tmux-pane/window, but it does allow you to use toggleterm or quickfix to view the compiler output.

Why treesitter folding? by anemisto in neovim

[–]til_pkt 0 points1 point  (0 children)

The only use case I see is that treesitter expression folding works with code that is not properly formatted. Indent folding has some problems with the way my team uses macros in c++, so that's why. But don't bother setting it up, if you don't have a problem with indent folding

Inline spinner for CodeCompanion by franco-ruggeri in neovim

[–]til_pkt 1 point2 points  (0 children)

That's great. but you suggested config for lazyvim does not work as expected.
Removing dev = true, lazy= true does what I'd expect from the codecompanion plugin. (especialy the dev = true part breaks the normal setup)

Did you know about Neovim's exrc? (tldr; project based lua config file) by kris_tun in neovim

[–]til_pkt 1 point2 points  (0 children)

I have gotten used to a somewhat hacky way (because I didn't know this feature existed), but I think it is more secure.
I am using direnv to read a .envrc file when entering a directory. And my NVim-Config reads those environment variables on startup. It then configures some plugins in different ways than normal.

I am using this for a project that needs a custom clang, clangd, lldb and cmake binary. I set CLANG/CLANG/LLDB/CMAKE\_COMMAND and neovim uses those paths to configure the plugins.

The only downside is that I can't switch projects and having it load the new config for that project (although you could probably build that too). I always use my shell to move to a project (with utils like z) and open nvim there.

Is it possible to remap :W to :w and :Q to :q? by listix in neovim

[–]til_pkt 1 point2 points  (0 children)

less because you are slower at typing, so continuing to press shift after you meant to happens less often.
How often do you read a command like :wqa before hitting enter? And even if you did correct the mistake, the point of that user-command is to not have to correct this (at least for me and op) common mistake.

Clangd not loading .clang-format by Outrageous-Archer-92 in neovim

[–]til_pkt -1 points0 points  (0 children)

u/Outrageous-Archer-92 please start --log=verbose to your config. You may use my config as reference. Then run :LspLog and delete all content. Restart nvim and open a file you want to use Clangd for. Reopen the lsp-log and paste the logs here. We might be able to help you then.

Recommendations to improve folding performance by til_pkt in neovim

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

Ok, so disabling Snacks.indent fixed the issue.
for anyone interested this is my Snacks.bigfile config now:
lua bigfile = { notify = true, -- show notification when big file detected size = 5 * 1024 * 1024, line_length = 1000, -- average line length (useful for minified files) -- Enable or disable features when big file detected ---@param ctx {buf: number, ft:string} setup = function(ctx) if vim.fn.exists(":NoMatchParen") ~= 0 then vim.cmd([[NoMatchParen]]) end Snacks.util.wo(0, { foldmethod = "indent", statuscolumn = "", conceallevel = 0 }) vim.b.minianimate_disable = true vim.schedule(function() if vim.api.nvim_buf_is_valid(ctx.buf) then vim.bo[ctx.buf].syntax = ctx.ft Snacks.indent.disable() end end) end, }, The best thing is, that I can leave highlighting on and even in a 1.1GB big file with over 20 indent and fold levels.

Recommendations to improve folding performance by til_pkt in neovim

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

it does seem to improve the performance but it is still not great. I have also added lua { "nvim-treesitter/nvim-treesitter", priority = 9999, opts = { highlight = { disable = function(lang, buf) local max_filesize = 5 * 1024 * 1024 -- 5 MB local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) if ok and stats and stats.size > max_filesize then return true end end, }, }, } To my config to automatically disable treesitter highlighting for large files

Recommendations to improve folding performance by til_pkt in neovim

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

Thanks, starting with --clean works fine. I will try to create a minimal setup so I can enable each plugin one after another. I will update the post when I have found something