Compare commits

..

3 Commits

Author SHA1 Message Date
Robert Kmieć
388d2b0b30 Picom: sync config with mainstream 2024-03-29 09:34:37 +01:00
Robert Kmieć
687646da32 Nvim: many small changes around whole project 2024-03-29 09:33:27 +01:00
Robert Kmieć
a2832ed454 Nvim: add treesj and tmux
tmux integration doesn't work yet
2024-03-29 09:31:07 +01:00
21 changed files with 463 additions and 238 deletions

View File

@@ -43,8 +43,8 @@ theme.fg_focus = srcery_colors.blue
theme.fg_urgent = srcery_colors.magenta theme.fg_urgent = srcery_colors.magenta
theme.fg_minimize = srcery_colors.white theme.fg_minimize = srcery_colors.white
theme.useless_gap = dpi(2) theme.useless_gap = dpi(1)
theme.border_width = dpi(2) theme.border_width = dpi(1)
theme.border_normal = srcery_colors.brightblack theme.border_normal = srcery_colors.brightblack
theme.border_focus = srcery_colors.white theme.border_focus = srcery_colors.white
theme.border_marked = srcery_colors.brightred theme.border_marked = srcery_colors.brightred

View File

@@ -25,6 +25,8 @@ if test -e ~/.local/share/nvim/lazy/falcon/exa/EXA_COLORS
source ~/.local/share/nvim/lazy/falcon/exa/EXA_COLORS source ~/.local/share/nvim/lazy/falcon/exa/EXA_COLORS
end end
function list_dir --on-variable PWD if status is-interactive
ls function list_dir --on-variable PWD
ls
end
end end

View File

@@ -1,22 +1,3 @@
require('core.config') require('core.config')
require('core.plugins') require('core.plugins')
require('core.mappings') require('core.mappings')
vim.cmd([[
"highlight MatchParen cterm=underline ctermbg=black ctermfg=NONE
"highlight VirtColumn ctermfg=DarkGrey ctermbg=NONE
"hi clear SpellBad
"hi SpellBad cterm=underline
" Ctags {{{
if isdirectory($HOME . '/.cache/nvim/tags') == 0
:silent !mkdir -p ~/.cache/nvim/tags > /dev/null 2>&1
endif
let g:gutentags_cache_dir='~/.cache/nvim/tags'
if isdirectory($HOME . '/.cache/nvim/undo') == 0
:silent !mkdir -p ~/.cache/nvim/undo > /dev/null 2>&1
endif
set undodir=~/.cache/nvim/undo/
set undofile
]])

View File

@@ -8,6 +8,11 @@ vim.opt.startofline = true
vim.g.loaded_ruby_provider = 0 vim.g.loaded_ruby_provider = 0
vim.g.loaded_perl_provider = 0 vim.g.loaded_perl_provider = 0
local undodir = vim.fn.expand('~/.cache/nvim/undo')
vim.fn.mkdir(undodir, 'p')
vim.opt.undodir = undodir
vim.opt.undofile = true
vim.opt.conceallevel = 1 vim.opt.conceallevel = 1
vim.opt.shell = '/bin/bash' vim.opt.shell = '/bin/bash'

View File

@@ -11,7 +11,7 @@ map('t', '<ESC><ESC>', '<C-\\><C-n>', default_options)
map('i', 'jj', '<ESC>', default_options) map('i', 'jj', '<ESC>', default_options)
map('i', 'jk', '<ESC>', default_options) map('i', 'jk', '<ESC>', default_options)
--map('i', ':w<CR>', '<Esc>:w<CR>', default_options) --map('i', ':w<CR>', '<Esc>:w<CR>', default_options)
map('n', 'Q', '<cmd>q<CR>', default_options) map('n', 'Q', '<cmd>q', default_options)
-- Reselect visual block after incrementing/decrementing -- Reselect visual block after incrementing/decrementing
map('v', '<c-a>', '<c-a>gv', default_options) map('v', '<c-a>', '<c-a>gv', default_options)

View File

@@ -1,7 +1,8 @@
return { return {
'samodostal/image.nvim', 'samodostal/image.nvim',
name = 'ascii-image',
opts = { opts = {
render = { render = {
min_padding = 5, min_padding = 5,
show_label = true, show_label = true,
use_dither = true, use_dither = true,

View File

@@ -9,6 +9,7 @@ return {{
{ {
"wuelnerdotexe/vim-enfocado", "wuelnerdotexe/vim-enfocado",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--vim.cmd.colorscheme('enfocado') --vim.cmd.colorscheme('enfocado')
end end
@@ -16,6 +17,7 @@ return {{
{ {
"fenetikm/falcon", "fenetikm/falcon",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--vim.cmd.colorscheme('falcon') --vim.cmd.colorscheme('falcon')
end end
@@ -23,6 +25,7 @@ return {{
{ {
"casr/vim-colors-reference", "casr/vim-colors-reference",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--vim.cmd.colorscheme('reference') --vim.cmd.colorscheme('reference')
end end
@@ -30,6 +33,7 @@ return {{
{ {
"blazkowolf/gruber-darker.nvim", "blazkowolf/gruber-darker.nvim",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--vim.cmd.colorscheme('gruber-darker') --vim.cmd.colorscheme('gruber-darker')
end end
@@ -37,6 +41,7 @@ return {{
{ {
"rebelot/kanagawa.nvim", "rebelot/kanagawa.nvim",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--vim.cmd.colorscheme('kanagawa') --vim.cmd.colorscheme('kanagawa')
end end
@@ -44,6 +49,7 @@ return {{
{ {
"jaredgorski/spacecamp", "jaredgorski/spacecamp",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--vim.cmd.colorscheme('spacecamp') --vim.cmd.colorscheme('spacecamp')
end end
@@ -51,6 +57,7 @@ return {{
{ {
"lifepillar/vim-gruvbox8", "lifepillar/vim-gruvbox8",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--vim.cmd.colorscheme('gruvbox8') --vim.cmd.colorscheme('gruvbox8')
end end
@@ -58,6 +65,7 @@ return {{
{ {
"marko-cerovac/material.nvim", "marko-cerovac/material.nvim",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--vim.cmd.colorscheme('material') --vim.cmd.colorscheme('material')
end end
@@ -65,6 +73,7 @@ return {{
{ {
"srcery-colors/srcery-vim", "srcery-colors/srcery-vim",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--vim.cmd.colorscheme('srcery') --vim.cmd.colorscheme('srcery')
end end
@@ -72,6 +81,7 @@ return {{
{ {
"tanvirtin/monokai.nvim", "tanvirtin/monokai.nvim",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--vim.cmd.colorscheme('monokai') --vim.cmd.colorscheme('monokai')
end end
@@ -79,13 +89,15 @@ return {{
{ {
"dasupradyumna/midnight.nvim", "dasupradyumna/midnight.nvim",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--vim.cmd.colorscheme('midnight') vim.cmd.colorscheme('midnight')
end end
}, },
{ {
"bluz71/vim-moonfly-colors", "bluz71/vim-moonfly-colors",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--vim.cmd.colorscheme('moonfly') --vim.cmd.colorscheme('moonfly')
end end
@@ -93,6 +105,7 @@ return {{
{ {
"kuznetsss/meadow.nvim", "kuznetsss/meadow.nvim",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--require('meadow').setup() --require('meadow').setup()
--vim.cmd.colorscheme('meadow') --vim.cmd.colorscheme('meadow')
@@ -102,20 +115,28 @@ return {{
{ {
"kepano/flexoki-neovim", "kepano/flexoki-neovim",
lazy = false, lazy = false,
priority = 1000,
config = function() config = function()
--vim.cmd.colorscheme('flexoki-dark') --vim.cmd.colorscheme('flexoki-dark')
end end
}, },
{ {
"https://gitlab.com/bartekjaszczak/distinct-nvim", "https://gitlab.com/bartekjaszczak/distinct-nvim",
lazy = false,
priority = 1000, priority = 1000,
config = function() config = function()
require("distinct").setup({ -- require("distinct").setup({
doc_comments_different_color = true, -- Use different colour for documentation comments -- doc_comments_different_color = true, -- Use different colour for documentation comments
}) -- })
-- vim.cmd.colorscheme('distinct')
vim.cmd.colorscheme('distinct') end
end },
{
'kevinm6/kurayami.nvim',
lazy = false,
priority = 1000,
config = function()
--vim.cmd.colorscheme('kurayami')
end
} }
} }

View File

@@ -2,6 +2,8 @@ return {
'AckslD/nvim-FeMaco.lua', 'AckslD/nvim-FeMaco.lua',
config = function() config = function()
require('femaco').setup() require('femaco').setup()
vim.keymap.set('n', '<leader>!', '<cmd>FeMaCo<cr>', { noremap = true, silent = true }) vim.keymap.set('n', '<leader>!', '<cmd>FeMaco<cr>', { noremap = true, silent = true })
end, end,
cmd = { "FeMaco" },
keys = { "<leader>!" }
} }

View File

@@ -0,0 +1,15 @@
return {
'Wansmer/treesj',
config = function()
require('treesj').setup({
use_default_keymaps = false,
max_join_length = 1000,
})
-- -- For default preset
-- vim.keymap.set('n', '<leader>jt', require('treesj').toggle)
-- -- For extending default preset with `recursive = true`
-- vim.keymap.set('n', '<leader>jT', function()
-- require('treesj').toggle({ split = { recursive = true } })
-- end)
end
}

View File

@@ -3,18 +3,17 @@ return {
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
dependencies = { dependencies = {
-- "SmiteshP/nvim-navbuddy", -- "SmiteshP/nvim-navbuddy",
{url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"},
"jubnzv/virtual-types.nvim", "jubnzv/virtual-types.nvim",
--"ray-x/lsp_signature.nvim", --"ray-x/lsp_signature.nvim",
"folke/neodev.nvim", "folke/neodev.nvim",
"artemave/workspace-diagnostics.nvim" {url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"},
}, },
config = function() config = function()
require("neodev").setup({ require("neodev").setup({
library = { plugins = { "nvim-dap-ui" }, types = true }, library = { plugins = { "nvim-dap-ui" }, types = true },
}) })
local nvim_lsp = require('lspconfig') local nvim_lsp = require('lspconfig')
local clangd_extensions = require('clangd_extensions').setup({ require('clangd_extensions').setup({
inlay_hints = { inlay_hints = {
inline = false, inline = false,
-- Options other than `highlight' and `priority' only work -- Options other than `highlight' and `priority' only work
@@ -136,7 +135,6 @@ return {
-- }) -- })
require("clangd_extensions.inlay_hints").setup_autocmd() require("clangd_extensions.inlay_hints").setup_autocmd()
require("clangd_extensions.inlay_hints").set_inlay_hints() require("clangd_extensions.inlay_hints").set_inlay_hints()
--require("workspace-diagnostics").populate_workspace_diagnostics(ev.buf)
local signs = { local signs = {
{ name = "DiagnosticSignError", text = "" }, { name = "DiagnosticSignError", text = "" },
@@ -201,11 +199,6 @@ return {
nvim_lsp.matlab_ls.setup({ nvim_lsp.matlab_ls.setup({
cmd = { "matlab-language-server", "--stdio"}, cmd = { "matlab-language-server", "--stdio"},
filetypes = { "matlab" }, filetypes = { "matlab" },
-- handlers = { [ "workspace/configuration"] = function(_, _, ctx)
-- local client = vim.lsp.get_client_by_id(ctx.client_id)
-- return {client.config.settings.matlab}
-- end
-- },
root_dir = nvim_lsp.util.find_git_ancestor, root_dir = nvim_lsp.util.find_git_ancestor,
single_file_support = true, single_file_support = true,
settings = { settings = {

View File

@@ -1,22 +1,15 @@
return { return {
'nvimtools/none-ls.nvim', 'nvimtools/none-ls.nvim',
config = function() config = function()
null_ls = require("null-ls") local none_ls = require("null-ls")
null_ls.setup({ none_ls.setup({
sources = { sources = {
null_ls.builtins.formatting.stylua, none_ls.builtins.code_actions.gitsigns,
--null_ls.builtins.completion.spell, none_ls.builtins.diagnostics.gitlint,
null_ls.builtins.code_actions.gitsigns, none_ls.builtins.diagnostics.cmake_lint,
null_ls.builtins.diagnostics.gitlint, none_ls.builtins.diagnostics.codespell,
null_ls.builtins.diagnostics.cmake_lint, none_ls.builtins.hover.dictionary,
null_ls.builtins.diagnostics.codespell, none_ls.builtins.formatting.black},
--null_ls.builtins.diagnostics.misspell,
null_ls.builtins.diagnostics.hadolint,
null_ls.builtins.diagnostics.buf,
--null_ls.builtins.code_actions.proselint,
--null_ls.builtins.diagnostics.proselint,
null_ls.builtins.hover.dictionary,
null_ls.builtins.formatting.black},
}) })
end end
} }

View File

@@ -1,4 +1,7 @@
return { return {
{ 'tzachar/cmp-ai', dependencies = 'nvim-lua/plenary.nvim'},
{ 'petertriho/cmp-git'},
{
'hrsh7th/nvim-cmp', 'hrsh7th/nvim-cmp',
dependencies = { dependencies = {
'dcampos/cmp-snippy', 'dcampos/cmp-snippy',
@@ -10,11 +13,71 @@ return {
'hrsh7th/cmp-nvim-lsp-signature-help', 'hrsh7th/cmp-nvim-lsp-signature-help',
'hrsh7th/cmp-path', 'hrsh7th/cmp-path',
'hrsh7th/cmp-calc', 'hrsh7th/cmp-calc',
'tzachar/cmp-ai'
}, },
event = "InsertEnter", event = "InsertEnter",
config = function() config = function()
local cmp = require'cmp' local cmp = require'cmp'
local snippy = require'snippy' local snippy = require'snippy'
local cmp_ai = require('cmp_ai.config')
cmp_ai:setup({
max_lines = 100,
provider = 'Ollama',
provider_options = {
model = 'deepseek-coder:6.7b',
base_url = 'http://batman.local:11434/api/generate',
prompt = function(lines_before, lines_after)
-- prompt depends on the model you use. Here is an example for deepseek coder
return '<PRE> ' .. lines_before .. ' <SUF>' .. lines_after .. ' <MID>' -- for codellama
end,
},
debounce_delay = 600, -- ms llama may be GPU hungry, wait x ms after last key input, before sending request to it
notify = true,
notify_callback = function(msg)
vim.notify(msg)
end,
run_on_every_keystroke = true,
ignored_file_types = {
-- default is not to ignore
-- uncomment to ignore in lua:
-- lua = true
},
})
local default_cmp_sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'nvim_lsp_signature_help' },
{ name = 'path' },
{ name = 'snippy' },
{ name = 'calc' },
--{ name = 'cmp_git' },
--{ name = 'cmp_ai' },
})
local bufIsBig = function(bufnr)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = vim.loop.fs_stat(vim.api.nvim_buf_get_name(bufnr))
if ok and stats and stats.size > max_filesize then
return true
else
return false
end
end
-- If a file is too large, I don't want to add to it's cmp sources treesitter, see:
-- https://github.com/hrsh7th/nvim-cmp/issues/1522
vim.api.nvim_create_autocmd('BufReadPre', {
callback = function(t)
local sources = default_cmp_sources
if not bufIsBig(t.buf) then
sources[#sources+1] = {name = 'treesitter', group_index = 2}
end
cmp.setup.buffer {
sources = sources
}
end
})
cmp.setup({ cmp.setup({
snippet = { snippet = {
@@ -48,8 +111,10 @@ return {
}, { }, {
{ name = 'buffer', keyword_length = 5, max_item_count = 10, priority = -5 }, { name = 'buffer', keyword_length = 5, max_item_count = 10, priority = -5 },
}), }),
sources = sources,
sorting = { sorting = {
comparators = { comparators = {
require('cmp_ai.compare'),
cmp.config.compare.offset, cmp.config.compare.offset,
cmp.config.compare.exact, cmp.config.compare.exact,
cmp.config.compare.recently_used, cmp.config.compare.recently_used,
@@ -89,3 +154,4 @@ return {
require("cmp_git").setup() require("cmp_git").setup()
end end
} }
}

View File

@@ -68,24 +68,24 @@ return {
} }
} }
local keymap = vim.api.nvim_set_keymap -- local keymap = vim.api.nvim_set_keymap
local opts = {noremap = true, silent = true} -- local opts = {noremap = true, silent = true}
--
keymap("n", "<LEADER>plf", ":PerfLoadFlat<CR>", opts) -- keymap("n", "<LEADER>plf", ":PerfLoadFlat<CR>", opts)
keymap("n", "<LEADER>plg", ":PerfLoadCallGraph<CR>", opts) -- keymap("n", "<LEADER>plg", ":PerfLoadCallGraph<CR>", opts)
keymap("n", "<LEADER>plo", ":PerfLoadFlameGraph<CR>", opts) -- keymap("n", "<LEADER>plo", ":PerfLoadFlameGraph<CR>", opts)
--
keymap("n", "<LEADER>pe", ":PerfPickEvent<CR>", opts) -- keymap("n", "<LEADER>pe", ":PerfPickEvent<CR>", opts)
--
keymap("n", "<LEADER>pa", ":PerfAnnotate<CR>", opts) -- keymap("n", "<LEADER>pa", ":PerfAnnotate<CR>", opts)
keymap("n", "<LEADER>pf", ":PerfAnnotateFunction<CR>", opts) -- keymap("n", "<LEADER>pf", ":PerfAnnotateFunction<CR>", opts)
keymap("v", "<LEADER>pa", ":PerfAnnotateSelection<CR>", opts) -- keymap("v", "<LEADER>pa", ":PerfAnnotateSelection<CR>", opts)
--
keymap("n", "<LEADER>pt", ":PerfToggleAnnotations<CR>", opts) -- keymap("n", "<LEADER>pt", ":PerfToggleAnnotations<CR>", opts)
--
keymap("n", "<LEADER>ph", ":PerfHottestLines<CR>", opts) -- keymap("n", "<LEADER>ph", ":PerfHottestLines<CR>", opts)
keymap("n", "<LEADER>ps", ":PerfHottestSymbols<CR>", opts) -- keymap("n", "<LEADER>ps", ":PerfHottestSymbols<CR>", opts)
keymap("n", "<LEADER>pc", ":PerfHottestCallersFunction<CR>", opts) -- keymap("n", "<LEADER>pc", ":PerfHottestCallersFunction<CR>", opts)
keymap("v", "<LEADER>pc", ":PerfHottestCallersSelection<CR>", opts) -- keymap("v", "<LEADER>pc", ":PerfHottestCallersSelection<CR>", opts)
end end
} }

View File

@@ -1,5 +1,16 @@
return { return {
'hedyhli/outline.nvim', 'stevearc/aerial.nvim',
config = true, config = function()
cmd = { 'OutlineOpen' } require("aerial").setup({
-- optionally use on_attach to set keymaps when aerial has attached to a buffer
on_attach = function(bufnr)
-- Jump forwards/backwards with '{' and '}'
vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
end,
})
-- You probably also want to set a keymap to toggle aerial
--vim.keymap.set("n", "<leader>a", "<cmd>AerialToggle!<CR>")
end,
cmd = { 'AerialToggle' }
} }

View File

@@ -1,3 +1,3 @@
return { return {
"wellle/targets.vim", "tpope/vim-surround",
} }

View File

@@ -4,6 +4,12 @@ return {
'debugloop/telescope-undo.nvim', 'debugloop/telescope-undo.nvim',
'molecule-man/telescope-menufacture', 'molecule-man/telescope-menufacture',
'xiyaowong/telescope-emoji.nvim', 'xiyaowong/telescope-emoji.nvim',
{
{
"isak102/telescope-git-file-history.nvim",
dependencies = { "tpope/vim-fugitive" }
}
}
}, },
event = 'VeryLazy', event = 'VeryLazy',
--cmd = ":Telescope", --cmd = ":Telescope",
@@ -33,6 +39,7 @@ return {
require('telescope').load_extension('undo') require('telescope').load_extension('undo')
require('telescope').load_extension('menufacture') require('telescope').load_extension('menufacture')
require("telescope").load_extension("emoji") require("telescope").load_extension("emoji")
require("telescope").load_extension("git_file_history")
local def = { noremap = true, silent = true } local def = { noremap = true, silent = true }
local map = vim.keymap.set local map = vim.keymap.set
map('n', '<leader>r', '<cmd>lua require("telescope.builtin").resume()<cr>', def) map('n', '<leader>r', '<cmd>lua require("telescope.builtin").resume()<cr>', def)
@@ -52,6 +59,7 @@ return {
-- map('n', '<leader>gc', '<cmd>lua require("telescope.builtin").git_commits()<cr>', def) -- map('n', '<leader>gc', '<cmd>lua require("telescope.builtin").git_commits()<cr>', def)
-- map('n', '<leader>gC', '<cmd>lua require("telescope.builtin").git_bcommits()<cr>', def) -- map('n', '<leader>gC', '<cmd>lua require("telescope.builtin").git_bcommits()<cr>', def)
-- map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', def) -- map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', def)
-- map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', def)
-- other -- other
-- map('n', '<leader>s', '<cmd>lua require('telescope').extensions.ultisnips.ultisnips()<cr>, def) -- map('n', '<leader>s', '<cmd>lua require('telescope').extensions.ultisnips.ultisnips()<cr>, def)
map('n', '<leader>u', '<cmd>lua require("telescope").extensions.undo.undo()<cr>', def) map('n', '<leader>u', '<cmd>lua require("telescope").extensions.undo.undo()<cr>', def)

View File

@@ -0,0 +1,8 @@
return {
'aserowy/tmux.nvim',
opts = {
navigation = {
cycle_navigation = false
}
}
}

View File

@@ -10,13 +10,17 @@ return {
config = function() config = function()
-- Tree-sitter configuration -- Tree-sitter configuration
ts = require'nvim-treesitter.configs' local ts = require'nvim-treesitter.configs'
ts.setup { ts.setup {
highlight = { highlight = {
enable = true, enable = true,
disable = function(lang, buf) disable = function(lang, buf)
return vim.api.nvim_buf_line_count(buf) > 5000 local max_filesize = 100 * 1024
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end, end,
additional_vim_regex_highlighting = false, additional_vim_regex_highlighting = false,
}, },
@@ -60,10 +64,9 @@ return {
"vim", "vim",
"yaml", "yaml",
}, },
-- disabled, since it mostly shifts to four characters indent = {
--indent = { enable = true,
-- enable = true, },
--},
incremental_selection = { incremental_selection = {
enable = true, enable = true,
keymaps = { keymaps = {
@@ -79,7 +82,7 @@ return {
include_match_words include_match_words
}, },
} }
-- vim.opt.foldmethod = "expr" vim.opt.foldmethod = "expr"
-- vim.opt.foldexpr = "nvim_treesitter#foldexpr()" vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
end end
} }

View File

@@ -1,4 +1,4 @@
return { return {
'artemave/workspace-diagnostics.nvim', 'folke/trouble.nvim',
config = true, config = true,
} }

View File

@@ -18,17 +18,125 @@ return {
require("cmake-tools").setup { require("cmake-tools").setup {
cmake_command = "cmake", cmake_command = "cmake",
ctest_command = "ctest",
cmake_generate_options = { "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" },
cmake_build_options = { "-j 15" },
cmake_build_directory = "build", cmake_build_directory = "build",
cmake_generate_options = { "-D", "CMAKE_EXPORT_COMPILE_COMMANDS=1" }, cmake_soft_link_compile_commands = true, -- this will automatically make a soft link from compile commands file to project root dir
cmake_build_options = {}, cmake_compile_commands_from_lsp = false, -- this will automatically set compile commands file location using lsp, to use it, please set `cmake_soft_link_compile_commands` to false
cmake_console_size = 10, -- cmake output window height cmake_kits_path = nil, -- this is used to specify global cmake kits path, see CMakeKits for detailed usage
cmake_show_console = "always", -- "always", "only_on_error"
cmake_dap_configuration = { name = "cpp", type = "codelldb", request = "launch" }, -- dap configuration, optional
--cmake_dap_open_command = require("dap").repl.open, -- optional
cmake_variants_message = { cmake_variants_message = {
short = { show = true }, short = { show = true }, -- whether to show short message
long = { show = true, max_length = 40 } long = { show = true, max_length = 40 }, -- whether to show long message
} },
} cmake_dap_configuration = { -- debug settings for cmake
name = "cmake_tools",
type = "gdb",
request = "launch",
stopOnEntry = false,
runInTerminal = true,
console = "integratedTerminal",
},
cmake_executor = { -- executor to use
name = "toggleterm", -- name of the executor
opts = {}, -- the options the executor will get, possible values depend on the executor type. See `default_opts` for possible values.
default_opts = { -- a list of default and possible values for executors
quickfix = {
show = "always", -- "always", "only_on_error"
position = "belowright", -- "vertical", "horizontal", "leftabove", "aboveleft", "rightbelow", "belowright", "topleft", "botright", use `:h vertical` for example to see help on them
size = 10,
encoding = "utf-8", -- if encoding is not "utf-8", it will be converted to "utf-8" using `vim.fn.iconv`
auto_close_when_success = true, -- typically, you can use it with the "always" option; it will auto-close the quickfix buffer if the execution is successful.
},
toggleterm = {
direction = "float", -- 'vertical' | 'horizontal' | 'tab' | 'float'
close_on_exit = false, -- whether close the terminal when exit
auto_scroll = true, -- whether auto scroll to the bottom
},
overseer = {
new_task_opts = {
strategy = {
"toggleterm",
direction = "horizontal",
autos_croll = true,
quit_on_exit = "success"
}
}, -- options to pass into the `overseer.new_task` command
on_new_task = function(task)
require("overseer").open(
{ enter = false, direction = "right" }
)
end, -- a function that gets overseer.Task when it is created, before calling `task:start`
},
terminal = {
name = "Main Terminal",
prefix_name = "[CMakeTools]: ", -- This must be included and must be unique, otherwise the terminals will not work. Do not use a simple spacebar " ", or any generic name
split_direction = "horizontal", -- "horizontal", "vertical"
split_size = 11,
-- Window handling
single_terminal_per_instance = true, -- Single viewport, multiple windows
single_terminal_per_tab = true, -- Single viewport per tab
keep_terminal_static_location = true, -- Static location of the viewport if available
-- Running Tasks
start_insert = false, -- If you want to enter terminal with :startinsert upon using :CMakeRun
focus = false, -- Focus on terminal when cmake task is launched.
do_not_add_newline = false, -- Do not hit enter on the command inserted when using :CMakeRun, allowing a chance to review or modify the command before hitting enter.
}, -- terminal executor uses the values in cmake_terminal
},
},
cmake_runner = { -- runner to use
name = "toggleterm", -- name of the runner
opts = {}, -- the options the runner will get, possible values depend on the runner type. See `default_opts` for possible values.
default_opts = { -- a list of default and possible values for runners
quickfix = {
show = "always", -- "always", "only_on_error"
position = "belowright", -- "bottom", "top"
size = 10,
encoding = "utf-8",
auto_close_when_success = true, -- typically, you can use it with the "always" option; it will auto-close the quickfix buffer if the execution is successful.
},
toggleterm = {
direction = "float", -- 'vertical' | 'horizontal' | 'tab' | 'float'
close_on_exit = false, -- whether close the terminal when exit
auto_scroll = true, -- whether auto scroll to the bottom
},
overseer = {
new_task_opts = {
strategy = {
"toggleterm",
direction = "horizontal",
autos_croll = true,
quit_on_exit = "success"
}
}, -- options to pass into the `overseer.new_task` command
on_new_task = function(task)
end, -- a function that gets overseer.Task when it is created, before calling `task:start`
},
terminal = {
name = "Main Terminal",
prefix_name = "[CMakeTools]: ", -- This must be included and must be unique, otherwise the terminals will not work. Do not use a simple spacebar " ", or any generic name
split_direction = "horizontal", -- "horizontal", "vertical"
split_size = 11,
-- Window handling
single_terminal_per_instance = true, -- Single viewport, multiple windows
single_terminal_per_tab = true, -- Single viewport per tab
keep_terminal_static_location = true, -- Static location of the viewport if available
-- Running Tasks
start_insert = false, -- If you want to enter terminal with :startinsert upon using :CMakeRun
focus = false, -- Focus on terminal when cmake task is launched.
do_not_add_newline = false, -- Do not hit enter on the command inserted when using :CMakeRun, allowing a chance to review or modify the command before hitting enter.
},
},
},
cmake_notifications = {
runner = { enabled = true },
executor = { enabled = true },
spinner = { "", "", "", "", "", "", "", "", "", "" }, -- icons used for progress display
refresh_rate_ms = 100, -- how often to iterate icons
}, }
end end
} }

View File

@@ -8,6 +8,7 @@
# unless explicitly requested using the wintypes option. # unless explicitly requested using the wintypes option.
# #
# shadow = false # shadow = false
shadow = true;
# The blur radius for shadows, in pixels. (defaults to 12) # The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12 # shadow-radius = 12
@@ -24,16 +25,6 @@ shadow-offset-x = -7;
# shadow-offset-y = -15 # shadow-offset-y = -15
shadow-offset-y = -7; shadow-offset-y = -7;
# Avoid drawing shadows on dock/panel windows. This option is deprecated,
# you should use the *wintypes* option in your config file instead.
#
# no-dock-shadow = false
# Don't draw shadows on drag-and-drop windows. This option is deprecated,
# you should use the *wintypes* option in your config file instead.
#
# no-dnd-shadow = false
# Red color value of shadow (0.0 - 1.0, defaults to 0). # Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0 # shadow-red = 0
@@ -43,31 +34,22 @@ shadow-offset-y = -7;
# Blue color value of shadow (0.0 - 1.0, defaults to 0). # Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0 # shadow-blue = 0
# Do not paint shadows on shaped windows. Note shaped windows # Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
# here means windows setting its shape through X Shape extension. # shadow-color = "#000000"
# Those using ARGB background is beyond our control.
# Deprecated, use
# shadow-exclude = 'bounding_shaped'
# or
# shadow-exclude = 'bounding_shaped && !rounded_corners'
# instead.
#
# shadow-ignore-shaped = ''
# Specify a list of conditions of windows that should have no shadow. # Specify a list of conditions of windows that should have no shadow.
#
# examples:
# shadow-exclude = "n:e:Notification";
#
# shadow-exclude = [] # shadow-exclude = []
shadow-exclude = [ shadow-exclude = [
"name = 'Notification'", "name = 'Notification'",
"class_g = 'Conky'", "class_g = 'Conky'",
"class_g ?= 'Notify-osd'", "class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'", "class_g = 'Cairo-clock'",
"_GTK_FRAME_EXTENTS@:c" "_GTK_FRAME_EXTENTS@"
]; ];
# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window.
# clip-shadow-above = []
# Specify a X geometry that describes the region in which shadow should not # Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use # be painted in, such as a dock window region. Use
# shadow-exclude-reg = "x10+0+0" # shadow-exclude-reg = "x10+0+0"
@@ -75,8 +57,9 @@ shadow-exclude = [
# #
# shadow-exclude-reg = "" # shadow-exclude-reg = ""
# Crop shadow of a window fully on a particular Xinerama screen to the screen. # Crop shadow of a window fully on a particular monitor to that monitor. This is
# xinerama-shadow-crop = false # currently implemented using the X RandR extension.
# crop-shadow-to-monitor = false
################################# #################################
@@ -87,15 +70,15 @@ shadow-exclude = [
# Fade windows in/out when opening/closing and when opacity changes, # Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used. # unless no-fading-openclose is used.
# fading = false # fading = false
fading = false fading = true;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) # Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028 # fade-in-step = 0.028
fade-in-step = 0.03; fade-in-step = 0.10;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) # Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03 # fade-out-step = 0.03
fade-out-step = 0.03; fade-out-step = 0.20;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10) # The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
# fade-delta = 10 # fade-delta = 10
@@ -117,26 +100,23 @@ fade-out-step = 0.03;
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) # Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 1 # inactive-opacity = 1
inactive-opacity = 0.8; # inactive-opacity = 0.8;
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) # Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0 # frame-opacity = 1.0
frame-opacity = 0.5; frame-opacity = 0.7;
# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0) # Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows.
# menu-opacity = 1.0
# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows.
# inactive-opacity-override = true # inactive-opacity-override = true
inactive-opacity-override = false; inactive-opacity-override = false;
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) # Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
active-opacity = 0.95 # active-opacity = 1.0
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0) # Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
#inactive-dim = 0.05 # inactive-dim = 0.0
# Specify a list of conditions of windows that should always be considered focused. # Specify a list of conditions of windows that should never be considered focused.
# focus-exclude = [] # focus-exclude = []
focus-exclude = [ "class_g = 'Cairo-clock'" ]; focus-exclude = [ "class_g = 'Cairo-clock'" ];
@@ -153,6 +133,20 @@ focus-exclude = [ "class_g = 'Cairo-clock'" ];
opacity-rule = [ "100:name *= 'Firefox'", opacity-rule = [ "100:name *= 'Firefox'",
"100:name *= 'Chrome'", "100:name *= 'Chrome'",
"100:name *= 'Slack'"] "100:name *= 'Slack'"]
#################################
# Corners #
#################################
# Sets the radius of rounded window corners. When > 0, the compositor will
# round the corners of windows. Does not interact well with
# `transparent-clipping`.
corner-radius = 0
# Exclude conditions for rounded corners.
rounded-corners-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'"
];
################################# #################################
@@ -162,9 +156,11 @@ opacity-rule = [ "100:name *= 'Firefox'",
# Parameters for background blurring, see the *BLUR* section for more information. # Parameters for background blurring, see the *BLUR* section for more information.
# blur-method = # blur-method =
blur-size = 12 blur-size = 16
# #
# blur-deviation = false # blur-deviation = false
#
blur-strength = 20
# Blur background of semi-transparent / ARGB windows. # Blur background of semi-transparent / ARGB windows.
# Bad in performance, with driver-dependent behavior. # Bad in performance, with driver-dependent behavior.
@@ -188,8 +184,8 @@ blur-background = true
# example: # example:
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; # blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
# #
# blur-kern = '' # blur-kern = ""
blur-kern = "3x3box"; blur-kern = "7x7box";
# Exclude conditions for background blur. # Exclude conditions for background blur.
@@ -197,28 +193,32 @@ blur-kern = "3x3box";
blur-background-exclude = [ blur-background-exclude = [
"window_type = 'dock'", "window_type = 'dock'",
"window_type = 'desktop'", "window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c" "_GTK_FRAME_EXTENTS@"
]; ];
################################# #################################
# General Settings # # General Settings #
################################# #################################
# Enable remote control via D-Bus. See the man page for more details.
# dbus = true
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. # Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false # daemon = false
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. # Specify the backend to use: `xrender`, `glx`, `egl` or `xr_glx_hybrid`.
# `xrender` is the default one. # `xrender` is the default one.
# #
# backend = 'glx' # backend = "glx"
backend = "xrender"; backend = "xrender";
# Enable/disable VSync. # Use higher precision during rendering, and apply dither when presenting the
# vsync = false # rendered screen. Reduces banding artifacts, but might cause performance
vsync = true # degradation. Only works with OpenGL.
dithered-present = false;
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details. # Enable/disable VSync.
# dbus = false vsync = true
# Try to detect WM windows (a non-override-redirect window with no # Try to detect WM windows (a non-override-redirect window with no
# child that has 'WM_STATE') and mark them as active. # child that has 'WM_STATE') and mark them as active.
@@ -236,20 +236,12 @@ mark-ovredir-focused = true;
# detect-rounded-corners = false # detect-rounded-corners = false
detect-rounded-corners = true; detect-rounded-corners = true;
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers # Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_OPACITY' of client windows to frame windows. # not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows.
# #
# detect-client-opacity = false # detect-client-opacity = false
detect-client-opacity = true; detect-client-opacity = true;
# Limit picom to repaint at most once every 1 / 'refresh_rate' second to
# boost performance. This should not be used with
# vsync drm/opengl/opengl-oml
# as they essentially does sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#
# sw-opti =
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, # Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, # rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it. # provided that the WM supports it.
@@ -272,14 +264,14 @@ detect-client-opacity = true;
# in the same group focused at the same time. # in the same group focused at the same time.
# #
# detect-transient = false # detect-transient = false
detect-transient = true detect-transient = true;
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same # Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if # group focused at the same time. This usually means windows from the same application
# detect-transient is enabled, too. # will be considered focused or unfocused at the same time.
# 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too.
# #
# detect-client-leader = false # detect-client-leader = false
detect-client-leader = true
# Resize damaged region by a specific number of pixels. # Resize damaged region by a specific number of pixels.
# A positive value enlarges it while a negative one shrinks it. # A positive value enlarges it while a negative one shrinks it.
@@ -314,12 +306,12 @@ detect-client-leader = true
# glx-no-rebind-pixmap = false # glx-no-rebind-pixmap = false
# Disable the use of damage information. # Disable the use of damage information.
# This cause the whole screen to be redrawn everytime, instead of the part of the screen # This cause the whole screen to be redrawn every time, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts. # has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage # The opposing option is use-damage
# #
# no-use-damage = false # no-use-damage = false
use-damage = true use-damage = true;
# Use X Sync fence to sync clients' draw calls, to make sure all draw # Use X Sync fence to sync clients' draw calls, to make sure all draw
# calls are finished before picom starts drawing. Needed on nvidia-drivers # calls are finished before picom starts drawing. Needed on nvidia-drivers
@@ -327,11 +319,17 @@ use-damage = true
# #
# xrender-sync-fence = false # xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window contents. # GLX backend: Use specified GLSL fragment shader for rendering window
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` # contents. Read the man page for a detailed explanation of the interface.
# in the source tree for examples.
# #
# glx-fshader-win = '' # window-shader-fg = "default"
# Use rules to set per-window shaders. Syntax is SHADER_PATH:PATTERN, similar
# to opacity-rule. SHADER_PATH can be "default". This overrides window-shader-fg.
#
# window-shader-fg-rule = [
# "my_shader.frag:window_type != 'dock'"
# ]
# Force all windows to be painted with blending. Useful if you # Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent. # have a glx-fshader-win that could turn opaque pixels transparent.
@@ -355,6 +353,12 @@ use-damage = true
# #
# transparent-clipping = false # transparent-clipping = false
# Specify a list of conditions of windows that should never have transparent
# clipping applied. Useful for screenshot tools, where you need to be able to
# see through transparent parts of the window.
#
# transparent-clipping-exclude = []
# Set the log level. Possible values are: # Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error" # "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter. # in increasing level of importance. Case doesn't matter.
@@ -370,13 +374,13 @@ log-level = "warn";
# logs might still be written to the stderr. # logs might still be written to the stderr.
# When setting this option from the config file, it is recommended to use an absolute path. # When setting this option from the config file, it is recommended to use an absolute path.
# #
# log-file = '/path/to/your/log/file' # log-file = "/path/to/your/log/file"
# Show all X errors (for debugging) # Show all X errors (for debugging)
# show-all-xerrors = false # show-all-xerrors = false
# Write process ID to a file. # Write process ID to a file.
# write-pid-path = '/path/to/your/log/file' # write-pid-path = "/path/to/your/log/file"
# Window type settings # Window type settings
# #
@@ -402,6 +406,10 @@ log-level = "warn";
# normally won't be able to see. Useful when the window has parts of it # normally won't be able to see. Useful when the window has parts of it
# transparent, and you want shadows in those areas. # transparent, and you want shadows in those areas.
# #
# clip-shadow-above:::
# Controls whether shadows that would have been drawn above the window should
# be clipped. Useful for dock windows that should have no shadow painted on top.
#
# redir-ignore::: # redir-ignore:::
# Controls whether this type of windows should cause screen to become # Controls whether this type of windows should cause screen to become
# redirected again after been unredirected. If you have unredir-if-possible # redirected again after been unredirected. If you have unredir-if-possible
@@ -411,7 +419,7 @@ log-level = "warn";
wintypes: wintypes:
{ {
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
dock = { shadow = false; } dock = { shadow = false; clip-shadow-above = true; }
dnd = { shadow = false; } dnd = { shadow = false; }
popup_menu = { opacity = 0.8; } popup_menu = { opacity = 0.8; }
dropdown_menu = { opacity = 0.8; } dropdown_menu = { opacity = 0.8; }