commit f80761bdc0c48d669fb0e25ddb75b691736ecd8c
parent 38aaa3b5530f7365813a388ae5f0adc1553c3844
Author: Tomas Nemec <nemi@skaut.cz>
Date: Tue, 20 Dec 2022 08:51:00 +0100
update
Diffstat:
16 files changed, 113 insertions(+), 56 deletions(-)
diff --git a/after/plugin/autopairs.lua b/after/plugin/autopairs.lua
@@ -1,5 +1,7 @@
- if not pcall(require, 'nvim-autopairs') then return end
- require('nvim-autopairs').setup({ disable_filetype = { 'TelescopePrompt', 'vim' } })
- -- local cmp_autopairs = require('nvim-autopairs.completion.cmp')
- -- local cmp = require('cmp')
- -- cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({map_char = {tex = ''}}))
+if not pcall(require, 'nvim-autopairs') then
+ return
+end
+require('nvim-autopairs').setup({ disable_filetype = { 'TelescopePrompt', 'vim' } })
+-- local cmp_autopairs = require('nvim-autopairs.completion.cmp')
+-- local cmp = require('cmp')
+-- cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done({map_char = {tex = ''}}))
diff --git a/after/plugin/cmp.lua b/after/plugin/cmp.lua
@@ -2,10 +2,6 @@ if not pcall(require, 'cmp') then
return
end
--- do
--- return
--- end
-
local cmp = require('cmp')
require('cmp_dictionary').setup({ dic = {} })
-- cmp.register_source('exe', require('tms.p.cmp.exe_source').new())
@@ -37,9 +33,18 @@ cmp.setup({
['<c-p>'] = cmp.mapping({ i = doOrOpen(cmp.select_prev_item, { behavior = cmp.SelectBehavior.Select }) }),
['<c-n>'] = cmp.mapping({ i = doOrOpen(cmp.select_next_item, { behavior = cmp.SelectBehavior.Select }) }),
},
- sources = cmp.config.sources(
- { { name = 'nvim_lsp' }, { name = 'nvim_lua' }, { name = 'luasnip' }, { name = 'path' } },
- { { name = 'buffer' }, { name = 'spell' }, { name = 'calc' }, { name = 'treesitter' }, { name = 'dictionary' } }),
+ sources = { --
+ { name = 'nvim_lsp' },
+ { name = 'nvim_lsp_signature_help' },
+ { name = 'nvim_lua' },
+ { name = 'luasnip' },
+ { name = 'path' },
+ { name = 'buffer' },
+ { name = 'spell' },
+ { name = 'calc' },
+ { name = 'treesitter' },
+ { name = 'dictionary' },
+ },
experimental = { ghost_text = true },
})
diff --git a/after/plugin/cryoline.lua b/after/plugin/cryoline.lua
@@ -1,12 +0,0 @@
-if not pcall(require, 'cryoline') then return end
-
-require('cryoline').config {
- ft = { fugitive = '%{FugitiveStatusline()}' },
- line = function()
- local git_head = vim.fn.FugitiveHead()
- local branch = ''
- if #git_head ~= 0 then branch = '[' .. git_head .. ']' end
- local line = '%f %h%m%r' .. branch .. '%=%-14.(%l,%c%V%)'
- return line
- end,
-}
diff --git a/after/plugin/dadbod.lua b/after/plugin/dadbod.lua
@@ -1,3 +1,8 @@
-if pcall(require, 'vim-dadbod-completion') then
- vim.cmd [[autocmd FileType sql,mysql,plsql lua require('cmp').setup.buffer({ sources = {{ name = 'vim-dadbod-completion' }} })]]
+if pcall(require, 'vim_dadbod_completion') and pcall(require, 'cmp') then
+ vim.api.nvim_create_autocmd('FileType', {
+ pattern = { 'sql', 'mysql', 'plsql' },
+ callback = function()
+ require('cmp').setup.buffer({ sources = { { name = 'vim-dadbod-completion' } } })
+ end,
+ })
end
diff --git a/after/plugin/fidget.lua b/after/plugin/fidget.lua
@@ -0,0 +1,8 @@
+if not pcall(require, 'fidget') then
+ return
+end
+
+require('fidget').setup {
+ text = { spinner = 'moon', done = '', commenced = '', completed = '' },
+ timer = { spinner_rate = 60, fidget_decay = 0, task_decay = 0 },
+}
diff --git a/after/plugin/git.lua b/after/plugin/git.lua
@@ -4,6 +4,40 @@ if vim.g.loaded_fugitive then
vim.keymap.set('n', '<leader>gb', '<cmd>Git blame<cr>', { desc = 'Git Blame' })
end
+local has_cmp_git, cmp_git = pcall(require, 'cmp_git')
+if has_cmp_git then
+
+ local function filter_repo(git_info)
+ -- dpgw issues are in one repo dpgw/dpgw
+ if git_info.host == 'devel.bigroot.cz' then
+ git_info = { host = 'devel.bigroot.cz', owner = 'dpgw', repo = 'dpgw' }
+ end
+ return git_info
+ end
+
+ cmp_git.setup {
+ trigger_actions = {
+ {
+ debug_name = 'gitlab_issues',
+ trigger_character = '#',
+ action = function(sources, trigger_char, callback, _, git_info)
+ git_info = filter_repo(git_info)
+ return sources.gitlab:get_issues(callback, git_info, trigger_char)
+ end,
+ },
+ {
+ debug_name = 'gitlab_mrs',
+ trigger_character = '!',
+ action = function(sources, trigger_char, callback, _, git_info)
+ git_info = filter_repo(git_info)
+ return sources.gitlab:get_merge_requests(callback, git_info, trigger_char)
+ end,
+ },
+ },
+
+ }
+end
+
local has_igit, igit = pcall(require, 'igit')
if has_igit then
igit.setup({
diff --git a/after/plugin/qmk.lua b/after/plugin/qmk.lua
@@ -3,9 +3,7 @@ if not pcall(require, 'cmp') then
end
local source = {}
----@diagnostic disable-next-line: unused-local
-function source:complete(params, callback)
-
+function source:complete(_, callback)
callback({
{ label = 'KC_NO', detail = [[Ignore this key (NOOP)]] },
{ label = 'KC_TRNS', detail = [[Use the next lowest non-transparent key ]] },
diff --git a/colors/base16.lua b/colors/base16.lua
@@ -287,6 +287,7 @@ vim.api.nvim_set_hl(0, 'TreesitterContext', { bg = gui01 })
vim.api.nvim_set_hl(0, 'NormalFloat', {})
vim.api.nvim_set_hl(0, 'WinSeparator', {})
vim.api.nvim_set_hl(0, 'FloatBorder', {})
+vim.api.nvim_set_hl(0, 'StatusLine', { fg = 'background', bg = 'background' })
vim.api.nvim_set_hl(0, 'Beacon', { bg = 'fg' })
vim.api.nvim_set_hl(0, 'LspInlayHint', { fg = gui03 })
diff --git a/ftplugin/gitcommit.lua b/ftplugin/gitcommit.lua
@@ -1,10 +1,13 @@
-require('cmp').setup.buffer {
- sources = {
- --
- { name = 'glab_dpgw' },
- { name = 'path' },
- { name = 'buffer', keyword_length = 5 },
- },
-}
+if pcall(require, 'cmp') then
+ require('cmp').setup.buffer {
+ sources = {
+ --
+ { name = 'git' },
+ { name = 'glab_dpgw' },
+ { name = 'path' },
+ { name = 'buffer', keyword_length = 5 },
+ },
+ }
+end
vim.cmd.startinsert()
diff --git a/ftplugin/neorg.lua b/ftplugin/neorg.lua
@@ -1,10 +1,12 @@
-require('cmp').setup.buffer {
- --
- -- completion = {autocomplete = false},
- sources = {
+if pcall(require, 'cmp') then
+ require('cmp').setup.buffer {
--
- {name = 'neorg'},
- {name = 'buffer'},
- {name = 'path'},
- },
-}
+ -- completion = {autocomplete = false},
+ sources = {
+ --
+ { name = 'neorg' },
+ { name = 'buffer' },
+ { name = 'path' },
+ },
+ }
+end
diff --git a/ftplugin/zsh.lua b/ftplugin/zsh.lua
@@ -1,16 +1,18 @@
vim.bo.makeprg = [[zsh -n -- %:S]]
vim.bo.efm = [[%f:%l: %m,%f: line %l: %m, %-G%.%#]]
-require('cmp').setup.buffer {
- --
- completion = { autocomplete = false },
- sources = {
+if pcall(require, 'cmp') then
+ require('cmp').setup.buffer {
--
- { name = 'nvim_lsp' },
- { name = 'exe' },
- { name = 'path' },
- },
-}
+ completion = { autocomplete = false },
+ sources = {
+ --
+ { name = 'nvim_lsp' },
+ { name = 'exe' },
+ { name = 'path' },
+ },
+ }
+end
vim.keymap.set('n', '<leader>ar', function()
local tms_prg = vim.bo.makeprg
diff --git a/lua/plugins.lua b/lua/plugins.lua
@@ -41,12 +41,14 @@ return packer.startup({
use 'uga-rosa/ccc.nvim'
use 'rainbowhxch/beacon.nvim'
-- use 'Yggdroot/hiPairs'
- use 'jandamm/cryoline.nvim'
use 'karb94/neoscroll.nvim'
use { 'sidebar-nvim/sidebar.nvim', requires = { 'kyazdani42/nvim-web-devicons' } }
-- use { 'kevinhwang91/nvim-ufo', requires = { 'kevinhwang91/promise-async' } }
use 'elihunter173/dirbuf.nvim'
use 'norcalli/nvim-terminal.lua'
+ use 'j-hui/fidget.nvim'
+ use 'junegunn/vim-peekaboo'
+ use 'lervag/vimtex'
-- lua
use 'nanotee/luv-vimdocs'
@@ -94,9 +96,11 @@ return packer.startup({
requires = {
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-nvim-lsp',
+ 'hrsh7th/cmp-nvim-lsp-signature-help',
'hrsh7th/cmp-path',
'hrsh7th/cmp-cmdline',
'hrsh7th/cmp-nvim-lua',
+ 'petertriho/cmp-git',
'f3fora/cmp-spell',
'hrsh7th/cmp-calc',
'ray-x/cmp-treesitter',
diff --git a/lua/tms/options.lua b/lua/tms/options.lua
@@ -25,6 +25,9 @@ vim.opt.swapfile = false
vim.opt.undofile = true
vim.opt.laststatus = 3
vim.opt.statusline = ' '
+-- its nice but when:
+-- * changing qf-item there is entr-prompt
+-- vim.opt.cmdheight = 0
vim.opt.winbar = '%=%m %f'
vim.opt.ruler = false
vim.opt.listchars = { space = '·', tab = '» ', extends = '›', precedes = '‹', nbsp = '_', trail = '_', eol = '$' }
diff --git a/plugin/vimtex.lua b/plugin/vimtex.lua
diff --git a/spell/cs.utf-8.add b/spell/cs.utf-8.add
@@ -5,3 +5,5 @@
#pozorneni
#pozorneni/!
Ňemi
+<cword>
+odhazovacího
diff --git a/spell/cs.utf-8.add.spl b/spell/cs.utf-8.add.spl
Binary files differ.