Compare commits

...

4 Commits

Author SHA1 Message Date
Jasper Bok 9c83b4f6ca Add telescope plugin to neovim 2024-02-27 18:12:35 +01:00
Jasper Bok 0a132c2628 Update config for indent blankline plugin for neovim
The module name has changed in a recent release, so the setup code had to be updated as well.
2024-02-27 18:10:58 +01:00
Jasper Bok c421a7451b Add Asciidoc augroup to neovim config 2024-02-27 18:09:47 +01:00
Jasper Bok 4b79b603d3 Add JSON augroup to neovim config 2024-02-27 18:09:33 +01:00
1 changed files with 25 additions and 1 deletions

View File

@ -78,6 +78,20 @@ vim.api.nvim_create_autocmd('FileType', {
command = 'setlocal tabstop=3|setlocal shiftwidth=3|setlocal softtabstop=3|setlocal tw=72'
})
local json_augroup = vim.api.nvim_create_augroup('filetype_json', {clear = true})
vim.api.nvim_create_autocmd('FileType', {
pattern = 'json',
group = json_augroup,
command = 'setlocal tabstop=2|setlocal shiftwidth=2|setlocal softtabstop=2'
})
local asciidoc_augroup = vim.api.nvim_create_augroup('filetype_asciidoc', {clear = true})
vim.api.nvim_create_autocmd('FileType', {
pattern = 'asciidoc',
group = asciidoc_augroup,
command = 'setlocal tabstop=2|setlocal shiftwidth=2|setlocal softtabstop=2|setlocal tw=72|setlocal spell|setlocal spelllang=nl'
})
-- ----------------------------------
-- Plugins
-- ----------------------------------
@ -86,6 +100,8 @@ local Plug = vim.fn["plug#"]
vim.call("plug#begin", "~/.config/nvim/plugged")
Plug('nvim-lua/plenary.nvim') -- Requirement for telescope.
Plug('nvim-telescope/telescope.nvim', {tag = '0.1.5' })
Plug('numToStr/Comment.nvim')
Plug('junegunn/fzf')
Plug('arcticicestudio/nord-vim')
@ -111,6 +127,14 @@ require("Comment").setup()
-- ------------------
vim.cmd("nnoremap <C-p> :FZF<CR>")
-- Telescope
-- ------------------
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
-- nnn
-- ------------------
@ -126,4 +150,4 @@ vim.cmd("let g:nnn#session = 'global'")
-- indent-blankline
-- ------------------
require('indent_blankline').setup()
require('ibl').setup()