summaryrefslogtreecommitdiffstats
path: root/.config
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2023-12-29 16:26:21 +0100
committerJoe <rbo@gmx.us>2023-12-29 16:26:21 +0100
commit6a9fd3965335004d56bbcd7a25ac6981f6a87397 (patch)
tree34c0a76b28122d6df4de2399c6c9fc8e1b3cbf66 /.config
parentup (diff)
downloaddotfiles-bsd-6a9fd3965335004d56bbcd7a25ac6981f6a87397.tar.gz
dotfiles-bsd-6a9fd3965335004d56bbcd7a25ac6981f6a87397.tar.bz2
dotfiles-bsd-6a9fd3965335004d56bbcd7a25ac6981f6a87397.tar.xz
dotfiles-bsd-6a9fd3965335004d56bbcd7a25ac6981f6a87397.tar.zst
dotfiles-bsd-6a9fd3965335004d56bbcd7a25ac6981f6a87397.zip
up
Diffstat (limited to '.config')
-rw-r--r--.config/nvim/after/plugin/nerd-commenter.lua14
-rw-r--r--.config/nvim/after/plugin/telescope.lua16
-rw-r--r--.config/nvim/after/plugin/treesitter.lua2
-rw-r--r--.config/nvim/after/plugin/trouble.lua17
-rw-r--r--.config/nvim/after/plugin/whichkey.lua28
-rw-r--r--.config/nvim/lua/pack.lua6
-rw-r--r--.config/nvim/lua/settings.lua2
7 files changed, 54 insertions, 31 deletions
diff --git a/.config/nvim/after/plugin/nerd-commenter.lua b/.config/nvim/after/plugin/nerd-commenter.lua
deleted file mode 100644
index ddfadf2..0000000
--- a/.config/nvim/after/plugin/nerd-commenter.lua
+++ /dev/null
@@ -1,14 +0,0 @@
--- NERD Commenter
-vim.g.NERDSpaceDelims = 1
-vim.g.NERDCompactSexyComs = 1
-vim.g.NERDDefaultAlign = 'left'
-vim.g.NERDAltDelims_java = 1
-vim.g.NERDCustomDelimiters = {
- c = {
- left = '/*',
- right = '*/',
- }
-}
-vim.g.NERDCommentEmptyLines = 1
-vim.g.NERDTrimTrailingWhitespace = 1
-vim.g.NERDToggleCheckAllLines = 1
diff --git a/.config/nvim/after/plugin/telescope.lua b/.config/nvim/after/plugin/telescope.lua
new file mode 100644
index 0000000..99e1ad9
--- /dev/null
+++ b/.config/nvim/after/plugin/telescope.lua
@@ -0,0 +1,16 @@
+local tele = require('telescope')
+
+tele.setup {
+ defaults = {
+ mappings = {
+ i = {
+ ['<C-u>'] = false,
+ ['<C-d>'] = false,
+ ["<C-j>"] = require('telescope.actions').move_selection_next,
+ ["<C-k>"] = require('telescope.actions').move_selection_previous,
+ },
+ },
+ },
+}
+
+pcall(tele.load_extension, 'fzf')
diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua
index c34af23..4e27946 100644
--- a/.config/nvim/after/plugin/treesitter.lua
+++ b/.config/nvim/after/plugin/treesitter.lua
@@ -13,7 +13,7 @@ require'nvim-treesitter.configs'.setup {
'regex',
'markdown',
'markdown_inline',
- 'comment'
+ 'comment',
},
-- Install parsers synchronously (only applied to `ensure_installed`)
diff --git a/.config/nvim/after/plugin/trouble.lua b/.config/nvim/after/plugin/trouble.lua
new file mode 100644
index 0000000..f2a74fb
--- /dev/null
+++ b/.config/nvim/after/plugin/trouble.lua
@@ -0,0 +1,17 @@
+require('trouble').setup {
+ icons = true,
+}
+
+-- Diagnostic signs
+-- https://github.com/folke/trouble.nvim/issues/52
+local signs = {
+ Error = " ",
+ Warn = " ",
+ Hint = " ",
+ Info = " "
+}
+
+for type, icon in pairs(signs) do
+ local hl = "DiagnosticSign" .. type
+ vim.fn.sign_define(hl, {text = icon, texthl = hl, numhl = hl})
+end
diff --git a/.config/nvim/after/plugin/whichkey.lua b/.config/nvim/after/plugin/whichkey.lua
index 4e539db..b96a4bc 100644
--- a/.config/nvim/after/plugin/whichkey.lua
+++ b/.config/nvim/after/plugin/whichkey.lua
@@ -10,25 +10,34 @@ local ts = require('telescope.builtin')
require('telescope').load_extension('harpoon')
local wk = require('which-key')
wk.register({
+ -- harpoon
a = {
name = 'harpoon',
- a = { function() harpoon:list():append() end, 'add file', noremap = true, silent = true },
+ a = { function() harpoon:list():append() end, 'add file', noremap = true, silent = true },
e = { function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, 'harpoon ui', noremap = true, silent = true },
- f = { ':Telescope harpoon marks<CR>', 'harpoon telescope ui', noremap = true, silent = true },
+ f = { ':Telescope harpoon marks<CR>', 'harpoon telescope ui', noremap = true, silent = true },
},
- b = { ':Buffers<CR>', 'buffers', noremap = true, silent = true },
- c = { name = '+nerd-commenter' },
d = { ':bd<CR>', 'close buffer', noremap = true, silent = true },
D = { '"-ddk:put = strftime(\' * %c\')<CR>', 'insert date', noremap = true, silent = true },
- e = { ':Telescope find_files<CR>', 'find files', noremap = true, silent = true },
- G = { ':FloatermNew lazygit<CR>', 'lazygit', noremap = true, silent = true },
h = { ':Startify<CR>', 'startify', noremap = true, silent = true },
k = { ':w<CR>:bp<CR>:bd #<CR>', 'write and close buffer', noremap = true, silent = false },
u = { vim.cmd.UndotreeToggle, 'undotree', noremap = true, silent = true },
w = { ':w<CR>', 'write buffer', noremap = true, silent = false },
- x = { ':w<CR>:bp<CR>:bd #<CR>', 'write and close buffer', noremap = true, silent = false },
+ -- trouble
+ x = {
+ name = 'trouble',
+ x = { vim.cmd.TroubleToggle, 'toggle', noremap = true, silent = true },
+ w = { ':TroubleToggle workspace_diagnostics<CR>', 'workspace', noremap = true, silent = true },
+ d = { ':TroubleToggle document_diagnostics<CR>', 'document', noremap = true, silent = true },
+ l = { ':TroubleToggle loclist<CR>', 'local list', noremap = true, silent = true },
+ q = { ':TroubleToggle quickfix<CR>', 'quickfix', noremap = true, silent = true },
+ r = { ':TroubleToggle lsp_references<CR>', 'lsp', noremap = true, silent = true },
+ },
+ -- telescope
f = {
name = 'telescope',
+ b = { ts.buffers, 'buffers', noremap = true, silent = true },
+ d = { ts.diagnostics, 'diagnostics', noremap = true, silent = true },
e = { ':Telescope harpoon marks<CR>', 'harpoon marks', noremap = true, silent = true },
f = { ts.find_files, 'find files', noremap = true, silent = true },
g = { ts.git_files, 'git files', noremap = true, silent = true },
@@ -37,13 +46,16 @@ wk.register({
end, 'grep string', noremap = true, silent = true },
t = { ':TodoTelescope keywords=TODO,HACK,WARN,PERF,NOTE,TEST<CR>', 'todo', noremap = true, silent = true }
},
+ -- git
g = {
name = 'git',
g = { vim.cmd.Git, 'git' },
+ l = { ':FloatermNew lazygit<CR>', 'lazygit', noremap = true, silent = true },
-- a = { ':Ag<CR>', 'the_silver_searcher', noremap = true, silent = true },
-- g = { ':Grep<CR>', 'grep', noremap = true, silent = true },
-- r = { ':Rg<CR>', 'ripgrep', noremap = true, silent = true },
},
+ -- neovim
v = {
name = 'nvim',
v = { vim.cmd.Ex, 'explorer', noremap = true, silent = true },
@@ -65,5 +77,3 @@ wk.setup({
triggers = { "<leader>" },
triggers_nowait = { "d" },
})
-
-vim.keymap.set('n', '<C-p>', ts.git_files)
diff --git a/.config/nvim/lua/pack.lua b/.config/nvim/lua/pack.lua
index 854afe8..1ddb1b3 100644
--- a/.config/nvim/lua/pack.lua
+++ b/.config/nvim/lua/pack.lua
@@ -16,7 +16,6 @@ return require('packer').startup({function(use)
use 'folke/which-key.nvim'
use 'mhinz/vim-signify'
use 'mhinz/vim-startify'
- use 'morhetz/gruvbox'
use 'mg979/vim-visual-multi'
use 'preservim/tagbar'
-- use 'preservim/nerdcommenter'
@@ -92,11 +91,6 @@ return require('packer').startup({function(use)
requires = {
{'nvim-tree/nvim-web-devicons'},
},
- config = function()
- require('trouble').setup {
- icons = true,
- }
- end,
})
use {
'lukas-reineke/indent-blankline.nvim',
diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua
index a5bbd3f..6deddff 100644
--- a/.config/nvim/lua/settings.lua
+++ b/.config/nvim/lua/settings.lua
@@ -14,7 +14,7 @@ vim.opt.completeopt = 'menuone,noinsert,noselect,preview'
vim.opt.cursorline = true
vim.opt.encoding = 'utf-8'
-- vim.opt.go = 'a'
-vim.opt.termguicolors = false
+vim.opt.termguicolors = true
vim.opt.hidden = true
vim.opt.makeprg = 'make'
vim.opt.mouse = 'a'