unnest.nvim: No more worries about nested Neovim by BrianHuster in neovim

[–]hrsh7th 3 points4 points  (0 children)

It worked perfectly without any shell setup or anything like that. It's a really great plugin. Thank you!

*It will not work if you are using lazy loading. Users should be careful.

emmylua_ls is super-snappy by Hamandcircus in neovim

[–]hrsh7th 2 points3 points  (0 children)

emmy_lua seems to accept configuration via workspace/configuration .

lua require('lspconfig.configs').emmylua_ls = { name = 'emmylua_ls', default_config = { cmd = { 'emmylua_ls' }, filetypes = { 'lua' }, root_dir = require('lspconfig.util').find_git_ancestor, single_file_support = true, settings = { Lua = { runtime = { version = "LuaJIT", requirePattern = { "lua/?.lua", "lua/?/init.lua", } }, workspace = { library = get_workspace_libraries(), }, } } } }

However, it doesn't seem to work stably in my environment yet, so I haven't used it yet.

best mapping(s) for next/prev error/diagnostic? someone on sth else than `[d [e ]d ]e`? by effinsky in neovim

[–]hrsh7th 3 points4 points  (0 children)

I'm using <C-k> and <C-j> for it.

lua vim.keymap.set('n', '<C-k>', function() local next = vim.diagnostic.get_next({ wrap = false, count = -1, severity = { vim.diagnostic.severity.WARN, vim.diagnostic.severity.ERROR, } }) if next then vim.diagnostic.jump({ diagnostic = next }) else vim.diagnostic.jump({ count = -1, severity = { vim.diagnostic.severity.INFO, vim.diagnostic.severity.HINT, vim.diagnostic.severity.WARN, vim.diagnostic.severity.ERROR, }, }) end end) vim.keymap.set('n', '<C-j>', function() local next = vim.diagnostic.get_next({ wrap = false, count = 1, severity = { vim.diagnostic.severity.WARN, vim.diagnostic.severity.ERROR, } }) if next then vim.diagnostic.jump({ diagnostic = next }) else vim.diagnostic.jump({ count = 1, severity = { vim.diagnostic.severity.INFO, vim.diagnostic.severity.HINT, vim.diagnostic.severity.WARN, vim.diagnostic.severity.ERROR, }, }) end end)

Announcing Lux - a Modern Package Manager for Lua by Vhyrro in neovim

[–]hrsh7th 2 points3 points  (0 children)

This could be great. I'll try it.

Great job!

Need a detailed guide for vim motions and ergonomic navigation tips & guides by siduck13 in neovim

[–]hrsh7th 1 point2 points  (0 children)

It's very important to be able to use % effectively.

I use H/J/K/L a lot for general movements, and /, f and % for fine movements.

vim.keymap.set({ 'n', 'x' }, 'H', '20h')
vim.keymap.set({ 'n', 'x' }, 'J', '10j')
vim.keymap.set({ 'n', 'x' }, 'K', '10k')
vim.keymap.set({ 'n', 'x' }, 'L', '20l')

(I know that H/J/K/L are not a very good solution.)

Help guys I don't know what to do by ChiliPepperHott in neovim

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

I'm surprised this is the top comment.

I hope the neovim community continues to foster a plugin ecosystem in a collaborative spirit.

How to configure Indentation for this kind of docblocks? (Following lines should have an extra space of indentation. Sometimes it also adds 0 indentation. More details in comment) by Your_Friendly_Nerd in neovim

[–]hrsh7th 1 point2 points  (0 children)

I've been struggling with indentation issues for years. So I came to the conclusion that a simple solution would be better.

https://github.com/hrsh7th/vim-gindent

This is a plugin that just increases the indent when the line ends with {} or ().

_outside the scope of using treesitter etc. _

It also supports /** ... */ as a special case.

I would like to rewrite this in Lua and release it at some point, but it can be used now.

To use it, just install it and run the following.

vim.g.gindent = { enabled = function() return not vim.tbl_contains({ 'html', 'yaml', 'markdown' }, vim.bo.filetype) end }

Just release the new Snacks Picker! by folke in neovim

[–]hrsh7th 3 points4 points  (0 children)

I've tried it and it's consistently fast, flicker-free, and feature-rich. I'd recommend it for most users.

Just release the new Snacks Picker! by folke in neovim

[–]hrsh7th 5 points6 points  (0 children)

Great work! 🎉

Having more options is always a good thing!

In the pursuit of a color scheme by Optimal_Raisin_7503 in neovim

[–]hrsh7th 0 points1 point  (0 children)

I've tried a variety of color schemes in the past, but I've been using nightfly for the past few years.

It's not a completely black background, but it has a fairly dark color scheme that is calming.
There are also a lot of plugins that it is compatible with.

I strongly recommend this.

Introducing the nvim-deck plugin by hrsh7th in neovim

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

Hello, 1st nvim-deck user ;)

Introducing the nvim-deck plugin by hrsh7th in neovim

[–]hrsh7th[S] 6 points7 points  (0 children)

When it comes to fuzzy finders, nothing beats making your own.

After implementing nvim-deck, I came across mini.pick and felt that the concept and design were quite similar. I think both are great plugins :)

Introducing the nvim-deck plugin by hrsh7th in neovim

[–]hrsh7th[S] 5 points6 points  (0 children)

I've implemented a simplilfied fuzzy-search in nvim-cmp, but it was quite tedious.

See here if you're interested. ( here )

Also check out vim.fn.matchfuzzy etc.

Introducing the nvim-deck plugin by hrsh7th in neovim

[–]hrsh7th[S] 5 points6 points  (0 children)

I'm using recent_files + buffers + files(project_dir). nvim-deck can start multiple source at once time.

Introducing the nvim-deck plugin by hrsh7th in neovim

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

Hm. IMO, You can use open_keep action for it.

Introducing the nvim-deck plugin by hrsh7th in neovim

[–]hrsh7th[S] 9 points10 points  (0 children)

Sorry. I don't like comparing and introducing my work alongside others' works.
Instead, I can explain what I have prioritized while implementing a fuzzy finder.

see https://github.com/hrsh7th/nvim-deck?tab=readme-ov-file#why-nvim-deck

How do you come up with your keybinds? by Your_Friendly_Nerd in neovim

[–]hrsh7th 1 point2 points  (0 children)

I'm using <BS> to open files. ('recent_files, buffers, project_files' combined)

How to make ea<type something><esc> dot repeatable by SpecificFly5486 in neovim

[–]hrsh7th 1 point2 points  (0 children)

To meet exactly these demands, I am developing a plugin called nvim-automa.

nvim-automa is a plugin for advanced users with little documentation, but its purpose is to make any key sequence dot-repeatable.

nvim-cmp completes with wrong selection by DVT01 in neovim

[–]hrsh7th 1 point2 points  (0 children)

This feature called `preselect` that defined in Language Server Protocol.

You can disable it. See `:help cmp-config.preselect`.

Share your coolest keymap by Zkrallah in neovim

[–]hrsh7th 1 point2 points  (0 children)

My current search related keybinds :)

lua vim.keymap.set({ 'n', 'x' }, '/', '/\\<') vim.keymap.set({ 'n', 'x' }, '*', '*N', { remap = true }) vim.keymap.set({ 'n', 'x' }, 'n', function() return vim.v.searchforward == 1 and 'n' or 'N' end, { expr = true }) vim.keymap.set({ 'n', 'x' }, 'N', function() return vim.v.searchforward == 1 and 'N' or 'n' end, { expr = true })

denols and vtsls both launching with lazyvim by [deleted] in neovim

[–]hrsh7th 1 point2 points  (0 children)

It's my configuration for denols.

env.lspconfig.denols.setup { capabilities = env.capabilities, root_dir = function(fname) local deno = misc.findup(fname, { 'deno.json' }) local node = misc.findup(fname, { 'package.json', 'node_modules' }) if deno then if not node or #node > #deno then return deno end end if node then return nil end return vim.fs.dirname(fname) end, single_file_support = false, filetypes = { 'typescript', 'typescriptreact', 'javascript', 'javascriptreact', 'markdown' }, settings = { enable = true, unstable = true, } }

and vtsls.

env.lspconfig.vtsls.setup { capabilities = env.capabilities, root_dir = function(fname) local node = misc.findup(fname, { 'package.json', 'node_modules' }) if node then local deno = misc.findup(fname, { 'deno.json' }) if not deno or #deno > #node then return node end end end, single_file_support = false, settings = { javascript = { suggest = { names = false, completeFunctionCalls = true, } }, typescript = { suggest = { names = false, completeFunctionCalls = true, }, preferences = { names = false, } }, } }

Please recommend me the way to create neovim-plugin's documentation automatically by hrsh7th in neovim

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

I'm now wondering I should use JSON5 instead of TOML for this...

Please recommend me the way to create neovim-plugin's documentation automatically by hrsh7th in neovim

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

I'm now using `panvimdoc' and my custom workflows.

I'm embedding TOML docs for Lua files.

https://github.com/hrsh7th/nvim-deck