progress refactoring nvim lint and commands/config

main
Steffen Rademacker 8 months ago
parent 2254192680
commit fabd3329e6

@ -8,8 +8,11 @@ insert_final_newline = true
indent_style = space
indent_size = 2
[*.{php,css,scss,sass,js,json,json5,jsx,ts,tsx,html,twig,yml,svg,lua}]
[*.{php,css,scss,sass,js,json,json5,jsx,ts,tsx,html,twig,yml,yaml,svg,lua}]
trim_trailing_whitespace = true
[*.{md,markdown,rst,txt,csv,snip,mail}]
trim_trailing_whitespace = false
[neomutt-*]
trim_trailing_whitespace = false

@ -8,8 +8,9 @@ pip install neovim
ln -s ~/dotfiles/nvim ~/.config/nvim
# additional language-servers for nvim-lspconfig
npm install -g eslint_d
npm install -g fixjson
npm install -g eslint_d
npm install -g jsonlint
npm install -g markdownlint-cli
npm install -g neovim
npm install -g stylelint

@ -1,3 +0,0 @@
local setlocal = vim.opt_local
setlocal.iskeyword:append('-')

@ -1,3 +0,0 @@
local setlocal = vim.opt_local
setlocal.iskeyword:append('-')

@ -1,3 +0,0 @@
local setlocal = vim.opt_local
setlocal.iskeyword:append('-')

@ -1,8 +0,0 @@
local setlocal = vim.opt_local
setlocal.comments:append('nb:>')
setlocal.formatoptions:append('awq')
setlocal.spell = true
setlocal.spelllang = { 'de', 'en' }
setlocal.wrap = true
setlocal.textwidth = 70

@ -1,7 +0,0 @@
local setlocal = vim.opt_local
setlocal.spell = true
setlocal.spelllang = { 'de', 'en' }
setlocal.wrap = true
setlocal.textwidth = 70
setlocal.formatoptions:append('q')

@ -1,3 +0,0 @@
local setlocal = vim.opt_local
setlocal.iskeyword:append('-')

@ -1,16 +1,39 @@
local cmd = vim.cmd
local setlocal = vim.opt_local
local create = vim.api.nvim_create_autocmd
cmd([[
augroup init
autocmd!
vim.cmd([[
" Remember last location/cursor in file
autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
" Remember last location/cursor in file
autocmd BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
" Autoresize windows/splits when vim resizes
autocmd VimResized * wincmd =
]])
" Autoresize windows/splits when vim resizes
autocmd VimResized * wincmd =
-- make dash-spearated-key"ords on "word" in vim
create({ 'BufEnter', 'BufWinEnter' }, {
pattern = { '*.css', '*.scss', '*.json' },
callback = function() setlocal.iskeyword:append('-') end,
})
-- filetype-specific settings for text-files
create({ 'BufEnter', 'BufWinEnter' }, {
pattern = { '*.md', '*.markdown', '*.rst', '*.txt', 'neomutt-*', '*.mail' },
callback = function()
setlocal.spell = true
setlocal.spelllang = { 'de', 'en' }
setlocal.wrap = true
setlocal.textwidth = 70
setlocal.formatoptions:append('q')
end,
})
-- filetype-specific settings for mails
create({ 'BufEnter', 'BufWinEnter' }, {
pattern = { 'neomutt-*', '*.mail' },
callback = function()
setlocal.filetype = 'mail'
setlocal.comments:append('nb:>')
setlocal.formatoptions:append('aw')
end,
})
" When opening temporary mails in mutt, automatically set filetype to mail
autocmd BufNewFile,BufRead neomutt-* set ft=mail
augroup END
]])

@ -0,0 +1,7 @@
require('colorizer').setup({
css = { css = true },
scss = { css = true },
json = { css = true},
json5 = { css = true, },
javascript = { css = true },
})

@ -0,0 +1,26 @@
require('lint').linters_by_ft = {
markdown = { 'markdownlint' },
php = { 'php' },
yaml = { 'yamllint' },
css = { 'stylelint' },
scss = { 'stylelint' },
json = { 'fixjson' },
javascript = { 'eslint_d' },
javascriptreact = { 'eslint_d' },
typescript = { 'tsc', 'eslint_d' },
typescriptreact = { 'tsc', 'eslint_d' },
}
vim.api.nvim_create_autocmd({ 'BufWritePost' }, {
pattern = {
'*.js', '*.ts', '*.jsx', '*.tsx',
'*.yml', '*.yaml',
'*.md', '*.markdown',
'*.php',
'*.css', '*.scss',
'*.json',
},
callback = function()
require('lint').try_lint()
end,
})

@ -0,0 +1,10 @@
require('lualine').setup({
sections = {
lualine_b = { 'branch' },
lualine_x = {},
lualine_y = { 'diff', 'diagnostics' },
},
options = {
theme = 'gruvbox'
},
})

@ -0,0 +1,14 @@
require('neorg').setup({
load = {
['core.concealer'] = {},
['core.defaults'] = {},
['core.dirman'] = {
config = {
default_workspace = 'notes',
workspaces = {
notes = '~/Notes',
},
},
},
},
})

@ -4,23 +4,10 @@ local b = null_ls.builtins
-- register any number of sources simultaneously
local sources = {
-- js and friends via eslint_d
b.diagnostics.eslint_d,
b.formatting.eslint_d,
b.code_actions.eslint_d,
-- css and scss-files
b.diagnostics.stylelint.with({ prefer_local = 'node_modules/.bin' }),
b.formatting.stylelint.with({ prefer_local = 'node_modules/.bin' }),
-- markdown
b.diagnostics.markdownlint,
b.formatting.markdownlint,
-- other languages
b.diagnostics.php,
b.diagnostics.tsc,
b.diagnostics.yamllint,
b.formatting.fixjson,
b.code_actions.eslint_d,
}
null_ls.setup({

@ -0,0 +1,10 @@
require('zen-mode').setup({
window = {
backdrop = 0.95,
width = 120,
height = 0.85,
},
plugins = {
gitsigns = { enabled = true },
},
})

@ -7,103 +7,100 @@ local map = function(mode, lhs, rhs, opts)
}))
end
-- remap semi-colon to be colon in normal an visual mode
map('n', ';', ':')
map('v', ';', ':')
-- deactivate ex-mode and man-pages
map('n', 'Q', '')
map('n', 'K', '')
-- keeping it centered when search/jumping to next/prev entry
map('n', 'n', 'nzzzv')
map('n', 'N', 'Nzzzv')
-- j and k for wrapped lines
map('n', 'j', 'gj')
map('n', 'k', 'gk')
-- captial Y to yank till line end in normal mode
map('n', 'Y', 'y$')
-- Swap v and CTRL-V, because Block mode is more useful
map('n', 'v', '<C-V>')
map('n', '<C-V>', 'v')
map('v', 'v', '<C-V>')
map('v', '<C-V>', 'v')
local wk = require('which-key')
wk.register({
['-'] = { '<cmd>FloatermNew nnn<cr>', 'invoke floaterm with nnn as file picker' },
[';'] = { ':', 'Colon with semicolon' },
['<F5>'] = { '<cmd>checktime<cr><cmd>redraw!<cr>', 'redraw/reload with F5' },
['<up>'] = { '<cmd>bfirst<cr>', 'buffer navigation with arrow keys' },
['<right>'] = { '<cmd>bnext<cr>', 'buffer navigation with arrow keys' },
['<down>'] = { '<cmd>blast<cr>', 'buffer navigation with arrow keys' },
['<left>'] = { '<cmd>bprevious<cr>', 'buffer navigation with arrow keys' },
g = {
b = { '<cmd>Gitsigns blame_line<cr>', '' },
f = { '<cmd>execute "/\\v^[<\\|=>]{7}/"<cr>', '' },
d = { '<cmd>lua vim.lsp.buf.definition()<cr>', 'show/go to definition' },
i = { '<cmd>lua vim.lsp.buf.implementation()<cr>', 'show/go to implementation' },
r = { '<cmd>lua vim.lsp.buf.references()<cr>', 'show/go to referennces' },
},
K = { '', 'K man-pages mapping removed' },
j = { 'gj', 'j and k with wrapped lines' },
k = { 'gk', 'j and k with wrapped lines' },
n = { 'nzzzv', 'kepping it centered with n' },
v = { '<C-V>', 'remapping visual/visual-block mode' },
s = { function() require('flash').jump() end, 'flash jump' },
N = { 'Nzzzv', 'kepping it centered with N' },
Q = { '', 'Q ex-mode-mapping removed' },
S = { function() require('flash').treesitter() end, 'flash treesitter select' },
Y = { 'y$', 'yank till end of line with Y'},
-- all normal mode leader key mappings in one place
['<leader>'] = {
[','] = { '<cmd>Telescope find_files<cr>', '' },
['-'] = { '<C-w>s<C-w>j', '' },
['.'] = { '<cmd>Telescope buffers<cr>', '' },
['/'] = { '<cmd>Telescope search_history<cr>', '' },
[';'] = { '<cmd>Telescope command_history<cr>', '' },
['\''] = { '<cmd>Telescope git_files<cr>', '' },
['\\'] = { '<C-w>v<C-w>l', '' },
[']'] = { '<cmd>Telescope current_buffer_fuzzy_find<cr>', '' },
a = { '<cmd>Telescope live_grep<cr>', '' },
b = { '<cmd>Telescope git_branches<cr>', '' },
c = { '<cmd>Telescope git_bcommits<cr>', '' },
d = { '<cmd>lua vim.lsp.buf.declaration()<cr>', '' },
e = { '<cmd>lua vim.diagnostic.goto_next()<cr>', '' },
f = { '<cmd>lua vim.lsp.buf.formatting()<cr>', '' },
h = { '<cmd>lua vim.lsp.buf.hover()<cr>', '' },
r = { '<cmd>lua vim.lsp.buf.rename()<cr>', '' },
x = { '<cmd>lua vim.lsp.buf.code_action()<cr>', '' },
l = { '<cmd>FloatermNew lazygit<cr>', '' },
t = { '<cmd>FloatermNew<cr>', '' },
v = {
ve = { '<cmd>e $MYVIMRC<cr>', '' },
vr = { '<cmd>source $MYVIMRC<cr>', '' },
},
w = { '<cmd>set wrap! wrap?<cr>', '' },
},
-- with <CTRL> as modifier
['<C-h>'] = { '<cmd>NavigatorLeft<cr>', '' },
['<C-j>'] = { '<cmd>NavigatorDown<cr>', '' },
['<C-k>'] = { '<cmd>NavigatorUp<cr>', '' },
['<C-l>'] = { '<cmd>NavigatorRight<cr>', '' },
['<C-V>'] = { 'v', '' },
-- with <ALT/META> as modifier
['<M-k>'] = { ':move .-2<cr>', 'bubbling lines with alt-hjkl', noremap = false },
['<M-j>'] = { ':move .+1<cr>', 'bubbling lines with alt-hjkl', noremap = false },
['<M-h>'] = { '<<', 'bubbling lines with alt-hjkl', noremap = false },
['<M-l>'] = { '>>', 'bubbling lines with alt-hjkl', noremap = false },
})
-- non-normal-mode mappings
wk.register({
[';'] = { ':', 'Colon with semicolon' },
v = { '<C-V>', 'remapping visual/visual-block mode', },
-- with <CTRL> as modifier
['<C-V>'] = { 'v', 'remapping visual/visual-block mode' },
-- with <ALT/META> as modifier
['<M-k>'] = { ":move '<-2<cr>gv", 'bubbling lines with alt-hjkl', noremap = false },
['<M-j>'] = { ":move '>+1<cr>gv", 'bubbling lines with alt-hjkl', noremap = false },
['<M-h>'] = { '<gv', 'bubbling lines with alt-hjkl', noremap = false },
['<M-l>'] = { '>gv', 'bubbling lines with alt-hjkl', noremap = false },
}, { mode = 'v' })
wk.register({
['<C-j>'] = { 'vsnip#available(-1) ? "<Plug>(vsnip-jump-prev)" : "<C-j>"', 'snippet expansion' },
}, { mode = 's', expr = true, noremap = true })
-- add undo-repo-breakpoints automatically when writing long text
map('i', ',', ',<c-g>u')
map('i', '.', '.<c-g>u')
map('i', '!', '!<c-g>u')
map('i', '?', '?<c-g>u')
-- bubbling of lines/selections with alt + hjkl
map('n', '<M-k>', ':move .-2<cr>', { noremap = false })
map('n', '<M-j>', ':move .+1<cr>', { noremap = false })
map('n', '<M-h>', '<<', { noremap = false })
map('n', '<M-l>', '>>', { noremap = false })
map('v', '<M-k>', ":move '<-2<cr>gv", { noremap = false })
map('v', '<M-j>', ":move '>+1<cr>gv", { noremap = false })
map('v', '<M-h>', '<gv', { noremap = false })
map('v', '<M-l>', '>gv', { noremap = false })
-- use the arrowkeys for usefull stuff in normal mode -- switching buffers
map('n', '<up>', '<cmd>bfirst<cr>')
map('n', '<down>', '<cmd>blast<cr>')
map('n', '<left>', '<cmd>bp<cr>')
map('n', '<right>', '<cmd>bn<cr>')
-- easieser splits
map('n', '<leader>\\', '<C-w>v<C-w>l')
map('n', '<leader>-', '<C-w>s<C-w>j')
-- Telescope
map('n', '<leader>\'', '<cmd>Telescope git_files<cr>')
map('n', '<leader>,', '<cmd>Telescope find_files<cr>')
map('n', '<leader>.', '<cmd>Telescope buffers<cr>')
map('n', '<leader>/', '<cmd>Telescope search_history<cr>')
map('n', '<leader>;', '<cmd>Telescope command_history<cr>')
map('n', '<leader>a', '<cmd>Telescope live_grep<cr>')
map('n', '<leader>b', '<cmd>Telescope git_branches<cr>')
map('n', '<leader>c', '<cmd>Telescope git_bcommits<cr>')
map('n', '<leader>]', '<cmd>Telescope current_buffer_fuzzy_find<cr>')
-- lsp and diagnostics
map('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>')
map('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>')
map('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>')
map('n', '<leader>d', '<cmd>lua vim.lsp.buf.declaration()<cr>')
map('n', '<leader>e', '<cmd>lua vim.diagnostic.goto_next()<cr>')
map('n', '<leader>f', '<cmd>lua vim.lsp.buf.formatting()<cr>')
map('n', '<leader>h', '<cmd>lua vim.lsp.buf.hover()<cr>')
map('n', '<leader>r', '<cmd>lua vim.lsp.buf.rename()<cr>')
map('n', '<leader>x', '<cmd>lua vim.lsp.buf.code_action()<cr>')
-- git
map('n', '<leader>l', '<cmd>FloatermNew lazygit<cr>')
map('n', '<leader>gb', '<cmd>Gitsigns blame_line<cr>')
map('n', '<leader>gf', "<cmd>execute '/\\v^[<\\|=>]{7}/'<cr>")
-- floaterm
map('n', '-', '<cmd>FloatermNew nnn<cr>')
map('n', '<leader>t', '<cmd>FloatermNew<cr>')
-- vsnip snippets expansion
map('i', '<C-j>', 'vsnip#available(1) ? "<Plug>(vsnip-expand-or-jump)" : "<C-j>"', { expr = true, noremap = false })
map('s', '<C-j>', 'vsnip#available(-1) ? "<Plug>(vsnip-jump-prev)" : "<C-j>"', { expr = true, noremap = false })
-- other useful mappings
map('n', '<F5>', '<cmd>checktime<cr><cmd>redraw!<cr>');
map('n', '<leader>ve', '<cmd>e $MYVIMRC<cr>')
map('n', '<leader>vr', '<cmd>source $MYVIMRC<cr>')
map('n', '<leader>w', '<cmd>set wrap! wrap?<cr>')
-- Navigator.nvim
map('n', '<C-h>', '<cmd>NavigatorLeft<cr>')
map('n', '<C-j>', '<cmd>NavigatorDown<cr>')
map('n', '<C-k>', '<cmd>NavigatorUp<cr>')
map('n', '<C-l>', '<cmd>NavigatorRight<cr>')
-- FTerm.nvim
-- map('n', '-', '<cmd>lua require("FTerm").run("nnn")<cr>')
-- TODO only for prose (mail md etc)
-- map('i', ',', ',<c-g>u')
-- map('i', '.', '.<c-g>u')
-- map('i', '!', '!<c-g>u')
-- map('i', '?', '?<c-g>u')

@ -1,56 +1,46 @@
local set = vim.opt
local cmd = vim.cmd
local g = vim.g
-- deactivate some unneeded language providers
g.loaded_python_provider = 0
g.loaded_perl_provider = 0
-- general options
set.breakindent = true
set.clipboard = 'unnamedplus'
set.cmdheight = 1
set.completeopt = { 'menu', 'menuone', 'noselect' }
set.conceallevel = 2
set.cpoptions:append('$')
set.cursorline = true
set.foldexpr = 'nvim_treesitter#foldexpr()'
set.foldmethod = 'expr'
set.gdefault = true
set.grepprg = 'rg'
set.hidden = true
set.ignorecase = true
set.infercase = true
set.laststatus = 3
set.lazyredraw = true
set.list = true
set.listchars = 'extends:»,precedes:«,tab:▸ ,trail:·'
set.foldenable = false
set.showmode = false
set.swapfile = false
set.wrap = false
set.writebackup = false
set.relativenumber = true
set.scrolljump = 5
set.scrolloff = 3
set.shiftround = true
set.shiftwidth = 2
set.shortmess:append('c')
set.showbreak = '\\\\\\\\'
set.showmatch = true
set.sidescroll = 10
set.sidescrolloff = 5
set.smartcase = true
set.splitright = true
set.splitbelow = true
set.updatetime = 300
set.virtualedit = 'all'
set.visualbell = true
set.wildmode = { 'list:longest', 'list:full' }
vim.opt.breakindent = true
vim.opt.clipboard = 'unnamedplus'
vim.opt.cmdheight = 1
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
vim.opt.conceallevel = 2
vim.opt.cpoptions:append('$')
vim.opt.cursorline = true
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
vim.opt.foldmethod = 'expr'
vim.opt.gdefault = true
vim.opt.grepprg = 'rg'
vim.opt.hidden = true
vim.opt.ignorecase = true
vim.opt.infercase = true
vim.opt.laststatus = 3
vim.opt.lazyredraw = true
vim.opt.list = true
vim.opt.listchars = 'extends:»,precedes:«,tab:▸ ,trail:·'
vim.opt.foldenable = false
vim.opt.showmode = false
vim.opt.swapfile = false
vim.opt.wrap = false
vim.opt.writebackup = false
vim.opt.relativenumber = true
vim.opt.scrolljump = 5
vim.opt.scrolloff = 3
vim.opt.shiftround = true
vim.opt.shiftwidth = 2
vim.opt.shortmess:append('c')
vim.opt.showbreak = '\\\\\\\\'
vim.opt.showmatch = true
vim.opt.sidescroll = 10
vim.opt.sidescrolloff = 5
vim.opt.smartcase = true
vim.opt.splitright = true
vim.opt.splitbelow = true
vim.opt.timeoutlen = 300
vim.opt.updatetime = 300
vim.opt.virtualedit = 'all'
vim.opt.visualbell = true
vim.opt.wildmode = { 'list:longest', 'list:full' }
-- colorscheme and default language
set.background = 'dark'
set.termguicolors = true
g.gruvbox_baby_telescope_theme = 1
cmd 'colorscheme gruvbox-baby'
cmd 'language en_US.UTF-8'
vim.g.gruvbox_baby_telescope_theme = 1
vim.cmd 'colorscheme gruvbox-baby'
vim.cmd 'language en_US.UTF-8'

@ -3,38 +3,35 @@ local function get_config (key)
return function() require('config/' .. key) end
end
-- ensure folke/lazy.nvim is being loaded
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ 'git', 'clone', '--filter=blob:none', 'https://github.com/folke/lazy.nvim.git', '--branch=stable', lazypath })
end
vim.opt.rtp:prepend(lazypath)
-- Make sure to set mapleader before lazy.nvim so your mappings are correct
-- minimum starter options and settings before loading plugins
vim.api.nvim_set_keymap('n', '<space>', '', {})
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.g.loaded_python_provider = 0
vim.g.loaded_perl_provider = 0
vim.opt.rtp:prepend(lazypath)
vim.opt.background = 'dark'
vim.opt.termguicolors = true
require('lazy').setup({
-- The colorscheme of choice
{ 'luisiacc/gruvbox-baby', priority = 1000 },
-- modern neovim with treesitter + refactor/objects, lsp,
-- floaterm-integration (nnn, lazygit...)
-- telescope and cmp as completion engine, vsnip-support
{ 'voldikss/vim-floaterm', init = get_config('floaterm') },
{ 'nvim-treesitter/nvim-treesitter', init = get_config('treesitter'), build = ':TSUpdate' },
{ 'nvim-treesitter/nvim-treesitter-textobjects', dependencies = { 'nvim-treesitter/nvim-treesitter' } },
{ 'nvim-treesitter/nvim-treesitter-refactor', dependencies = { 'nvim-treesitter/nvim-treesitter' } },
{ 'neovim/nvim-lspconfig', init = get_config('lspconfig') },
{ 'nvim-telescope/telescope.nvim', init = get_config('telescope'), dependencies = { 'nvim-lua/plenary.nvim' } },
-- modern neovim with treesitter, lsp, cmp, vsnips and telescope
{ 'neovim/nvim-lspconfig', config = get_config('lspconfig') },
{ 'nvim-treesitter/nvim-treesitter', config = get_config('treesitter'), build = ':TSUpdate' },
{ 'nvim-treesitter/nvim-treesitter-textobjects', dependencies = 'nvim-treesitter/nvim-treesitter' },
{ 'nvim-treesitter/nvim-treesitter-refactor', dependencies = 'nvim-treesitter/nvim-treesitter' },
{ 'nvim-telescope/telescope.nvim', dependencies = 'nvim-lua/plenary.nvim', config = get_config('telescope') },
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
{ 'hrsh7th/vim-vsnip', init = get_config('vsnip') },
{ 'rafamadriz/friendly-snippets', dependencies = { 'hrsh7th/vim-vsnip' } },
{
'hrsh7th/nvim-cmp',
init = get_config('cmp'),
{ 'hrsh7th/vim-vsnip', config = get_config('vsnip') },
{ 'rafamadriz/friendly-snippets', dependencies = 'hrsh7th/vim-vsnip' },
{ 'hrsh7th/nvim-cmp',
dependencies = {
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-cmdline',
@ -43,109 +40,44 @@ require('lazy').setup({
'hrsh7th/cmp-path',
'hrsh7th/cmp-vsnip',
},
config = get_config('cmp'),
},
-- TODO replace null-ls with nvim-lint
{ 'jose-elias-alvarez/null-ls.nvim', init = get_config('null-ls'), dependencies = { 'nvim-lua/plenary.nvim' } },
-- interface enhancements
{ 'folke/which-key.nvim', event = 'VeryLazy', config = true },
{ 'folke/zen-mode.nvim', dependencies = 'folke/twilight.nvim', config = get_config('zen-mode') },
{ 'kevinhwang91/nvim-bqf', config = true },
{ 'lewis6991/gitsigns.nvim', config = true },
{ 'norcalli/nvim-colorizer.lua', event = 'BufReadPre', config = get_config('colorizer') },
{ 'nvim-lualine/lualine.nvim', dependencies = 'nvim-tree/nvim-web-devicons', config = get_config('lualine') },
-- editing / moving enhancements
-- editing / movement enhancements
{ 'AndrewRadev/splitjoin.vim' },
{ 'folke/flash.nvim', event = 'VeryLazy', config = true },
{ 'kylechui/nvim-surround', event = 'VeryLazy', config = true },
{ 'numToStr/Comment.nvim', config = true },
{ 'numToStr/Navigator.nvim', config = true },
{ 'tpope/vim-ragtag' },
{ 'tpope/vim-repeat' },
{ 'tpope/vim-ragtag' }, -- TODO still needed?!
{ 'tpope/vim-repeat' }, -- TODO still needed?!
{ 'windwp/nvim-autopairs', event = 'InsertEnter', config = true },
{ 'kylechui/nvim-surround', event = 'VeryLazy', config = true },
{
'folke/flash.nvim',
event = 'VeryLazy',
-- TODO use whichkey for key mappings everywhere, one single init.lua ?!
keys = {
{ 's', mode = { 'n', 'o', 'x' }, function() require('flash').jump() end, desc = 'Flash' },
{ 'S', mode = { 'n', 'o', 'x' }, function() require('flash').treesitter() end, desc = 'Flash Treesitter' },
},
},
-- interface/code-navigation enhancements, git and others
{ 'lewis6991/gitsigns.nvim', config = true },
{ 'kevinhwang91/nvim-bqf', config = true },
{ 'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
opts = {
sections = {
lualine_b = { 'branch' },
lualine_x = {},
lualine_y = { 'diff', 'diagnostics' },
},
options = {
theme = 'gruvbox'
}
},
},
{ 'norcalli/nvim-colorizer.lua',
event = 'BufReadPre',
opts = {
css = { css = true },
scss = { css = true },
json = { css = true},
json5 = { css = true, },
javascript = { css = true },
},
},
-- and neorg for todo-lists etc.
{
'nvim-neorg/neorg',
-- more plugins and integrations
{ 'voldikss/vim-floaterm', config = get_config('floaterm') },
{ 'mfussenegger/nvim-lint', config = get_config('lint') },
-- TODO replace null-ls with formatter ?!
{ 'jose-elias-alvarez/null-ls.nvim', config = get_config('null-ls'), dependencies = 'nvim-lua/plenary.nvim' },
{ 'nvim-neorg/neorg',
build = ':Neorg sync-parsers',
opts = {
load = {
['core.concealer'] = {},
['core.defaults'] = {},
['core.dirman'] = {
config = {
default_workspace = 'notes',
workspaces = {
notes = '~/Notes',
},
},
},
},
},
dependencies = { { 'nvim-lua/plenary.nvim' } },
dependencies = 'nvim-lua/plenary.nvim',
config = get_config('neorg'),
},
-- investigating...
{
'jackMort/ChatGPT.nvim',
{ 'jackMort/ChatGPT.nvim',
event = 'VeryLazy',
config = true,
dependencies = {
'MunifTanjim/nui.nvim',
'nvim-lua/plenary.nvim',
'nvim-telescope/telescope.nvim'
}
},
{
'folke/zen-mode.nvim',
dependencies = { 'folke/twilight.nvim' },
opts = {
window = {
backdrop = 0.95,
width = 120,
height = 0.85,
},
plugins = {
gitsigns = { enabled = true },
},
},
},
{
'folke/which-key.nvim',
event = 'VeryLazy',
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
config = true,
},
})

Loading…
Cancel
Save