feat: mass pckr config
This commit is contained in:
27
nvim/.config/nvim/after/plugin/cloal.lua
Normal file
27
nvim/.config/nvim/after/plugin/cloal.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
require('cloak').setup({
|
||||
enabled = true,
|
||||
cloak_character = '*',
|
||||
-- The applied highlight group (colors) on the cloaking, see `:h highlight`.
|
||||
highlight_group = 'Comment',
|
||||
-- Applies the length of the replacement characters for all matched
|
||||
-- patterns, defaults to the length of the matched pattern.
|
||||
cloak_length = nil, -- Provide a number if you want to hide the true length of the value.
|
||||
-- Whether it should try every pattern to find the best fit or stop after the first.
|
||||
try_all_patterns = true,
|
||||
patterns = {
|
||||
{
|
||||
-- Match any file starting with '.env'.
|
||||
-- This can be a table to match multiple file patterns.
|
||||
file_pattern = '.env*',
|
||||
-- Match an equals sign and any character after it.
|
||||
-- This can also be a table of patterns to cloak,
|
||||
-- example: cloak_pattern = { ':.+', '-.+' } for yaml files.
|
||||
cloak_pattern = '=.+',
|
||||
-- A function, table or string to generate the replacement.
|
||||
-- The actual replacement will contain the 'cloak_character'
|
||||
-- where it doesn't cover the original text.
|
||||
-- If left empty the legacy behavior of keeping the first character is retained.
|
||||
replace = nil,
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -6,6 +6,7 @@ mason.setup({})
|
||||
mason_lspconfig.setup({
|
||||
ensure_installed = {
|
||||
'ruby_ls',
|
||||
'rubocop',
|
||||
'tsserver',
|
||||
'lua_ls',
|
||||
},
|
||||
@@ -42,7 +43,7 @@ lsp.on_attach(function(_client, bufnr)
|
||||
vim.keymap.set('n', '<leader>vca', function() vim.lsp.buf.code_action() end, opts)
|
||||
vim.keymap.set('n', '<leader>vrr', function() vim.lsp.buf.references() end, opts)
|
||||
vim.keymap.set('n', '<leader>vrn', function() vim.lsp.buf.rename() end, opts)
|
||||
vim.keymap.set('n', '<C-h>', function() vim.lsp.buf.signature_help() end, opts)
|
||||
vim.keymap.set('n', '<leader>vrh', function() vim.lsp.buf.signature_help() end, opts)
|
||||
end)
|
||||
|
||||
lsp.setup()
|
||||
|
||||
20
nvim/.config/nvim/after/plugin/ruby.lua
Normal file
20
nvim/.config/nvim/after/plugin/ruby.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
require('rspec').setup({
|
||||
allowed_file_format = function(filename)
|
||||
return vim.endswith(filename, '_spec.rb')
|
||||
end,
|
||||
|
||||
formatter = 'progress',
|
||||
focus_on_last_spec_result_window = true,
|
||||
open_quickfix_when_spec_failed = true,
|
||||
last_result_path = vim.fn.stdpath('data') .. '/rspec_last_result',
|
||||
last_failed_result_path = vim.fn.stdpath('data') .. '/rspec_last_failed_result',
|
||||
jump_command = 'edit',
|
||||
ignored_dirs_on_jump = {},
|
||||
})
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.keymap.set("n", "<leader>rn", ":RSpecNearest<CR>", opts)
|
||||
vim.keymap.set("n", "<leader>rcf", ":RSpecCurrentFile<CR>", opts)
|
||||
vim.keymap.set("n", "<leader>rr", ":RSpecRerun<CR>", opts)
|
||||
vim.keymap.set("n", "<leader>rof", ":RSpecOnlyFailures<CR>", opts)
|
||||
vim.keymap.set("n", "<leader>rslr", ":RSpecShowLastResult<CR>", opts)
|
||||
1
nvim/.config/nvim/after/plugin/surround.lua
Normal file
1
nvim/.config/nvim/after/plugin/surround.lua
Normal file
@@ -0,0 +1 @@
|
||||
require('nvim-surround').setup({})
|
||||
@@ -1,6 +1,53 @@
|
||||
local telescope = require('telescope')
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
-- Borrowed from https://stackoverflow.com/a/76991432/513872
|
||||
telescope.setup{
|
||||
defaults = {
|
||||
-- configure to use ripgrep
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"--follow", -- Follow symbolic links
|
||||
"--hidden", -- Search for hidden files
|
||||
"--no-heading", -- Don't group matches by each file
|
||||
"--with-filename", -- Print the file path with the matched lines
|
||||
"--line-number", -- Show line numbers
|
||||
"--column", -- Show column numbers
|
||||
"--smart-case", -- Smart case search
|
||||
|
||||
-- Exclude some patterns from search
|
||||
"--glob=!**/.git/*",
|
||||
"--glob=!**/.idea/*",
|
||||
"--glob=!**/.vscode/*",
|
||||
"--glob=!**/build/*",
|
||||
"--glob=!**/dist/*",
|
||||
"--glob=!**/yarn.lock",
|
||||
"--glob=!**/package-lock.json",
|
||||
},
|
||||
},
|
||||
pickers = {
|
||||
find_files = {
|
||||
hidden = true,
|
||||
-- needed to exclude some files & dirs from general search
|
||||
-- when not included or specified in .gitignore
|
||||
find_command = {
|
||||
"rg",
|
||||
"--files",
|
||||
"--hidden",
|
||||
"--glob=!**/.git/*",
|
||||
"--glob=!**/.idea/*",
|
||||
"--glob=!**/.vscode/*",
|
||||
"--glob=!**/build/*",
|
||||
"--glob=!**/dist/*",
|
||||
"--glob=!**/yarn.lock",
|
||||
"--glob=!**/package-lock.json",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
|
||||
vim.keymap.set('n', '<leader>ps', function()
|
||||
builtin.grep_string({ search = vim.fn.input("Grep > ") });
|
||||
builtin.grep_string({ search = vim.fn.input("Grep > ") });
|
||||
end)
|
||||
|
||||
@@ -17,10 +17,10 @@ end
|
||||
bootstrap_pckr()
|
||||
|
||||
require('pckr').add{
|
||||
{ 'nvim-telescope/telescope.nvim', requires = { 'nvim-lua/plenary.nvim' } },
|
||||
{ 'kepano/flexoki-neovim' },
|
||||
{ 'nvim-telescope/telescope.nvim', requires = { 'nvim-lua/plenary.nvim' } },
|
||||
'kepano/flexoki-neovim',
|
||||
{ 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' },
|
||||
{ 'mbbill/undotree' },
|
||||
'mbbill/undotree',
|
||||
{
|
||||
'VonHeikemen/lsp-zero.nvim',
|
||||
requires = {
|
||||
@@ -37,5 +37,9 @@ require('pckr').add{
|
||||
{ 'saadparwaiz1/cmp_luasnip' },
|
||||
},
|
||||
},
|
||||
{ 'zbirenbaum/copilot-cmp', requires = { 'github/copilot.lua' } },
|
||||
'f-person/git-blame.nvim',
|
||||
'github/copilot.vim',
|
||||
'laytan/cloak.nvim',
|
||||
'kylechui/nvim-surround',
|
||||
'mogulla3/rspec.nvim',
|
||||
}
|
||||
|
||||
@@ -12,3 +12,8 @@ vim.keymap.set('n', '<leader>y', "\"+y")
|
||||
vim.keymap.set('v', '<leader>y', "\"+y")
|
||||
vim.keymap.set('n', '<leader>Y', "\"+Y")
|
||||
|
||||
-- Split navigation
|
||||
vim.keymap.set('n', '<C-h>', '<C-w>h')
|
||||
vim.keymap.set('n', '<C-j>', '<C-w>j')
|
||||
vim.keymap.set('n', '<C-k>', '<C-w>k')
|
||||
vim.keymap.set('n', '<C-l>', '<C-w>l')
|
||||
|
||||
Reference in New Issue
Block a user