Compare commits

..

2 Commits

Author SHA1 Message Date
Robert Kmieć
c665c5ba37 Nvim: Update all plugins 2025-04-23 01:37:19 +02:00
Robert Kmieć
43e7fb01f5 Git: add gitmessage to gitignore 2025-04-23 01:32:05 +02:00
17 changed files with 269 additions and 162 deletions

View File

@@ -1,2 +1,3 @@
.ackrc .ackrc
.notags .notags
.gitmessage

View File

@@ -1,3 +1,4 @@
require('core.config') require('core.config')
require('core.plugins') require('core.plugins')
require('core.mappings') require('core.mappings')
require('core.autocmd')

View File

@@ -0,0 +1,3 @@
{
"workspace.checkThirdParty": false
}

View File

@@ -0,0 +1,29 @@
local api = vim.api
local autocmd = api.nvim_create_autocmd
local augroup = api.nvim_create_augroup
local opt = vim.opt
local o = vim.o
local g = vim.g
local fn = vim.fn
autocmd("BufWritePre", {
desc = "Autocreate a dir when saving a file",
group = augroup("auto_create_dir", { clear = true }),
callback = function(event)
if event.match:match("^%w%w+:[\\/][\\/]") then
return
end
local file = vim.uv.fs_realpath(event.match) or event.match
fn.mkdir(fn.fnamemodify(file, ":p:h"), "p")
end,
})
autocmd("BufReadPost", {
desc = "Auto jump to last position",
group = augroup("auto-last-position", { clear = true }),
callback = function(args)
local position = api.nvim_buf_get_mark(args.buf, [["]])
local winid = fn.bufwinid(args.buf)
pcall(api.nvim_win_set_cursor, winid, position)
end,
})

View File

@@ -15,7 +15,7 @@ vim.opt.undofile = true
vim.opt.conceallevel = 1 vim.opt.conceallevel = 1
vim.opt.shell = '/bin/bash' --vim.opt.shell = '/bin/bash'
vim.opt.number = true vim.opt.number = true
--vim.o.relativenumber = 1 --vim.o.relativenumber = 1
@@ -33,7 +33,7 @@ vim.opt.splitright = true
-- gui settings -- gui settings
vim.opt.guifont="IBM Plex Mono Text:h9:e-subpixelantyalias" vim.opt.guifont="IBM Plex Mono Text:h9:e-subpixelantyalias"
vim.g.neovide_cursor_vfx_mode = 'pixiedust' vim.g.neovide_cursor_vfx_mode = 'pixiedust'
vim.g.neovide_refresh_rate = 120 vim.g.neovide_refresh_rate = 165
vim.g.neovide_refresh_rate_idle = 5 vim.g.neovide_refresh_rate_idle = 5
vim.g.neovide_remember_window_size = 0 vim.g.neovide_remember_window_size = 0
@@ -107,32 +107,4 @@ vim.opt.wildignore = [[
*/tmp/*,*.so,*.swp,*.zip,**/node_modules/**,**/target/**,**.terraform/**" */tmp/*,*.so,*.swp,*.zip,**/node_modules/**,**/target/**,**.terraform/**"
]] ]]
-- Only setup gnvim when it attaches.
vim.api.nvim_create_autocmd({'UIEnter'}, {
callback = function(event)
local chanid = vim.v.event['chan']
local chan = vim.api.nvim_get_chan_info(chanid)
if chan.client and chan.client.name ~= 'gnvim' then
return
end
-- Gnvim brings its own runtime files.
local gnvim = require('gnvim')
-- Set the font
vim.opt.guifont = 'iM WritingMonoS Nerd Font'
-- Increase/decrease font.
vim.keymap.set('n', '<c-+>', function() gnvim.font_size(1) end)
vim.keymap.set('n', '<c-->', function() gnvim.font_size(-1) end)
gnvim.setup({
cursor = {
blink_transition = 300
}
})
end
})
vim.g.loaded_perl_provider = 0 vim.g.loaded_perl_provider = 0

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', default_options) map('n', 'Q', ':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,6 +1,6 @@
return { return {
"aznhe21/actions-preview.nvim", "aznhe21/actions-preview.nvim",
config = function() config = function()
vim.keymap.set({ "v", "n" }, "<leader>ca", require("actions-preview").code_actions) vim.keymap.set({ "v", "n" }, "gra", require("actions-preview").code_actions)
end, end,
} }

View File

@@ -0,0 +1,5 @@
return {
"yutkat/git-rebase-auto-diff.nvim",
ft = { "gitrebase" },
opts = {},
}

View File

@@ -1,9 +1,11 @@
return { { return { {
'saghen/blink.cmp', 'Saghen/blink.cmp',
-- optional: provides snippets for the snippet source -- optional: provides snippets for the snippet source
dependencies = { dependencies = {
'rafamadriz/friendly-snippets', 'rafamadriz/friendly-snippets',
'xzbdmw/colorful-menu.nvim' 'xzbdmw/colorful-menu.nvim',
'disrupted/blink-cmp-conventional-commits',
'moyiz/blink-emoji.nvim',
}, },
-- use a release tag to download pre-built binaries -- use a release tag to download pre-built binaries
@@ -23,10 +25,10 @@ return { {
keymap = { preset = 'default' }, keymap = { preset = 'default' },
appearance = { appearance = {
-- Sets the fallback highlight groups to nvim-cmp's highlight groups -- -- Sets the fallback highlight groups to nvim-cmp's highlight groups
-- Useful for when your theme doesn't support blink.cmp -- -- Useful for when your theme doesn't support blink.cmp
-- Will be removed in a future release -- -- Will be removed in a future release
use_nvim_cmp_as_default = true, -- use_nvim_cmp_as_default = true,
-- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' -- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- Adjusts spacing to ensure icons are aligned -- Adjusts spacing to ensure icons are aligned
nerd_font_variant = 'mono' nerd_font_variant = 'mono'
@@ -35,7 +37,26 @@ return { {
-- Default list of enabled providers defined so that you can extend it -- Default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, due to `opts_extend` -- elsewhere in your config, without redefining it, due to `opts_extend`
sources = { sources = {
default = { 'lsp', 'path', 'snippets', 'buffer' }, default = { 'conventional_commits', 'lsp', 'path', 'snippets', 'buffer', 'emoji', 'codecompanion' },
providers = {
conventional_commits = {
name = "Conventional Commits",
module = 'blink-cmp-conventional-commits',
enabled = function()
return vim.bo.filetype == 'gitcommit'
end,
opts = {}
},
emoji = {
module = 'blink-emoji',
name = "Emoji",
score_offset = 15,
opts = { insert = true },
should_show_items = function()
return vim.tbl_contains({"gitcommit", "markdown" }, vim.o.filetype)
end,
}
}
}, },
completion = { completion = {
@@ -53,8 +74,13 @@ return { {
} }
} }
} }
} },
}
accept = { auto_brackets = { enabled = false }, },
ghost_text = { enabled = false },
},
-- experimental:
signature = { enabled = true },
}, },
opts_extend = { "sources.default" } opts_extend = { "sources.default" }
}, { }, {

View File

@@ -17,7 +17,7 @@ return {
adapters = { adapters = {
ollama = function() ollama = function()
return require("codecompanion.adapters").extend("ollama", { return require("codecompanion.adapters").extend("ollama", {
name = "qwen2.5-coder:latest", name = "gemma3:12b",
env = { env = {
url = "http://192.168.10.99:11434", url = "http://192.168.10.99:11434",
api_key = "OLLAMA_API_KEY", api_key = "OLLAMA_API_KEY",
@@ -31,7 +31,7 @@ return {
}, },
schema = { schema = {
model = { model = {
default = "qwen2.5-coder:latest", default = "gemma3:12b",
}, },
num_ctx = { num_ctx = {
default = 16384, default = 16384,

View File

@@ -2,9 +2,9 @@ return {
'lmantw/themify.nvim', 'lmantw/themify.nvim',
lazy = false, lazy = false,
priority = 999, priority = 1000,
dependencies = { dependencies = {
'Iron-E/nvim-highlite' --'Iron-E/nvim-highlite'
}, },
config = function() config = function()
require('themify').setup({ require('themify').setup({
@@ -33,7 +33,7 @@ return {
'kevinm6/kurayami.nvim', 'kevinm6/kurayami.nvim',
'gerardbm/vim-atomic', 'gerardbm/vim-atomic',
'fynnfluegge/monet.nvim', 'fynnfluegge/monet.nvim',
'sho-87/kanagawa-paper.nvim', 'thesimonho/kanagawa-paper.nvim',
'qaptoR-nvim/chocolatier.nvim', 'qaptoR-nvim/chocolatier.nvim',
'aliqyan-21/darkvoid.nvim', 'aliqyan-21/darkvoid.nvim',
'paulo-granthon/hyper.nvim', 'paulo-granthon/hyper.nvim',
@@ -41,7 +41,8 @@ return {
'aktersnurra/no-clown-fiesta.nvim', 'aktersnurra/no-clown-fiesta.nvim',
'kdheepak/monochrome.nvim', 'kdheepak/monochrome.nvim',
'ficcdaf/ashen.nvim', 'ficcdaf/ashen.nvim',
'm15a/nvim-srcerite', -- 'm15a/nvim-srcerite', - requires buggy highlite
'nyoom-engineering/oxocarbon.nvim',
'default' 'default'
}) })
end end

View File

@@ -23,5 +23,6 @@ return {
show_model = false, -- Displays which model you are using at the beginning of your chat session. show_model = false, -- Displays which model you are using at the beginning of your chat session.
no_auto_close = false, -- Never closes the window automatically. no_auto_close = false, -- Never closes the window automatically.
debug = false -- Prints errors and the command which is run. debug = false -- Prints errors and the command which is run.
} },
enabled = false
} }

View File

@@ -8,10 +8,12 @@ return {
local Space = { provider = " " } local Space = { provider = " " }
local colors = { local colors = {
bright_bg = utils.get_highlight("Folded").bg, bg = utils.get_highlight("Normal").bg,
bright_fg = utils.get_highlight("Folded").fg, fg = utils.get_highlight("Normal").fg,
bright_bg = utils.get_highlight("Normal").bg,
bright_fg = utils.get_highlight("Normal").fg,
red = utils.get_highlight("DiagnosticError").fg, red = utils.get_highlight("DiagnosticError").fg,
-- dark_red = utils.get_highlight("DiffDelete").bg, dark_red = utils.get_highlight("DiffDelete").bg,
green = utils.get_highlight("String").fg, green = utils.get_highlight("String").fg,
blue = utils.get_highlight("Function").fg, blue = utils.get_highlight("Function").fg,
gray = utils.get_highlight("NonText").fg, gray = utils.get_highlight("NonText").fg,
@@ -22,9 +24,9 @@ return {
diag_error = utils.get_highlight("DiagnosticError").fg, diag_error = utils.get_highlight("DiagnosticError").fg,
diag_hint = utils.get_highlight("DiagnosticHint").fg, diag_hint = utils.get_highlight("DiagnosticHint").fg,
diag_info = utils.get_highlight("DiagnosticInfo").fg, diag_info = utils.get_highlight("DiagnosticInfo").fg,
-- git_del = utils.get_highlight("diffDeleted").fg, git_del = utils.get_highlight("diffDeleted").fg,
-- git_add = utils.get_highlight("diffAdded").fg, git_add = utils.get_highlight("diffAdded").fg,
-- git_change = utils.get_highlight("diffChanged").fg, git_change = utils.get_highlight("diffChanged").fg,
} }
heirline.load_colors(colors) heirline.load_colors(colors)
@@ -362,6 +364,7 @@ return {
SpecialStatusline, SpecialStatusline,
InactiveStatusline, InactiveStatusline,
DefaultStatusline, DefaultStatusline,
colors = colors
} }
local Winbar = { { provider = "»" }, Space } local Winbar = { { provider = "»" }, Space }
@@ -373,6 +376,10 @@ return {
-- winbar = Winbar, -- winbar = Winbar,
tabline = TabLine, tabline = TabLine,
-- statuscolumn = StatusColumn -- statuscolumn = StatusColumn
opts = {
colors = colors
}
}) })
end end,
enabled = false
} }

View File

@@ -1,12 +1,11 @@
return { return {
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
dependencies = { dependencies = {
-- "SmiteshP/nvim-navbuddy", -- "SmiteshP/nvim-navbuddy",
"jubnzv/virtual-types.nvim", -- "jubnzv/virtual-types.nvim",
--"ray-x/lsp_signature.nvim", -- "ray-x/lsp_signature.nvim",
'sontungexpt/better-diagnostic-virtual-text', -- 'sontungexpt/better-diagnostic-virtual-text',
{url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"}, { url = "http://git.sr.ht/~p00f/clangd_extensions.nvim" },
}, },
config = function() config = function()
local nvim_lsp = require('lspconfig') local nvim_lsp = require('lspconfig')
@@ -58,37 +57,42 @@ return {
-- See `:help vim.lsp.*` for documentation on any of the below functions -- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf } local opts = { buffer = ev.buf }
-- vim.keymap.del("n", "gra", opts)
-- vim.keymap.del("v", "gra", opts)
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) --def vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) --vim.keymap.del("n", "grr", opts)
--def vim.keymap.set('n', 'gri', vim.lsp.buf.implementation, opts)
--def vim.keymap.set('n', 'gO', vim.lsp.buf.document_symbol, opts)
--def vim.keymap.set('n', 'grn', vim.lsp.buf.rename, opts)
--vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts) --vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
--vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts) --vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
--vim.keymap.set('n', '<space>wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, opts) --vim.keymap.set('n', '<space>wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, opts)
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, opts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts) vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts)
vim.keymap.set('n', '<F6>', '<cmd>ClangdSwitchSourceHeader<CR>', opts) vim.keymap.set('n', '<F6>', '<cmd>ClangdSwitchSourceHeader<CR>', opts)
vim.keymap.set("n", "<leader>q", function() vim.lsp.buf.format{ async = true } end, opts) vim.keymap.set("n", "<leader>q", function() vim.lsp.buf.format { async = true } end, opts)
require'virtualtypes'.on_attach() -- require 'virtualtypes'.on_attach()
-- require'lsp_signature'.on_attach({ -- require'lsp_signature'.on_attach({
-- floating_window = true, -- floating_window = true,
-- floating_window_above_cur_line = true, -- floating_window_above_cur_line = true,
-- floating_window_off_x = 10, -- floating_window_off_x = 10,
-- floating_window_off_y = 0, -- floating_window_off_y = 0,
-- }) -- })
require("better-diagnostic-virtual-text.api").setup_buf(ev.buf, { -- require("better-diagnostic-virtual-text.api").setup_buf(ev.buf, {
ui = { -- ui = {
wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long -- wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long
left_kept_space = 3, --- the number of spaces kept on the left side of the virtual text, make sure it enough to custom for each line -- left_kept_space = 3, --- the number of spaces kept on the left side of the virtual text, make sure it enough to custom for each line
right_kept_space = 3, --- the number of spaces kept on the right side of the virtual text, make sure it enough to custom for each line -- right_kept_space = 3, --- the number of spaces kept on the right side of the virtual text, make sure it enough to custom for each line
arrow = "", -- arrow = "  ",
up_arrow = "", -- up_arrow = "  ",
down_arrow = "", -- down_arrow = "  ",
above = false, -- the virtual text will be displayed above the line -- above = false, -- the virtual text will be displayed above the line
}, -- },
priority = 2003, -- the priority of virtual text -- priority = 2003, -- the priority of virtual text
inline = true}) -- inline = true
-- })
vim.diagnostic.config({ vim.diagnostic.config({
underline = false, underline = false,
@@ -100,9 +104,12 @@ return {
[vim.diagnostic.severity.WARN] = "" [vim.diagnostic.severity.WARN] = ""
} }
}, },
virtual_text = true, virtual_text = false,
update_in_insert = false, update_in_insert = false,
severity_sort = true severity_sort = true,
virtual_lines = {
current_line = true,
}
}) })
end end
}) })
@@ -140,6 +147,7 @@ return {
nvim_lsp.lua_ls.setup({ nvim_lsp.lua_ls.setup({
settings = { settings = {
Lua = { Lua = {
diagnostics = { globals = { "vim" } },
completion = { completion = {
callSnippet = "Replace" callSnippet = "Replace"
} }
@@ -147,22 +155,23 @@ 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" },
-- root_dir = nvim_lsp.util.find_git_ancestor, -- -- root_dir = nvim_lsp.util.find_git_ancestor,
root_dir = vim.fs.dirname(vim.fs.find('.git', { path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)), upward = true })[1]), -- root_dir = vim.fs.dirname(vim.fs.find('.git',
single_file_support = true, -- { path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)), upward = true })[1]),
settings = { -- single_file_support = true,
matlab = { -- settings = {
indexWorkspace = false, -- matlab = {
installPath = "/usr/local/MATLAB/R2022b", -- indexWorkspace = false,
matlabConnectionTiming = "onStart", -- installPath = "/usr/local/MATLAB/R2024b",
telemetry = true, -- matlabConnectionTiming = "onStart",
}, -- telemetry = true,
} -- },
}) -- }
-- })
--
nvim_lsp.typos_lsp.setup({ nvim_lsp.typos_lsp.setup({
cmd = { 'typos-lsp' }, cmd = { 'typos-lsp' },
filetypes = { '*' }, filetypes = { '*' },

View File

@@ -33,17 +33,58 @@ return { {
end, end,
ft = { "markdown", "md" }, ft = { "markdown", "md" },
}, },
-- {
-- "brianhuster/live-preview.nvim",
-- opts = {
-- cmd = "LivePreview", -- Main command of live-preview.nvim
-- port = 5500, -- Port to run the live preview server on.
-- autokill = false, -- If true, the plugin will autokill other processes running on the same port (except for Neovim) when starting the server.
-- browser = 'default', -- Terminal command to open the browser for live-previewing (eg. 'firefox', 'flatpak run com.vivaldi.Vivaldi'). By default, it will use the default browser.
-- dynamic_root = false, -- If true, the plugin will set the root directory to the previewed file's directory. If false, the root directory will be the current working directory (`:lua print(vim.uv.cwd())`).
-- sync_scroll = false, -- If true, the plugin will sync the scrolling in the browser as you scroll in the Markdown files in Neovim.
-- picker = nil, -- Picker to use for opening files. 3 choices are available: 'telescope', 'fzf-lua', 'mini.pick'. If nil, the plugin look for the first available picker when you call the `pick` command.
-- },
-- enabled = false,
-- },
{ {
"brianhuster/live-preview.nvim", 'MeanderingProgrammer/render-markdown.nvim',
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
---@module 'render-markdown'
---@type render.md.UserConfig
opts = { opts = {
cmd = "LivePreview", -- Main command of live-preview.nvim completions = { blink = { enabled = true } },
port = 5500, -- Port to run the live preview server on. render_modes = { 'n', 'c', 't' },
autokill = false, -- If true, the plugin will autokill other processes running on the same port (except for Neovim) when starting the server.
browser = 'default', -- Terminal command to open the browser for live-previewing (eg. 'firefox', 'flatpak run com.vivaldi.Vivaldi'). By default, it will use the default browser.
dynamic_root = false, -- If true, the plugin will set the root directory to the previewed file's directory. If false, the root directory will be the current working directory (`:lua print(vim.uv.cwd())`).
sync_scroll = false, -- If true, the plugin will sync the scrolling in the browser as you scroll in the Markdown files in Neovim.
picker = nil, -- Picker to use for opening files. 3 choices are available: 'telescope', 'fzf-lua', 'mini.pick'. If nil, the plugin look for the first available picker when you call the `pick` command.
}, },
enabled = false, },
} {
'Thiago4532/mdmath.nvim',
dependencies = {
'nvim-treesitter/nvim-treesitter',
},
opts = {
-- Filetypes that the plugin will be enabled by default.
filetypes = {'markdown'},
-- Color of the equation, can be a highlight group or a hex color.
-- Examples: 'Normal', '#ff0000'
foreground = 'Normal',
-- Hide the text when the equation is under the cursor.
anticonceal = true,
-- Hide the text when in the Insert Mode.
hide_on_insert = true,
-- Enable dynamic size for non-inline equations.
dynamic = true,
-- Configure the scale of dynamic-rendered equations.
dynamic_scale = 1.0,
-- Interval between updates (milliseconds).
update_interval = 400,
-- Internal scale of the equation images, increase to prevent blurry images when increasing terminal
-- font, high values may produce aliased images.
-- WARNING: This do not affect how the images are displayed, only how many pixels are used to render them.
-- See `dynamic_scale` to modify the displayed size.
internal_scale = 1.0,
}
},
} }

View File

@@ -8,6 +8,11 @@ return {
none_ls.builtins.diagnostics.gitlint, none_ls.builtins.diagnostics.gitlint,
none_ls.builtins.diagnostics.cmake_lint, none_ls.builtins.diagnostics.cmake_lint,
none_ls.builtins.diagnostics.codespell, none_ls.builtins.diagnostics.codespell,
none_ls.builtins.diagnostics.fish,
none_ls.builtins.diagnostics.mypy,
--none_ls.builtins.diagnostics.mlint, - find it
--none_ls.builtins.diagnostics.commitlint, - written in npm
--none_ls.builtins.diagnostics.checkmake, - written in go
none_ls.builtins.hover.dictionary, none_ls.builtins.hover.dictionary,
none_ls.builtins.formatting.black}, none_ls.builtins.formatting.black},
}) })

View File

@@ -4,10 +4,12 @@ return {
'debugloop/telescope-undo.nvim', 'debugloop/telescope-undo.nvim',
'molecule-man/telescope-menufacture', 'molecule-man/telescope-menufacture',
'nvim-telescope/telescope-symbols.nvim', 'nvim-telescope/telescope-symbols.nvim',
'mrloop/telescope-git-branch.nvim',
{ {
"isak102/telescope-git-file-history.nvim", "isak102/telescope-git-file-history.nvim",
dependencies = { "tpope/vim-fugitive" } dependencies = { "tpope/vim-fugitive" }
}, },
'kiyoon/telescope-insert-path.nvim',
"zongben/navimark.nvim", "zongben/navimark.nvim",
}, },
event = 'VeryLazy', event = 'VeryLazy',
@@ -57,28 +59,32 @@ 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("git_file_history") require("telescope").load_extension("git_file_history")
require("telescope").load_extension("git_branch")
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>fr', function() require("telescope.builtin").resume() end, def)
map('n', '<leader>f', '<cmd>lua require("telescope").extensions.menufacture.find_files()<cr>', def) map('n', '<leader>ff', function() require("telescope").extensions.menufacture.find_files() end, def)
map('n', '<leader>a', '<cmd>lua require("telescope").extensions.menufacture.grep_string()<cr>', def) map('n', '<leader>fa', function() require("telescope").extensions.menufacture.grep_string() end, def)
map('n', '<leader>s', '<cmd>lua require("telescope").extensions.menufacture.live_grep()<cr>', def) map('n', '<leader>fs', function() require("telescope").extensions.menufacture.live_grep() end, def)
map('n', '<leader>b', '<cmd>lua require("telescope.builtin").buffers()<cr>', def) map('n', '<leader>fb', function() require("telescope.builtin").buffers() end, def)
-- map('n', '<leader>fh', '<cmd>lua require('telescope.builtin').help_tags()<cr>, def) -- map('n', '<leader>fh', function() require('telescope.builtin').help_tags() end, def)
map('n', '<leader>tc', '<cmd>lua require("telescope.builtin").commands()<cr>', def) map('n', '<leader>fc', function() require("telescope.builtin").commands() end, def)
map('n', '<leader>t:', '<cmd>lua require("telescope.builtin").command_history()<cr>', def) map('n', '<leader>f:', function() require("telescope.builtin").command_history() end, def)
map('n', '<leader>t/', '<cmd>lua require("telescope.builtin").search_history()<cr>', def) map('n', '<leader>f/', function() require("telescope.builtin").search_history() end, def)
map('n', '<leader>tr', '<cmd>lua require("telescope.builtin").registers()<cr>', def) map('n', '<leader>fr', function() require("telescope.builtin").registers() end, def)
-- Neovim lsp pickers -- Neovim lsp pickers
map('n', 'gr', '<cmd>lua require("telescope.builtin").lsp_references()<cr>', def) map('n', 'grr', function() require("telescope.builtin").lsp_references() end, def)
map('n', 'gd', '<cmd>lua require("telescope.builtin").lsp_definitions()<cr>', def) map('n', 'gd', function() require("telescope.builtin").lsp_definitions() end, def)
-- git pickers -- git pickers
-- map('n', '<leader>gc', '<cmd>lua require("telescope.builtin").git_commits()<cr>', def) -- map('n', '<leader>gc', function() require("telescope.builtin").git_commits() end, def)
-- map('n', '<leader>gC', '<cmd>lua require("telescope.builtin").git_bcommits()<cr>', def) -- map('n', '<leader>gC', function() require("telescope.builtin").git_bcommits() end, def)
-- map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', def) -- map('n', '<leader>gb', function() require("telescope.builtin").git_branches() end, def)
-- map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', def) -- map('n', '<leader>gb', function() require("telescope.builtin").git_branches() end, def)
-- other -- other
-- map('n', '<leader>s', '<cmd>lua require('telescope').extensions.ultisnips.ultisnips()<cr>, def) -- map('n', '<leader>s', function() require('telescope').extensions.ultisnips.ultisnips() end, def)
map('n', '<leader>u', '<cmd>lua require("telescope").extensions.undo.undo()<cr>', def) map('n', '<leader>fu', function() require("telescope").extensions.undo.undo() end, def)
map('n', '<leader>fg', function() require('git_branch').files() end, def)
map('n', '<C-.>', function() require('telescope_insert_path').insert_relpath_insert() end, def)
map('n', '<C-/>', function() require('telescope_insert_path').insert_abspath_insert() end, def)
end end
} }