🚧 Vastly revamped nvim with fzf and ripgrep
This commit is contained in:
parent
3b851eaefe
commit
22856a2223
7 changed files with 189 additions and 22 deletions
|
|
@ -99,6 +99,19 @@ end
|
|||
-- Enable quick-lint-js
|
||||
require('lspconfig/quick_lint_js').setup {}
|
||||
|
||||
-- Enable use of ripgrep
|
||||
require('nvim-ripgrep').setup{
|
||||
runner = require('nvim-ripgrep.run').ripgrep, -- grep command
|
||||
prompt = "❯ ", -- prompt
|
||||
window = {
|
||||
width = 0.8,
|
||||
border = "rounded",
|
||||
};
|
||||
open_qf_fn = function()
|
||||
return vim.api.nvim_command('copen')
|
||||
end,
|
||||
}
|
||||
|
||||
-- quick-lint-js detects errors in insert mode
|
||||
vim.lsp.handlers['textDocument/publishDiagnostics'] = vim.lsp.with(
|
||||
vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ keymap('n', '<a-right>', '<c-w>:tabnext<CR>', {})
|
|||
-- Use ctrl- [hl] to select the active split!
|
||||
keymap('n', '<c-h>', '<c-w>:wincmd h<CR>', {}) keymap('n', '<c-l>', '<c-w>:wincmd l<CR>', {})
|
||||
|
||||
-- open fzf
|
||||
keymap('n', '<c-p>', '<c-w>:Files<CR>', {})
|
||||
|
||||
-- Toggle NERDCommenter with Ctrl + c
|
||||
vim.cmd[[:map <C-c> <Plug>NERDCommenterToggle]]
|
||||
|
||||
|
|
@ -52,3 +55,4 @@ vim.cmd[[noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k')]]
|
|||
-- Toggle English spellcheck with F11
|
||||
vim.cmd[[nnoremap <silent> <F11> :set spell!<cr>]]
|
||||
vim.cmd[[inoremap <silent> <F11> <C-O>:set spell!<cr>]]
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@ require('packer').startup(function()
|
|||
use 'mattn/emmet-vim'
|
||||
use 'norcalli/nvim-colorizer.lua'
|
||||
use 'airblade/vim-gitgutter'
|
||||
use 'ctrlpvim/ctrlp.vim' -- fuzzy find files
|
||||
-- use 'ctrlpvim/ctrlp.vim' -- decent fuzzy find files
|
||||
use 'junegunn/fzf.vim' -- better fuzzy find files
|
||||
use 'preservim/nerdcommenter'
|
||||
use 'prettier/vim-prettier'
|
||||
use {'lewis6991/gitsigns.nvim'}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue