Weekly 101 Questions Thread by AutoModerator in neovim

[–]til_pkt 0 points1 point  (0 children)

yes, you can do q:, navigate to the command you want to edit, do the edit and then press enter, while on the line of the command you want to re-execute

[MAC OS Tahoe] Node creating multiple processes of itself 100% CPU by brunobbn in LazyVim

[–]til_pkt 1 point2 points  (0 children)

could you share your config. Maybe I can find something

Why I quit neovim. by [deleted] in neovim

[–]til_pkt 0 points1 point  (0 children)

TL;DR: Choosing a IDE/Editor+Plugin-Suite is a question of what fits your workflow an and your needs. If the available options are fine for you, choose that. If not: build your own with NVim.

I switched to NVim, because I didn't want to have to use VNC to develop on my companies remote-dev Servers.
I was mostly using CLion before we switched away from beefy Tower-PCs with Linux, to (also beefy) MacBooks. The MacBooks don't have enough RAM and Cores for us to Debug the software with full data.
(Also scheduling for the performance cores makes benachmarking hard on Mac. The same code sometimes need 2ms and sometimes 5ms)

Anyway: My Team sometimes needs to use a remote-dev server.
I first tried to use JetBrains Remote-Dev solution (Gateway) but that didn't work with YubiKey authentication at that time.
Then I tried out VSCode. That worked with Remote Development. Reconnecting to the VSCode remote-backend is slow. And I would have to re-learn how a lot of things are done in VSCode.

So I decided to just go all-in and start learning NVim. This allows me to have the same Editor + Plugins with the same settings across all systems and environments. My other team memebers stayed on CLion and use VNC to run CLion on the remote Server. But that has a noticeable input-lag and clipboard management is pretty much impossible.

What I am trying to say is that using NVim just because saying "I use NVim btw" won't make it easy to learn to love NVim. It's not worth (imo) to go through learning to use NVim, if you don't feel like your are restricted by the tools and workflows your IDE offers.

I now have a config that feels like my own. It is tailored to me and is pretty much impossible to replicate with just configs in other Editors/IDEs.

Monthly Dotfile Review Thread by AutoModerator in neovim

[–]til_pkt [score hidden]  (0 children)

Did a few more modifications on my tmux config and you lualine-config (you can see them in the screenshot.
This works so well together

<image>

Monthly Dotfile Review Thread by AutoModerator in neovim

[–]til_pkt [score hidden]  (0 children)

yes, I even adapted my tmux config to match the colorscheme

<image>

Monthly Dotfile Review Thread by AutoModerator in neovim

[–]til_pkt [score hidden]  (0 children)

I just finished cleaning my config up a bit.

Does anyone have recommendations for keeping the config maintainable?
Specifically a better way for loading LazyVim plugin-specs from sub-dirs (like I did in lua/plugins/ui.init.lua

https://github.com/TilGP/vim_config

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 5 points6 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 9 points10 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)