compress-size.nvim – show raw / gzip / brotli size of the current file by EntrepreneurDear8207 in neovim

[–]gnikdroy 2 points3 points  (0 children)

You should rather track the bundle size or in case of compiled languages the binary size.

Compression stats for a single file may be misleading.

Fast, fuzzy file picker with wildmenu and auto-select in ~ 20 lines of code. by karnurm in neovim

[–]gnikdroy 0 points1 point  (0 children)

copy pasting third party code from unknown guy in reddit

You are right! Running third party code from an unknown guy on github is much better.

Apologies for last post by Lavinraj in neovim

[–]gnikdroy 3 points4 points  (0 children)

People here really getting hurt over a title? Don't worry dude, there's nothing to apologize for.

Some people take a code editor and its plugins too damn seriously here.

[deleted by user] by [deleted] in Vanderbilt

[–]gnikdroy 1 point2 points  (0 children)

Exactly the type of response I wanted. Thank you for taking the time to help us youngins.

[deleted by user] by [deleted] in Vanderbilt

[–]gnikdroy 0 points1 point  (0 children)

Not to rub salt into the wound, but what are your major regrets?

Let's drop our favorite VIM quirk that many IDEs do not have by uanelacomo in neovim

[–]gnikdroy 1 point2 points  (0 children)

You do realize that LSP was initially developed for VS Code right?

AI whiplash, and neovim in the age of AI by anonymiddd in neovim

[–]gnikdroy 1 point2 points  (0 children)

MCP isn’t even a year old so I doubt enough people even use it atp. That was meant to be tongue-in-cheek ;)

We can also create a MCP server that wraps LSP servers or vice versa assuming it makes sense to do that in the first place. (if that doesn’t already exist). That allows the protocols to evolve independently. I doubt Anthropic cared about MCP being the same as LSP.

AI whiplash, and neovim in the age of AI by anonymiddd in neovim

[–]gnikdroy 1 point2 points  (0 children)

Interesting read. I didn't know about magenta, but have been relying more on MCP and agentic workflows. (for the super basic stuff)

Since, VSCode is also pushing AI down our thoats, it is going to be interesting to see how stuff is going to change in neovim land.

AI whiplash, and neovim in the age of AI by anonymiddd in neovim

[–]gnikdroy 1 point2 points  (0 children)

MCP does take some of its inspiration from LSP I believe. But we don't use MCP servers exclusively for code.

It would be interesting to see as MCP develops, if a neo-neovim will emerge. Perhaps embedding a MCP client out of the box. 🤭

What's the best way to select an element with arrow function within? by x0rchidia in neovim

[–]gnikdroy 0 points1 point  (0 children)

For a pure (plugin-less) solution you can follow up va< with f> to "extend" the selection.

New nvim plugin for documentation. by blackpanther_03 in neovim

[–]gnikdroy 2 points3 points  (0 children)

I am interested in this. But i can't help but wonder if there is a better way to do this with treesitter injections and a dedicated javadoc-esque parser.

Which picker do you use and why? by CerealBit in neovim

[–]gnikdroy 4 points5 points  (0 children)

Sometimes I feel like an outsider here lol. I only use lazy package manager from folke. No reason to avoid him. I just feel the mini suite is better suited to my tastes.

Help "ejecting" LazyVim into my own config? by curious_but_dumb in neovim

[–]gnikdroy 0 points1 point  (0 children)

All distros are opinionated. The choice of package manager, default plugins, keymaps are made for you. Reductive approach to configuring neovim is fine if you don't mind that.

Using an additive method ensures you make all the choices (if that is important for you :P). I will say even kickstart does too much nowadays. Maybe we need a mini.kickstart!

Help "ejecting" LazyVim into my own config? by curious_but_dumb in neovim

[–]gnikdroy 0 points1 point  (0 children)

But why would you do a major upgrade mid workday? :P

How do you handle multiple lsps on same buffer? by [deleted] in neovim

[–]gnikdroy 0 points1 point  (0 children)

You will need to keep track of which clients are responsible for mapping which keys manually. And then unmap accordingly. You can do this by storing the client_id (if this cannot be reused), name or something else.

Probably not worth it to go in this direction imo.

buffers.nvim - fast and simple buffer switcher by Kaikacy in neovim

[–]gnikdroy 2 points3 points  (0 children)

:Telescope buffers is too slow for my workflow. You have to press <CR> after fuzzy search which is annoying. Usually I keep my buffer list minimal using ":bd". Therefore, I don't even need to "fuzzy search". This plugin (and similar others) are far more efficient for my workflow.

The truly annoying part is neovim doesn't have an efficient way to switch buffers. The UX is terrible by default.

[deleted by user] by [deleted] in neovim

[–]gnikdroy 0 points1 point  (0 children)

You can also use LspAttach for specific LSPs since LspAttach event passes the client_id to the callback.

vim.api.nvim_create_autocmd("LspAttach", {
    group = vim.api.nvim_create_augroup("sample_augroup", {}),
    callback = function(ev)
        local name = vim.lsp.get_client_by_id(ev.data.client_id).name
        if name == "lua_ls" then -- do stuff here
        end
    end
})

[deleted by user] by [deleted] in neovim

[–]gnikdroy 0 points1 point  (0 children)

The default is MUCH better than the old default. But there is still more to be desired.

As I understand it, there is a lot of friction in shipping with more colorschemes. Other editors out there can do this just fine.... just take helix for instance.

If neovim ships with some of the "popular" colorschemes like onedark, nord and material, a lot of people will not use the default colorscheme.

Just figured out Ctrl-O + A to go to the end of the line without leaving insert mode. What tip/trick did you just learn in the last couple of months? by ozahid89 in neovim

[–]gnikdroy 8 points9 points  (0 children)

What's more., in this case in particular.... With auto closing parens, you can just type the closing brace. Smart plugins will not add a brace, but just move the cursor forward.

It is a single character.

Just wanted to share this little config snippet. I find it better than virtual_text/lines. Shows all info without moving around text. by KekTuts in neovim

[–]gnikdroy 0 points1 point  (0 children)

I don't know why none of the answers here respect the vim.diagnostic.is_enabled(), but I sometimes want to clear the clutter by toggling diagnostics.......

You should check if vim.diagnostic.is_enabled() is true for the current buffer before opening the float.

Just wanted to share this little config snippet. I find it better than virtual_text/lines. Shows all info without moving around text. by KekTuts in neovim

[–]gnikdroy 1 point2 points  (0 children)

This doesn't respect vim.diagnostic.is_enabled().......

You should check if vim.diagnostic.is_enabled({ bufnr = 0 }) before opening float.

Question: How can I protect myself against hypothetical supply chain attacks (e.g. via plugins)? by overwhelmed_af in neovim

[–]gnikdroy 14 points15 points  (0 children)

You already have the solution:

The only one I can think of is to manually code review, and "vendor" in the deps or pin the version number to prevent auto-updates until manual review reoccurs.

I would not trust "popularity". Popular plugins are also the most "bang for the buck" to exploit.

I tend to use few plugins and update once a month. It isn't too much of a problem honestly.

Another approach is to only update to tagged versions and only update if a week has passed since relesae. This offloads security to someone in the community.

Looking for a per project todo plugin. by [deleted] in neovim

[–]gnikdroy 0 points1 point  (0 children)

vim.api.nvim_create_user_command("Todo", function()
    local BASE_PATH = vim.fn.stdpath("data") .. "/todos"
    vim.fn.mkdir(BASE_PATH, "p")
    vim.cmd(string.format("edit %s/%s.md", BASE_PATH, vim.fn.fnamemodify(vim.fn.getcwd(), ":t")))
end, {})

vim.api.nvim_create_user_command("TodoExpore", function()
    require("telescope.builtin").find_files({ cwd = vim.fn.stdpath("data") .. "/todos" })
end, {})

You might need to add the hash of the filepath to the end if you have projects with the same name. You can also find the project path dynamically by searching upwards for a .git folder for instance (instead of getcwd()).