Add ThePrimeagen/refactoring plugin
This commit is contained in:
parent
1b24928252
commit
8916794b46
2 changed files with 71 additions and 58 deletions
11
after/plugin/refactoring.lua
Normal file
11
after/plugin/refactoring.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
require('refactoring').setup()
|
||||||
|
|
||||||
|
vim.keymap.set("x", "<leader>re", ":Refactor extract ")
|
||||||
|
vim.keymap.set("x", "<leader>rf", ":Refactor extract_to_file ")
|
||||||
|
|
||||||
|
vim.keymap.set("x", "<leader>rv", ":Refactor extract_var ")
|
||||||
|
|
||||||
|
vim.keymap.set({ "n", "x" }, "<leader>ri", ":Refactor inline_var")
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>rb", ":Refactor extract_block")
|
||||||
|
vim.keymap.set("n", "<leader>rbf", ":Refactor extract_block_to_file")
|
||||||
|
|
@ -4,72 +4,74 @@
|
||||||
vim.cmd.packadd('packer.nvim')
|
vim.cmd.packadd('packer.nvim')
|
||||||
|
|
||||||
return require('packer').startup(function(use)
|
return require('packer').startup(function(use)
|
||||||
-- Packer can manage itself
|
-- Packer can manage itself
|
||||||
use 'wbthomason/packer.nvim'
|
use 'wbthomason/packer.nvim'
|
||||||
|
|
||||||
use {
|
use {
|
||||||
'nvim-telescope/telescope.nvim', tag = '0.1.0',
|
'nvim-telescope/telescope.nvim', tag = '0.1.0',
|
||||||
-- or , branch = '0.1.x',
|
-- or , branch = '0.1.x',
|
||||||
requires = { {'nvim-lua/plenary.nvim'} }
|
requires = { {'nvim-lua/plenary.nvim'} }
|
||||||
}
|
}
|
||||||
|
|
||||||
use({
|
use({
|
||||||
'rose-pine/neovim',
|
'rose-pine/neovim',
|
||||||
as = 'rose-pine',
|
as = 'rose-pine',
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd('colorscheme rose-pine')
|
vim.cmd('colorscheme rose-pine')
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
use('vuciv/vim-bujo')
|
use('vuciv/vim-bujo')
|
||||||
|
|
||||||
use({
|
use({
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("trouble").setup {
|
require("trouble").setup {
|
||||||
icons = false,
|
icons = false,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
use {
|
use('ThePrimeagen/refactoring.nvim')
|
||||||
'nvim-treesitter/nvim-treesitter',
|
|
||||||
run = function()
|
|
||||||
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
|
|
||||||
ts_update()
|
|
||||||
end,}
|
|
||||||
use("nvim-treesitter/playground")
|
|
||||||
use("mbbill/undotree")
|
|
||||||
use("tpope/vim-fugitive")
|
|
||||||
use("nvim-treesitter/nvim-treesitter-context");
|
|
||||||
|
|
||||||
use {
|
use {
|
||||||
'VonHeikemen/lsp-zero.nvim',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
branch = 'v1.x',
|
run = function()
|
||||||
requires = {
|
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
|
||||||
-- LSP Support
|
ts_update()
|
||||||
{'neovim/nvim-lspconfig'},
|
end,}
|
||||||
{'williamboman/mason.nvim'},
|
use("nvim-treesitter/playground")
|
||||||
{'williamboman/mason-lspconfig.nvim'},
|
use("mbbill/undotree")
|
||||||
|
use("tpope/vim-fugitive")
|
||||||
|
use("nvim-treesitter/nvim-treesitter-context");
|
||||||
|
|
||||||
-- Autocompletion
|
use {
|
||||||
{'hrsh7th/nvim-cmp'},
|
'VonHeikemen/lsp-zero.nvim',
|
||||||
{'hrsh7th/cmp-buffer'},
|
branch = 'v1.x',
|
||||||
{'hrsh7th/cmp-path'},
|
requires = {
|
||||||
{'saadparwaiz1/cmp_luasnip'},
|
-- LSP Support
|
||||||
{'hrsh7th/cmp-nvim-lsp'},
|
{'neovim/nvim-lspconfig'},
|
||||||
{'hrsh7th/cmp-nvim-lua'},
|
{'williamboman/mason.nvim'},
|
||||||
|
{'williamboman/mason-lspconfig.nvim'},
|
||||||
|
|
||||||
-- Snippets
|
-- Autocompletion
|
||||||
{'L3MON4D3/LuaSnip'},
|
{'hrsh7th/nvim-cmp'},
|
||||||
{'rafamadriz/friendly-snippets'},
|
{'hrsh7th/cmp-buffer'},
|
||||||
}
|
{'hrsh7th/cmp-path'},
|
||||||
}
|
{'saadparwaiz1/cmp_luasnip'},
|
||||||
|
{'hrsh7th/cmp-nvim-lsp'},
|
||||||
|
{'hrsh7th/cmp-nvim-lua'},
|
||||||
|
|
||||||
use("folke/zen-mode.nvim")
|
-- Snippets
|
||||||
use("github/copilot.vim")
|
{'L3MON4D3/LuaSnip'},
|
||||||
use("eandrju/cellular-automaton.nvim")
|
{'rafamadriz/friendly-snippets'},
|
||||||
use("laytan/cloak.nvim")
|
}
|
||||||
|
}
|
||||||
|
|
||||||
end)
|
use("folke/zen-mode.nvim")
|
||||||
|
use("github/copilot.vim")
|
||||||
|
use("eandrju/cellular-automaton.nvim")
|
||||||
|
use("laytan/cloak.nvim")
|
||||||
|
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue