All Projects → nvim-pack → lsp-fastaction.nvim

nvim-pack / lsp-fastaction.nvim

Licence: other
lsp codeaction UI for neovim

Programming Languages

lua
6591 projects

Labels

Projects that are alternatives of or similar to lsp-fastaction.nvim

Coc Flutter
flutter support for (Neo)vim
Stars: ✭ 259 (+564.1%)
Mutual labels:  neovim, lsp
Lspsaga.nvim
neovim lsp plugin
Stars: ✭ 379 (+871.79%)
Mutual labels:  neovim, lsp
vimrc
My neovim config
Stars: ✭ 43 (+10.26%)
Mutual labels:  neovim, lsp
null-ls.nvim
Use Neovim as a language server to inject LSP diagnostics, code actions, and more via Lua.
Stars: ✭ 965 (+2374.36%)
Mutual labels:  neovim, lsp
Coc Metals
coc.nvim extension for Metals, the Scala language server
Stars: ✭ 124 (+217.95%)
Mutual labels:  neovim, lsp
Thinkvim
Vim configuration in the 21st century
Stars: ✭ 832 (+2033.33%)
Mutual labels:  neovim, lsp
Vim Language Server
VImScript language server, LSP for vim script
Stars: ✭ 264 (+576.92%)
Mutual labels:  neovim, lsp
Diagnostic Languageserver
diagnostic language server integrate with linters
Stars: ✭ 186 (+376.92%)
Mutual labels:  neovim, lsp
Nvim Lspconfig
Quickstart configurations for the Nvim LSP client
Stars: ✭ 3,410 (+8643.59%)
Mutual labels:  neovim, lsp
Coc Angular
Angular Language Service coc extension for (neo)vim
Stars: ✭ 95 (+143.59%)
Mutual labels:  neovim, lsp
Nvim Lsputils
Better defaults for nvim-lsp actions
Stars: ✭ 142 (+264.1%)
Mutual labels:  neovim, lsp
Lsp Status.nvim
Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline
Stars: ✭ 201 (+415.38%)
Mutual labels:  neovim, lsp
nvim context vt
Virtual text context for neovim treesitter
Stars: ✭ 193 (+394.87%)
Mutual labels:  neovim
Comment.nvim
🧠 💪 // Smart and powerful comment plugin for neovim. Supports treesitter, dot repeat, left-right/up-down motions, hooks, and more
Stars: ✭ 796 (+1941.03%)
Mutual labels:  neovim
nvim-goc.lua
Go Coverage for Neovim
Stars: ✭ 17 (-56.41%)
Mutual labels:  neovim
vim-paper
A personal light theme for (Neo)Vim, based on the colour of paper as found in various notebooks. This project is a read-only mirror of https://gitlab.com/yorickpeterse/vim-paper.
Stars: ✭ 53 (+35.9%)
Mutual labels:  neovim
lir.nvim
Neovim file explorer
Stars: ✭ 194 (+397.44%)
Mutual labels:  neovim
denops-deno
🐜 Deno module for denops.vim
Stars: ✭ 16 (-58.97%)
Mutual labels:  neovim
developer-workstation-setup-script
Post-install script for Fedora and RHEL 8 clones to create your ultimate development environment
Stars: ✭ 69 (+76.92%)
Mutual labels:  neovim
aurora
24-bit dark theme for (Neo)vim. Optimized for treesitter, LSP.
Stars: ✭ 141 (+261.54%)
Mutual labels:  lsp

Lsp-fastaction

A small plugin to map a lsp code action to 1 key and sort the code action

Install

Plug {'windwp/lsp-fastaction.nvim'}
--- sample for dart with flutter
require('lsp-fastaction').setup({
    hide_cursor = true,
    action_data = {
      --- action for filetype dart
        ['dart'] = {
            -- pattern is a lua regex with lower case
            { pattern = 'import library', key = 'i', order = 1 },
            { pattern = 'wrap with widget', key = 'w', order = 2 },
            { pattern = 'wrap with column', key = 'c', order = 3 },
            { pattern = 'wrap with row', key = 'r', order = 3 },
            { pattern = 'wrap with sizedbox', key = 's', order = 3 },
            { pattern = 'wrap with container', key = 'C', order = 4 },
            { pattern = 'wrap with center', key = 'E', order = 4 },
            { pattern = 'padding', key = 'P', order = 4 },
            { pattern = 'wrap with streambuilder', key = 'S', order = 5 },
            { pattern = 'remove', key = 'R', order = 5 },

            --range code action
            { pattern = "surround with %'if'", key = 'i', order = 2 },
            { pattern = 'try%-catch', key = 't', order = 2 },
            { pattern = 'for%-in', key = 'f', order = 2 },
            { pattern = 'setstate', key = 's', order = 2 },
        },
        ['typescript'] = {
            { pattern = 'to existing import declaration', key = 'a', order = 2 },
            { pattern = 'from module', key = 'i', order = 1 },
        },
    },
})

--- add this to your mapping on lsp
    vim.api.nvim_buf_set_keymap(
        bufnr,
        'n',
        '<leader>a',
        '<cmd>lua require("lsp-fastaction").code_action()<CR>'
    )
    vim.api.nvim_buf_set_keymap(
        bufnr,
        'v',
        '<leader>a',
        "<esc><cmd>lua require('lsp-fastaction').range_code_action()<CR>",
    )

🌟 Credits

Most of code I copy from telescope and octo @pwntester 😃

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].