Compare commits

...

2 Commits

Author SHA1 Message Date
Robert Kmieć
3729e67247 Git: add few bits to improve mergetool and diff 2023-08-17 23:44:27 +02:00
Robert Kmieć
89b4343ca1 Nvim: add missing files for various plugins 2023-08-17 23:43:39 +02:00
11 changed files with 291 additions and 94 deletions

View File

@@ -0,0 +1,6 @@
return {
"HampusHauffman/block.nvim",
config = function()
require("block").setup({})
end
}

View File

@@ -0,0 +1,6 @@
return {
'kiran94/edit-markdown-table.nvim',
config = true,
dependencies = { "nvim-treesitter/nvim-treesitter" },
cmd = "EditMarkdownTable",
}

View File

@@ -8,7 +8,87 @@ return {
}, },
config = function() config = function()
local nvim_lsp = require('lspconfig') local nvim_lsp = require('lspconfig')
local clangd_extensions = require('clangd_extensions') local clangd_extensions = require('clangd_extensions').setup({
inlay_hints = {
inline = false,
-- Options other than `highlight' and `priority' only work
-- if `inline' is disabled
-- Only show inlay hints for the current line
only_current_line = true,
-- Event which triggers a refresh of the inlay hints.
-- You can make this { "CursorMoved" } or { "CursorMoved,CursorMovedI" } but
-- not that this may cause higher CPU usage.
-- This option is only respected when only_current_line and
-- autoSetHints both are true.
only_current_line_autocmd = { "CursorHold" },
-- whether to show parameter hints with the inlay hints or not
show_parameter_hints = true,
-- prefix for parameter hints
parameter_hints_prefix = "",
-- prefix for all the other hints (type, chaining)
other_hints_prefix = "",
-- whether to align to the length of the longest line in the file
max_len_align = false,
-- padding from the left if max_len_align is true
max_len_align_padding = 1,
-- whether to align to the extreme right or not
right_align = false,
-- padding from the right if right_align is true
right_align_padding = 7,
-- The color of the hints
highlight = "Comment",
-- The highlight group priority for extmark
priority = 100,
},
ast = {
-- These are unicode, should be available in any font
role_icons = {
type = "🄣",
declaration = "🄓",
expression = "🄔",
statement = ";",
specifier = "🄢",
["template argument"] = "🆃",
},
kind_icons = {
Compound = "🄲",
Recovery = "🅁",
TranslationUnit = "🅄",
PackExpansion = "🄿",
TemplateTypeParm = "🅃",
TemplateTemplateParm = "🅃",
TemplateParamObject = "🅃",
},
--[[ These require codicons (https://github.com/microsoft/vscode-codicons)
role_icons = {
type = "",
declaration = "",
expression = "",
specifier = "",
statement = "",
["template argument"] = "",
},
kind_icons = {
Compound = "",
Recovery = "",
TranslationUnit = "",
PackExpansion = "",
TemplateTypeParm = "",
TemplateTemplateParm = "",
TemplateParamObject = "",
}, ]]
highlights = {
detail = "Comment",
},
memory_usage = {
border = "none",
},
symbol_info = {
border = "none",
}
}
})
local lsp_signature = require('lsp_signature') local lsp_signature = require('lsp_signature')
-- Mappings. -- Mappings.
@@ -114,85 +194,6 @@ return {
nvim_lsp.clangd.setup({ nvim_lsp.clangd.setup({
settings = { settings = {
inlay_hints = {
inline = vim.fn.has("nvim-0.10") == 1,
-- Options other than `highlight' and `priority' only work
-- if `inline' is disabled
-- Only show inlay hints for the current line
only_current_line = false,
-- Event which triggers a refresh of the inlay hints.
-- You can make this { "CursorMoved" } or { "CursorMoved,CursorMovedI" } but
-- not that this may cause higher CPU usage.
-- This option is only respected when only_current_line and
-- autoSetHints both are true.
only_current_line_autocmd = { "CursorHold" },
-- whether to show parameter hints with the inlay hints or not
show_parameter_hints = true,
-- prefix for parameter hints
parameter_hints_prefix = "<- ",
-- prefix for all the other hints (type, chaining)
other_hints_prefix = "=> ",
-- whether to align to the length of the longest line in the file
max_len_align = false,
-- padding from the left if max_len_align is true
max_len_align_padding = 1,
-- whether to align to the extreme right or not
right_align = false,
-- padding from the right if right_align is true
right_align_padding = 7,
-- The color of the hints
highlight = "Comment",
-- The highlight group priority for extmark
priority = 100,
},
ast = {
-- These are unicode, should be available in any font
role_icons = {
type = "🄣",
declaration = "🄓",
expression = "🄔",
statement = ";",
specifier = "🄢",
["template argument"] = "🆃",
},
kind_icons = {
Compound = "🄲",
Recovery = "🅁",
TranslationUnit = "🅄",
PackExpansion = "🄿",
TemplateTypeParm = "🅃",
TemplateTemplateParm = "🅃",
TemplateParamObject = "🅃",
},
--[[ These require codicons (https://github.com/microsoft/vscode-codicons)
role_icons = {
type = "",
declaration = "",
expression = "",
specifier = "",
statement = "",
["template argument"] = "",
},
kind_icons = {
Compound = "",
Recovery = "",
TranslationUnit = "",
PackExpansion = "",
TemplateTypeParm = "",
TemplateTemplateParm = "",
TemplateParamObject = "",
}, ]]
highlights = {
detail = "Comment",
},
memory_usage = {
border = "none",
},
symbol_info = {
border = "none",
}
}
}, },
on_attach = on_attach, on_attach = on_attach,
--on_publish_diagnostics = diagnostic_handler, --on_publish_diagnostics = diagnostic_handler,

View File

@@ -0,0 +1,5 @@
return {
'richardbizik/nvim-toc',
ft = { "md", "markdown" },
config = true,
}

View File

@@ -0,0 +1,19 @@
return {
"echasnovski/mini.nvim",
version = false,
config = function()
local hipatterns = require('mini.hipatterns')
hipatterns.setup({
highlighters = {
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
fixme = { pattern = '%f[%w]()EFMC 0()%f[%W]', group = 'MiniHipatternsFixme' },
hack = { pattern = '%f[%w]()Vehicle 0()%f[%W]', group = 'MiniHipatternsHack' },
todo = { pattern = '%f[%w]()CoCo 0()%f[%W]', group = 'MiniHipatternsTodo' },
note = { pattern = '%f[%w]()EneM 0()%f[%W]', group = 'MiniHipatternsNote' },
-- Highlight hex color strings (`#rrggbb`) using that color
hex_color = hipatterns.gen_highlighter.hex_color(),
},
})
end
}

View File

@@ -51,15 +51,28 @@ return {
timeout = 500, timeout = 500,
}, },
view = { view = {
centralize_selection = false,
cursorline = true,
debounce_delay = 15,
width = 35, width = 35,
side = 'left', hide_root_folder = false,
mappings = { side = "left",
custom_only = false, preserve_window_proportions = false,
list = {}
},
number = false, number = false,
relativenumber = false, relativenumber = false,
signcolumn = "no" signcolumn = "no",
float = {
enable = false,
quit_on_focus_loss = true,
open_win_config = {
relative = "editor",
border = "rounded",
width = 30,
height = 30,
row = 1,
col = 1,
},
},
}, },
trash = { trash = {
cmd = "trash", cmd = "trash",

View File

@@ -1,6 +1,7 @@
return { return {
'toppair/peek.nvim', 'toppair/peek.nvim',
build = 'deno task --quiet build:fast', build = 'deno task --quiet build:fast',
ft = { "markdown", "md" },
config = function() config = function()
-- default config: -- default config:
require('peek').setup({ require('peek').setup({

View File

@@ -0,0 +1,91 @@
return {
"t-troebst/perfanno.nvim",
ft = { "cpp", "c" },
config = function()
require("perfanno").setup {
-- List of highlights that will be used to highlight hot lines (or nil to disable highlighting)
line_highlights = nil,
-- Highlight used for virtual text annotations (or nil to disable virtual text)
vt_highlight = nil,
-- Annotation formats that can be cycled between via :PerfCycleFormat
-- "percent" controls whether percentages or absolute counts should be displayed
-- "format" is the format string that will be used to display counts / percentages
-- "minimum" is the minimum value below which lines will not be annotated
-- Note: this also controls what shows up in the telescope finders
formats = {
{percent = true, format = "%.2f%%", minimum = 0.5},
{percent = false, format = "%d", minimum = 1}
},
-- Automatically annotate files after :PerfLoadFlat and :PerfLoadCallGraph
annotate_after_load = true,
-- Automatically annotate newly opened buffers if information is available
annotate_on_open = true,
-- Options for telescope-based hottest line finders
telescope = {
-- Enable if possible, otherwise the plugin will fall back to vim.ui.select
enabled = pcall(require, "telescope"),
-- Annotate inside of the preview window
annotate = true,
},
-- Node type patterns used to find the function that surrounds the cursor
ts_function_patterns = {
-- These should work for most languages (at least those used with perf)
default = {
"function",
"method",
},
-- Otherwise you can add patterns for specific languages like:
-- weirdlang = {
-- "weirdfunc",
-- }
}
}
local telescope = require("telescope")
local actions = telescope.extensions.perfanno.actions
telescope.setup {
extensions = {
perfanno = {
-- Special mappings in the telescope finders
mappings = {
["i"] = {
-- Find hottest callers of selected entry
["<C-h>"] = actions.hottest_callers,
-- Find hottest callees of selected entry
["<C-l>"] = actions.hottest_callees,
},
["n"] = {
["gu"] = actions.hottest_callers,
["gd"] = actions.hottest_callees,
}
}
}
}
}
local keymap = vim.api.nvim_set_keymap
local opts = {noremap = true, silent = true}
keymap("n", "<LEADER>plf", ":PerfLoadFlat<CR>", opts)
keymap("n", "<LEADER>plg", ":PerfLoadCallGraph<CR>", opts)
keymap("n", "<LEADER>plo", ":PerfLoadFlameGraph<CR>", opts)
keymap("n", "<LEADER>pe", ":PerfPickEvent<CR>", opts)
keymap("n", "<LEADER>pa", ":PerfAnnotate<CR>", opts)
keymap("n", "<LEADER>pf", ":PerfAnnotateFunction<CR>", opts)
keymap("v", "<LEADER>pa", ":PerfAnnotateSelection<CR>", opts)
keymap("n", "<LEADER>pt", ":PerfToggleAnnotations<CR>", opts)
keymap("n", "<LEADER>ph", ":PerfHottestLines<CR>", opts)
keymap("n", "<LEADER>ps", ":PerfHottestSymbols<CR>", opts)
keymap("n", "<LEADER>pc", ":PerfHottestCallersFunction<CR>", opts)
keymap("v", "<LEADER>pc", ":PerfHottestCallersSelection<CR>", opts)
end
}

View File

@@ -0,0 +1,30 @@
return {
"TobinPalmer/rayso.nvim",
cmd = { 'Rayso' },
config = function()
require('rayso').setup{
base_url = 'https://ray.so/', -- Default URL
open_cmd = 'firefox', -- On MacOS, will open with open -a firefox.app. Other OS's are untested.
options = {
background = true, -- If the screenshot should have a background.
dark_mode = true, -- If the screenshot should be in dark mode.
logging_path = '', -- Path to create a log file in.
logging_file = 'rayso', -- Name of log file, will be a markdown file, ex rayso.md.
logging_enabled = false, -- If you enable the logging file.
padding = 32, -- The default padding that the screenshot will have.
theme = 'crimson', -- Theme
title = 'Untitled', -- Default title
}
}
end
}
--"narutoxy/silicon.lua",
-- {'krivahtoo/silicon.nvim', build = './install.sh',
-- config = function()
-- require('silicon').setup({
-- font = 'DaddyTimeMono Nerd Font=16',
-- theme = 'Monokai Extended',
-- })
-- end
-- },

View File

@@ -0,0 +1,16 @@
return {
"xiyaowong/transparent.nvim",
config = function()
require("transparent").setup({
groups = { -- table: default groups
'Normal', 'NormalNC', 'Comment', 'Constant', 'Special', 'Identifier',
'Statement', 'PreProc', 'Type', 'Underlined', 'Todo', 'String', 'Function',
'Conditional', 'Repeat', 'Operator', 'Structure', 'LineNr', 'NonText',
'SignColumn', 'CursorLineNr', 'EndOfBuffer',
},
extra_groups = {}, -- table: additional groups that should be cleared
exclude_groups = {}, -- table: groups you don't want to clear
})
end,
cmd = {"TransparentEnable", "TransparentDisable", "TransparentToggle" },
}

View File

@@ -21,10 +21,17 @@
smtpserver = smtp.gmail.com smtpserver = smtp.gmail.com
smtpuser = robert.r.kmiec@gmail.com smtpuser = robert.r.kmiec@gmail.com
smtpserverport = 587 smtpserverport = 587
[diff]
tool = vimdiff
[merge] [merge]
tool = vimdiff conflictstyle = diff3
tool = nfugitive
[mergetool "nfugitive"]
cmd = nvim -c "Gvdiffsplit!" "$MERGED"
[diff]
tool = nvimdiff
[difftool "nvimdiff"]
cmd = nvim -d "$LOCAL" "$REMOTE"
[diff "markdown"]
xfuncname = "^#+.*$"
[filter "lfs"] [filter "lfs"]
clean = git-lfs clean -- %f clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f smudge = git-lfs smudge -- %f
@@ -33,7 +40,7 @@
[alias] [alias]
cm = commit cm = commit
co = checkout co = checkout
br = branch br = branch -vva
st = status st = status
d = diff d = diff
dc = diff --cached dc = diff --cached
@@ -58,6 +65,8 @@
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J' cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[init] [init]
defaultBranch = master defaultBranch = master
[diff "image"] #[diff "image"]
command = /home/kmcr/tools/git-diff-image/git_diff_image # command = /home/kmcr/tools/git-diff-image/git_diff_image
textconv = imgcat # textconv = imgcat
[advice]
detachedHead = false