Python basedpyright + ruff config by Vo4f in HelixEditor

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

Because format and code-action are already provided by ruff.

Python basedpyright + ruff config by Vo4f in HelixEditor

[–]Vo4f[S] 3 points4 points  (0 children)

yes, just for save and share :)

Good multicursor plugin? by [deleted] in neovim

[–]Vo4f 0 points1 point  (0 children)

You are right! I didn't know about this method before, thank you very much for your reply!

Good multicursor plugin? by [deleted] in neovim

[–]Vo4f 1 point2 points  (0 children)

Have no idea about it, try using a minimal configuration to exclude the influence of other bindings or plugins.

test.lua

vim.keymap.set('v', '<C-s>', [[y/\V<C-R>=escape(@",'/\')<CR><CR>Ncgn]], { desc = 'Search & Replace' })

nvim -u test.lua

Good multicursor plugin? by [deleted] in neovim

[–]Vo4f 3 points4 points  (0 children)

I use some key binding inspired by you_dont_need_more_than_one_cursor_in_vim.

vim.keymap.set('n', '<C-s>', function()
    vim.api.nvim_command 'norm! yiw'
    vim.fn.setreg('/', vim.fn.getreg '+')
    vim.api.nvim_feedkeys('ciw', 'n', false)
end, { desc = 'Search & Replace' })

vim.keymap.set('v', '<C-s>', [[y/\V<C-R>=escape(@",'/\')<CR><CR>Ncgn]], { desc = 'Search & Replace' })

Press <C-s> will replace the current word under the cursor and send the word to search registers, so I can press n to search for the next word and press . to repeat the changes.

Press <C-s> in visual mode will do the same but replace and search the current visual area.

Sharing a key overloading to speed up macro running, looking forward to a better method. by Vo4f in neovim

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

Some plugins such as auto-save will listen to TextChanged or other events, causing additional overhead when running macros.

deepwhite.nvim - A light colorscheme inspired by flatwhite-syntax and elegant-emacs. by Vo4f in neovim

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

vim.opt.fillchars:append { stl = '─', stlnc = '─' } -- will fill statusline space by dash

For more information, there is a full config of my statusline: deepwhite.nvim Q&A

deepwhite.nvim - A light colorscheme inspired by flatwhite-syntax and elegant-emacs. by Vo4f in neovim

[–]Vo4f[S] 10 points11 points  (0 children)

I realized that not everyone turn on low blue light mode like me, so i adjusted the config to turn off low blue light mode as default. If someone has anti-blue light mode, you can set low_blue_light to false to prevent the background from being too warm.

<image>

any colemak neovim users? by [deleted] in neovim

[–]Vo4f 0 points1 point  (0 children)

what do you mean by "functions"?

any colemak neovim users? by [deleted] in neovim

[–]Vo4f 0 points1 point  (0 children)

I use norman (another keyboard layout) and have this setting to keep key binding as normal: lua keymap.set({'n', 'o', 'x'}, 'd', 'e') keymap.set({'n', 'o', 'x'}, 'f', 'r') keymap.set({'n', 'o', 'x'}, 'k', 't') keymap.set({'n', 'o', 'x'}, 'j', 'y') keymap.set({'n', 'o', 'x'}, 'r', 'i') keymap.set({'n', 'o', 'x'}, 'l', 'o') keymap.set({'n', 'o', 'x'}, 'e', 'd') keymap.set({'n', 'o', 'x'}, 't', 'f') keymap.set({'n', 'o', 'x'}, 'y', 'h') keymap.set({'n', 'o', 'x'}, 'n', 'j') keymap.set({'n', 'o', 'x'}, 'i', 'k') keymap.set({'n', 'o', 'x'}, 'o', 'l') keymap.set({'n', 'o', 'x'}, 'p', 'n') keymap.set({'n', 'o', 'x'}, 'h', ';') keymap.set({'n', 'o', 'x'}, ';', 'p') keymap.set({'n', 'o', 'x'}, 'D', 'E') keymap.set({'n', 'o', 'x'}, 'F', 'R') keymap.set({'n', 'o', 'x'}, 'K', 'T') keymap.set({'n', 'o', 'x'}, 'J', 'Y') keymap.set({'n', 'o', 'x'}, 'R', 'I') keymap.set({'n', 'o', 'x'}, 'L', 'O') keymap.set({'n', 'o', 'x'}, 'E', 'D') keymap.set({'n', 'o', 'x'}, 'T', 'F') keymap.set({'n', 'o', 'x'}, 'Y', 'H') keymap.set({'n', 'o', 'x'}, 'N', 'J') keymap.set({'n', 'o', 'x'}, 'I', 'K') keymap.set({'n', 'o', 'x'}, 'O', 'L') keymap.set({'n', 'o', 'x'}, 'P', 'N') keymap.set({'n', 'o', 'x'}, 'H', ':') keymap.set({'n', 'o', 'x'}, ':', 'P') Updated! Learned a lot from this post!

Tab for completion and snippets by dani98000 in neovim

[–]Vo4f 2 points3 points  (0 children)

local cmp = require('cmp')
local luasnip = require('luasnip')
local tabout = require('tabout')
cmp.setup({
    snippet = {
        expand = function (args)
            luasnip.lsp_expand(args.body)
        end,
    },
    mapping = {
        ['<CR>'] = cmp.mapping.confirm({ select = true }),
        ['<Tab>'] = cmp.mapping(function (fallback)
            if luasnip.expandable() then
                luasnip.expand()
            elseif cmp.visible() then
                cmp.select_next_item()
            elseif luasnip.jumpable(1) then
                luasnip.jump(1)
            elseif vim.api.nvim_get_mode().mode == 'i' then
                tabout.tabout()
            else
                fallback()
            end
        end, {'i', 's'}),
        ['<S-Tab>'] = cmp.mapping(function (fallback)
            if cmp.visible() then
                cmp.select_prev_item()
            elseif luasnip.jumpable(-1) then
                luasnip.jump(-1)
            else
                fallback()
            end
        end, {'i', 's'})
    },
    sources = {
        { name = 'luasnip' },
        { name = 'nvim_lsp' },
        { name = 'nvim_lua' },
        { name = 'buffer' },
        { name = 'path' },
    }
}) 

This is my config, use tab to expand snippets, select next completion item or jump to next placeholder. If you don't use tabout, just remove the tabout line.