commit fd22691f7b01d346068fb0cf2482ce3fc51a6ba7
parent f09bce9d8ad0c7ed8ee3d85bb24f999aa2e003f8
Author: Tomas Nemec <owl@gtms.dev>
Date: Mon, 11 Dec 2023 17:12:28 +0100
update
Diffstat:
5 files changed, 66 insertions(+), 79 deletions(-)
diff --git a/after/plugin/cmp.lua b/after/plugin/cmp.lua
@@ -71,7 +71,7 @@ cmp.setup({
},
snippet = {
expand = function(args)
- require('luasnip').lsp_expand(args.body)
+ vim.snippet.expand(args.body)
end,
},
-- view = { entries = { name = 'custom' } },
@@ -83,7 +83,6 @@ cmp.setup({
vim_item.menu = ({
nvim_lsp = '[LSP]',
nvim_lua = '[Lua]',
- luasnip = '[LuaSnip]',
buffer = '[Buffer]',
treesitter = '[TS]',
latex_symbols = '[LaTeX]',
@@ -104,7 +103,6 @@ cmp.setup({
-- = cmp.config.sources({
-- { name = 'nvim_lsp' },
-- { name = 'vsnip' }, -- For vsnip users.
- -- -- { name = 'luasnip' }, -- For luasnip users.
-- -- { name = 'snippy' }, -- For snippy users.
-- -- { name = 'ultisnips' }, -- For ultisnips users.
-- }, { { name = 'buffer' } }),
@@ -113,7 +111,6 @@ cmp.setup({
{ name = 'nvim_lsp' },
{ name = 'nvim_lsp_signature_help' },
{ name = 'nvim_lua' },
- { name = 'luasnip' },
{ name = 'path' },
{ name = 'spell' },
{ name = 'calc' },
diff --git a/after/plugin/diagflow.lua b/after/plugin/diagflow.lua
@@ -0,0 +1,5 @@
+if not pcall(require, 'diagflow') then
+ return
+end
+
+require('diagflow').setup { toggle_event = { 'InsertEnter' } }
diff --git a/after/plugin/git.lua b/after/plugin/git.lua
@@ -46,54 +46,3 @@ if has_igit then
-- status = { open_cmd = 'botright' },
})
end
-
-require('gitsigns')
-local has_gsigns, gsigns = pcall(require, 'gitsigns')
-if has_gsigns then
- local get_theme = function()
- local dark_theme = { add = '│', change = '│', delete = '│', topdelete = '‾', changedel = '│' }
- local light_theme = { add = ' ', change = ' ', delete = ' ', topdelete = ' ', changedel = ' ' }
- local theme = dark_theme
- if vim.opt.background:get() == 'light' then
- theme = light_theme
- end
- return theme
- end
-
- local theme = get_theme()
- gsigns.setup {
- signs = {
- add = {
- text = theme.add,
- -- text = ' ',
- },
- change = {
- text = theme.change,
- -- text = ' ',
- },
- delete = {
- text = theme.delete,
- -- text = ' ',
- },
- topdelete = {
- -- text = ' ',
- },
- changedelete = {
- text = theme.changedel,
- -- text = ' ',
- },
- },
- }
-
- vim.keymap.set('n', '<leader>hl', gsigns.next_hunk, { desc = 'Git Next Hunk' })
- vim.keymap.set('n', '<leader>hh', gsigns.prev_hunk, { desc = 'Git Previous Hunk' })
- vim.keymap.set('n', '<leader>hs', gsigns.stage_hunk, { desc = 'Git Stage Hunk' })
- vim.keymap.set('n', '<leader>hu', gsigns.undo_stage_hunk, { desc = 'Git Undo Stage Hunk' })
- vim.keymap.set('n', '<leader>hr', gsigns.reset_hunk, { desc = 'Git Reset Hunk' })
- vim.keymap.set('n', '<leader>hR', gsigns.reset_buffer, { desc = 'Git Reset Buffer' })
- vim.keymap.set('n', '<leader>hp', gsigns.preview_hunk, { desc = 'Git Preview Hunk' })
- vim.keymap.set('n', '<leader>hb', gsigns.toggle_current_line_blame, { desc = 'Git Toggle Blame Line' })
- vim.keymap.set('n', '<leader>hn', gsigns.toggle_numhl, { desc = 'Git Highlight Num' })
- vim.keymap.set('o', 'ig', ':<C-U>lua require("gitsigns").select_hunk()<cr>')
- vim.keymap.set('x', 'ig', ':<C-U>lua require("gitsigns").select_hunk()<cr>')
-end
diff --git a/after/plugin/gitsigns.lua b/after/plugin/gitsigns.lua
@@ -0,0 +1,39 @@
+if not pcall(require, 'gitsigns') then
+ return
+end
+
+local gsigns = require('gitsigns')
+
+local get_theme = function()
+ local dark_theme = { add = '│', change = '│', delete = '│', topdelete = '‾', changedelete = '│' }
+ local light_theme = { add = ' ', change = ' ', delete = ' ', topdelete = ' ', changedelete = ' ' }
+
+ if vim.opt.background:get() == 'light' then
+ return light_theme
+ end
+
+ return dark_theme
+end
+
+local theme = get_theme()
+gsigns.setup {
+ signs = {
+ add = { text = theme.add },
+ change = { text = theme.change },
+ delete = { text = theme.delete },
+ topdelete = { text = theme.topdelete },
+ changedelete = { text = theme.changedelete },
+ },
+}
+
+vim.keymap.set('n', '<leader>hl', gsigns.next_hunk, { desc = 'Git Next Hunk' })
+vim.keymap.set('n', '<leader>hh', gsigns.prev_hunk, { desc = 'Git Previous Hunk' })
+vim.keymap.set('n', '<leader>hs', gsigns.stage_hunk, { desc = 'Git Stage Hunk' })
+vim.keymap.set('n', '<leader>hu', gsigns.undo_stage_hunk, { desc = 'Git Undo Stage Hunk' })
+vim.keymap.set('n', '<leader>hr', gsigns.reset_hunk, { desc = 'Git Reset Hunk' })
+vim.keymap.set('n', '<leader>hR', gsigns.reset_buffer, { desc = 'Git Reset Buffer' })
+vim.keymap.set('n', '<leader>hp', gsigns.preview_hunk, { desc = 'Git Preview Hunk' })
+vim.keymap.set('n', '<leader>hb', gsigns.toggle_current_line_blame, { desc = 'Git Toggle Blame Line' })
+vim.keymap.set('n', '<leader>hn', gsigns.toggle_numhl, { desc = 'Git Highlight Num' })
+vim.keymap.set('o', 'ig', ':<C-U>lua require("gitsigns").select_hunk()<cr>')
+vim.keymap.set('x', 'ig', ':<C-U>lua require("gitsigns").select_hunk()<cr>')
diff --git a/lua/plugins.lua b/lua/plugins.lua
@@ -1,22 +1,20 @@
vim.cmd.packadd('paq-nvim')
-local plugins = require('paq')
-
-return plugins {
- { 'savq/paq-nvim', opt = true }, -- deps
+return require('paq') {
+ { 'savq/paq-nvim', opt = true },
'kyazdani42/nvim-web-devicons',
'nvim-lua/plenary.nvim',
- 'nvim-lua/popup.nvim', -- EXP
- 'yioneko/nvim-type-fmt', -- meta
+ 'nvim-lua/popup.nvim', -- EXP
+ 'yioneko/nvim-type-fmt', -- meta
'tweekmonster/startuptime.vim', -- colorscheme
- 'tjdevries/colorbuddy.nvim', -- spell
- 'xxdavid/bez-diakritiky.vim', -- movements
+ 'tjdevries/colorbuddy.nvim', -- spell
+ 'xxdavid/bez-diakritiky.vim', -- movements
'ggandor/leap.nvim',
- 'ggandor/leap-spooky.nvim', -- editor
+ 'ggandor/leap-spooky.nvim', -- editor
'tpope/vim-repeat',
'kylechui/nvim-surround',
'chaoren/vim-wordmotion', -- word counts with _,.,-,...
- 'romgrk/equal.operator', -- equal text object `lefthand = righthand`
- 'godlygeek/tabular', -- align
+ 'romgrk/equal.operator', -- equal text object `lefthand = righthand`
+ 'godlygeek/tabular', -- align
-- use 'windwp/nvim-autopairs'
'numToStr/Comment.nvim',
'mbbill/undotree', -- use 'camspiers/Animate.vim'
@@ -28,13 +26,13 @@ return plugins {
-- use { 'kevinhwang91/nvim-ufo', requires = { 'kevinhwang91/promise-async' } }
'elihunter173/dirbuf.nvim',
'norcalli/nvim-terminal.lua',
- { 'j-hui/fidget.nvim', branch = 'legacy' },
- 'lervag/vimtex', -- lua
+ { 'j-hui/fidget.nvim', branch = 'legacy' },
+ 'lervag/vimtex', -- lua
'nanotee/luv-vimdocs',
- 'milisims/nvim-luaref', -- Notes
+ 'milisims/nvim-luaref', -- Notes
-- { 'nvim-neorg/neorg', requires = { 'nvim-lua/plenary.nvim' } }
{ 'mickael-menu/zk-nvim' }, -- quickfix list
- 'kevinhwang91/nvim-bqf', -- distraction
+ 'kevinhwang91/nvim-bqf', -- distraction
'junegunn/limelight.vim',
'Pocco81/true-zen.nvim',
'shortcuts/no-neck-pain.nvim', -- how to vim
@@ -45,15 +43,14 @@ return plugins {
'sindrets/diffview.nvim',
'tpope/vim-fugitive',
'ThePrimeagen/git-worktree.nvim',
- 'rhysd/conflict-marker.vim', -- http
- { 'rest-nvim/rest.nvim', requires = { 'nvim-lua/plenary.nvim' } }, -- filetype
+ 'rhysd/conflict-marker.vim', -- http
+ { 'rest-nvim/rest.nvim', requires = { 'nvim-lua/plenary.nvim' } }, -- filetype
'tikhomirov/vim-glsl',
'windwp/nvim-ts-autotag',
'baskerville/vim-sxhkdrc',
-- use 'dart-lang/dart-vim-plugin'
'mfussenegger/nvim-jdtls',
'akinsho/pubspec-assist.nvim', -- snippets
- 'L3MON4D3/luaSnip', -- completion
'dmitmel/cmp-cmdline-history',
'f3fora/cmp-spell',
'hrsh7th/cmp-buffer',
@@ -67,11 +64,10 @@ return plugins {
'petertriho/cmp-git',
'ray-x/cmp-treesitter',
'rcarriga/cmp-dap',
- 'saadparwaiz1/cmp_luasnip',
'tamago324/cmp-zsh',
'uga-rosa/cmp-dictionary',
'hrsh7th/nvim-cmp',
- 'aduros/ai.vim', -- ui
+ 'aduros/ai.vim', -- ui
'stevearc/dressing.nvim',
'rcarriga/nvim-notify', -- lsp
'neovim/nvim-lspconfig',
@@ -79,9 +75,10 @@ return plugins {
'williamboman/mason-lspconfig.nvim',
'b0o/schemastore.nvim',
'folke/neodev.nvim',
- { 'jose-elias-alvarez/null-ls.nvim', requires = { 'nvim-lua/plenary.nvim' } },
+ { 'jose-elias-alvarez/null-ls.nvim', requires = { 'nvim-lua/plenary.nvim' } },
'lvimuser/lsp-inlayhints.nvim', -- use 'zbirenbaum/copilot.lua'
- 'Exafunction/codeium.vim', -- dap
+ 'dgagn/diagflow.nvim',
+ 'Exafunction/codeium.vim', -- dap
'mfussenegger/nvim-dap',
'leoluz/nvim-dap-go',
'rcarriga/nvim-dap-ui',
@@ -107,8 +104,8 @@ return plugins {
'nvim-telescope/telescope-fzy-native.nvim',
'nvim-telescope/telescope-dap.nvim',
{ 'aaronhallaert/advanced-git-search.nvim', requires = { 'tpope/vim-fugitive' } }, -- Godot
- 'habamax/vim-godot', -- qmk
- 'codethread/qmk.nvim', -- personal
+ 'habamax/vim-godot', -- qmk
+ 'codethread/qmk.nvim', -- personal
'GenesisTMS/trans.nvim',
{ url = 'git@gitlab.com:gtms/dart-tools.nvim' },
-- use '/home/tms/dev/nvim/plugins/dart-tools.nvim'