diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index aac117d..2d8dcd2 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,3 +1,4 @@ require('core.config') require('core.plugins') require('core.mappings') +require('core.autocmd') diff --git a/.config/nvim/lua/.luarc.json b/.config/nvim/lua/.luarc.json new file mode 100644 index 0000000..23b9ee2 --- /dev/null +++ b/.config/nvim/lua/.luarc.json @@ -0,0 +1,3 @@ +{ + "workspace.checkThirdParty": false +} \ No newline at end of file diff --git a/.config/nvim/lua/core/autocmd.lua b/.config/nvim/lua/core/autocmd.lua new file mode 100644 index 0000000..6626261 --- /dev/null +++ b/.config/nvim/lua/core/autocmd.lua @@ -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, +}) diff --git a/.config/nvim/lua/core/config.lua b/.config/nvim/lua/core/config.lua index 14f47ac..bd68f65 100644 --- a/.config/nvim/lua/core/config.lua +++ b/.config/nvim/lua/core/config.lua @@ -15,7 +15,7 @@ vim.opt.undofile = true vim.opt.conceallevel = 1 -vim.opt.shell = '/bin/bash' +--vim.opt.shell = '/bin/bash' vim.opt.number = true --vim.o.relativenumber = 1 @@ -33,7 +33,7 @@ vim.opt.splitright = true -- gui settings vim.opt.guifont="IBM Plex Mono Text:h9:e-subpixelantyalias" 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_remember_window_size = 0 @@ -107,32 +107,4 @@ vim.opt.wildignore = [[ */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', '', function() gnvim.font_size(1) end) - vim.keymap.set('n', '', function() gnvim.font_size(-1) end) - - gnvim.setup({ - cursor = { - blink_transition = 300 - } - }) - end -}) - vim.g.loaded_perl_provider = 0 diff --git a/.config/nvim/lua/core/mappings.lua b/.config/nvim/lua/core/mappings.lua index 5577ca7..8ed31a4 100644 --- a/.config/nvim/lua/core/mappings.lua +++ b/.config/nvim/lua/core/mappings.lua @@ -11,7 +11,7 @@ map('t', '', '', default_options) map('i', 'jj', '', default_options) map('i', 'jk', '', default_options) --map('i', ':w', ':w', default_options) -map('n', 'Q', 'q', default_options) +map('n', 'Q', ':q', default_options) -- Reselect visual block after incrementing/decrementing map('v', '', 'gv', default_options) diff --git a/.config/nvim/lua/plugins/actions-preview.lua b/.config/nvim/lua/plugins/actions-preview.lua index 4db9287..2dc2e53 100644 --- a/.config/nvim/lua/plugins/actions-preview.lua +++ b/.config/nvim/lua/plugins/actions-preview.lua @@ -1,6 +1,6 @@ return { "aznhe21/actions-preview.nvim", config = function() - vim.keymap.set({ "v", "n" }, "ca", require("actions-preview").code_actions) + vim.keymap.set({ "v", "n" }, "gra", require("actions-preview").code_actions) end, } diff --git a/.config/nvim/lua/plugins/auto-diff.lua b/.config/nvim/lua/plugins/auto-diff.lua new file mode 100644 index 0000000..76da97d --- /dev/null +++ b/.config/nvim/lua/plugins/auto-diff.lua @@ -0,0 +1,5 @@ +return { + "yutkat/git-rebase-auto-diff.nvim", + ft = { "gitrebase" }, + opts = {}, +} diff --git a/.config/nvim/lua/plugins/blink.lua b/.config/nvim/lua/plugins/blink.lua index c7b0c8d..a5028b9 100644 --- a/.config/nvim/lua/plugins/blink.lua +++ b/.config/nvim/lua/plugins/blink.lua @@ -1,9 +1,11 @@ return { { - 'saghen/blink.cmp', + 'Saghen/blink.cmp', -- optional: provides snippets for the snippet source dependencies = { '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 @@ -23,10 +25,10 @@ return { { keymap = { preset = 'default' }, appearance = { - -- Sets the fallback highlight groups to nvim-cmp's highlight groups - -- Useful for when your theme doesn't support blink.cmp - -- Will be removed in a future release - use_nvim_cmp_as_default = true, + -- -- Sets the fallback highlight groups to nvim-cmp's highlight groups + -- -- Useful for when your theme doesn't support blink.cmp + -- -- Will be removed in a future release + -- use_nvim_cmp_as_default = true, -- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' -- Adjusts spacing to ensure icons are aligned nerd_font_variant = 'mono' @@ -35,7 +37,26 @@ return { { -- Default list of enabled providers defined so that you can extend it -- elsewhere in your config, without redefining it, due to `opts_extend` 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 = { @@ -53,8 +74,13 @@ return { { } } } - } - } + }, + + accept = { auto_brackets = { enabled = false }, }, + ghost_text = { enabled = false }, + }, + -- experimental: + signature = { enabled = true }, }, opts_extend = { "sources.default" } }, { diff --git a/.config/nvim/lua/plugins/codecompanion.lua b/.config/nvim/lua/plugins/codecompanion.lua index 02c62df..379732e 100644 --- a/.config/nvim/lua/plugins/codecompanion.lua +++ b/.config/nvim/lua/plugins/codecompanion.lua @@ -17,7 +17,7 @@ return { adapters = { ollama = function() return require("codecompanion.adapters").extend("ollama", { - name = "qwen2.5-coder:latest", + name = "gemma3:12b", env = { url = "http://192.168.10.99:11434", api_key = "OLLAMA_API_KEY", @@ -31,7 +31,7 @@ return { }, schema = { model = { - default = "qwen2.5-coder:latest", + default = "gemma3:12b", }, num_ctx = { default = 16384, diff --git a/.config/nvim/lua/plugins/colorschemes.lua b/.config/nvim/lua/plugins/colorschemes.lua index 98bf474..9507fd1 100644 --- a/.config/nvim/lua/plugins/colorschemes.lua +++ b/.config/nvim/lua/plugins/colorschemes.lua @@ -2,9 +2,9 @@ return { 'lmantw/themify.nvim', lazy = false, - priority = 999, + priority = 1000, dependencies = { - 'Iron-E/nvim-highlite' + --'Iron-E/nvim-highlite' }, config = function() require('themify').setup({ @@ -33,7 +33,7 @@ return { 'kevinm6/kurayami.nvim', 'gerardbm/vim-atomic', 'fynnfluegge/monet.nvim', - 'sho-87/kanagawa-paper.nvim', + 'thesimonho/kanagawa-paper.nvim', 'qaptoR-nvim/chocolatier.nvim', 'aliqyan-21/darkvoid.nvim', 'paulo-granthon/hyper.nvim', @@ -41,7 +41,8 @@ return { 'aktersnurra/no-clown-fiesta.nvim', 'kdheepak/monochrome.nvim', 'ficcdaf/ashen.nvim', - 'm15a/nvim-srcerite', + -- 'm15a/nvim-srcerite', - requires buggy highlite + 'nyoom-engineering/oxocarbon.nvim', 'default' }) end diff --git a/.config/nvim/lua/plugins/gen.lua b/.config/nvim/lua/plugins/gen.lua index 53c046b..acf6ede 100644 --- a/.config/nvim/lua/plugins/gen.lua +++ b/.config/nvim/lua/plugins/gen.lua @@ -23,5 +23,6 @@ return { 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. debug = false -- Prints errors and the command which is run. - } + }, + enabled = false } diff --git a/.config/nvim/lua/plugins/line.lua b/.config/nvim/lua/plugins/line.lua index 3267ca1..f986df4 100644 --- a/.config/nvim/lua/plugins/line.lua +++ b/.config/nvim/lua/plugins/line.lua @@ -8,10 +8,12 @@ return { local Space = { provider = " " } local colors = { - bright_bg = utils.get_highlight("Folded").bg, - bright_fg = utils.get_highlight("Folded").fg, + bg = utils.get_highlight("Normal").bg, + 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, - -- dark_red = utils.get_highlight("DiffDelete").bg, + dark_red = utils.get_highlight("DiffDelete").bg, green = utils.get_highlight("String").fg, blue = utils.get_highlight("Function").fg, gray = utils.get_highlight("NonText").fg, @@ -22,9 +24,9 @@ return { diag_error = utils.get_highlight("DiagnosticError").fg, diag_hint = utils.get_highlight("DiagnosticHint").fg, diag_info = utils.get_highlight("DiagnosticInfo").fg, - -- git_del = utils.get_highlight("diffDeleted").fg, - -- git_add = utils.get_highlight("diffAdded").fg, - -- git_change = utils.get_highlight("diffChanged").fg, + git_del = utils.get_highlight("diffDeleted").fg, + git_add = utils.get_highlight("diffAdded").fg, + git_change = utils.get_highlight("diffChanged").fg, } heirline.load_colors(colors) @@ -362,6 +364,7 @@ return { SpecialStatusline, InactiveStatusline, DefaultStatusline, + colors = colors } local Winbar = { { provider = "ยป" }, Space } @@ -373,6 +376,10 @@ return { -- winbar = Winbar, tabline = TabLine, -- statuscolumn = StatusColumn + opts = { + colors = colors + } }) - end + end, + enabled = false } diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua index e53107c..7099d3e 100644 --- a/.config/nvim/lua/plugins/lspconfig.lua +++ b/.config/nvim/lua/plugins/lspconfig.lua @@ -1,45 +1,44 @@ return { - 'neovim/nvim-lspconfig', dependencies = { -- "SmiteshP/nvim-navbuddy", - "jubnzv/virtual-types.nvim", - --"ray-x/lsp_signature.nvim", - 'sontungexpt/better-diagnostic-virtual-text', - {url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"}, + -- "jubnzv/virtual-types.nvim", + -- "ray-x/lsp_signature.nvim", + -- 'sontungexpt/better-diagnostic-virtual-text', + { url = "http://git.sr.ht/~p00f/clangd_extensions.nvim" }, }, config = function() local nvim_lsp = require('lspconfig') require('clangd_extensions').setup({ 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 = "๐Ÿ…ƒ", - }, - highlights = { - detail = "Comment", - }, - memory_usage = { - border = "none", - }, - symbol_info = { - border = "none", - } + -- 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 = "๐Ÿ…ƒ", + }, + highlights = { + detail = "Comment", + }, + memory_usage = { + border = "none", + }, + symbol_info = { + border = "none", } + } }) --local lsp_signature = require('lsp_signature') @@ -58,53 +57,61 @@ return { -- See `:help vim.lsp.*` for documentation on any of the below functions 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.definition, opts) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) - vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) + --def vim.keymap.set('n', 'K', vim.lsp.buf.hover, 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', 'wa', vim.lsp.buf.add_workspace_folder, opts) --vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, opts) --vim.keymap.set('n', 'wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, opts) - vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', opts) - vim.keymap.set("n", "q", function() vim.lsp.buf.format{ async = true } end, opts) + vim.keymap.set("n", "q", function() vim.lsp.buf.format { async = true } end, opts) - require'virtualtypes'.on_attach() + -- require 'virtualtypes'.on_attach() -- require'lsp_signature'.on_attach({ -- floating_window = true, -- floating_window_above_cur_line = true, -- floating_window_off_x = 10, -- floating_window_off_y = 0, -- }) - require("better-diagnostic-virtual-text.api").setup_buf(ev.buf, { - ui = { - 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 - 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 = " ๏…ท ", - up_arrow = " ๏ข ", - down_arrow = " ๏ฃ ", - above = false, -- the virtual text will be displayed above the line - }, - priority = 2003, -- the priority of virtual text - inline = true}) + -- require("better-diagnostic-virtual-text.api").setup_buf(ev.buf, { + -- ui = { + -- 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 + -- 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 = " ๏…ท ", + -- up_arrow = " ๏ข ", + -- down_arrow = " ๏ฃ ", + -- above = false, -- the virtual text will be displayed above the line + -- }, + -- priority = 2003, -- the priority of virtual text + -- inline = true + -- }) - vim.diagnostic.config({ - underline = false, - signs = { - text = { - [vim.diagnostic.severity.HINT] = "๏ ต", - [vim.diagnostic.severity.ERROR] = "โœ˜", - [vim.diagnostic.severity.INFO] = "โ—‰", - [vim.diagnostic.severity.WARN] = "๏ฑ" + vim.diagnostic.config({ + underline = false, + signs = { + text = { + [vim.diagnostic.severity.HINT] = "๏ ต", + [vim.diagnostic.severity.ERROR] = "โœ˜", + [vim.diagnostic.severity.INFO] = "โ—‰", + [vim.diagnostic.severity.WARN] = "๏ฑ" + } + }, + virtual_text = false, + update_in_insert = false, + severity_sort = true, + virtual_lines = { + current_line = true, } - }, - virtual_text = true, - update_in_insert = false, - severity_sort = true - }) - end + }) + end }) --local capabilities = vim.lsp.protocol.make_client_capabilities() @@ -140,6 +147,7 @@ return { nvim_lsp.lua_ls.setup({ settings = { Lua = { + diagnostics = { globals = { "vim" } }, completion = { callSnippet = "Replace" } @@ -147,22 +155,23 @@ return { } }) - nvim_lsp.matlab_ls.setup({ - cmd = { "matlab-language-server", "--stdio"}, - filetypes = { "matlab" }, - -- 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]), - single_file_support = true, - settings = { - matlab = { - indexWorkspace = false, - installPath = "/usr/local/MATLAB/R2022b", - matlabConnectionTiming = "onStart", - telemetry = true, - }, - } - }) - + -- nvim_lsp.matlab_ls.setup({ + -- cmd = { "matlab-language-server", "--stdio" }, + -- filetypes = { "matlab" }, + -- -- 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]), + -- single_file_support = true, + -- settings = { + -- matlab = { + -- indexWorkspace = false, + -- installPath = "/usr/local/MATLAB/R2024b", + -- matlabConnectionTiming = "onStart", + -- telemetry = true, + -- }, + -- } + -- }) + -- nvim_lsp.typos_lsp.setup({ cmd = { 'typos-lsp' }, filetypes = { '*' }, diff --git a/.config/nvim/lua/plugins/markdown.lua b/.config/nvim/lua/plugins/markdown.lua index a0359f0..abd1a8c 100644 --- a/.config/nvim/lua/plugins/markdown.lua +++ b/.config/nvim/lua/plugins/markdown.lua @@ -33,17 +33,58 @@ return { { end, 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 = { - 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. + completions = { blink = { enabled = true } }, + render_modes = { 'n', 'c', 't' }, }, - 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, + } +}, } diff --git a/.config/nvim/lua/plugins/null.lua b/.config/nvim/lua/plugins/null.lua index 4250acf..9de1566 100644 --- a/.config/nvim/lua/plugins/null.lua +++ b/.config/nvim/lua/plugins/null.lua @@ -8,6 +8,11 @@ return { none_ls.builtins.diagnostics.gitlint, none_ls.builtins.diagnostics.cmake_lint, 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.formatting.black}, }) diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 060700f..a464455 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -4,10 +4,12 @@ return { 'debugloop/telescope-undo.nvim', 'molecule-man/telescope-menufacture', 'nvim-telescope/telescope-symbols.nvim', + 'mrloop/telescope-git-branch.nvim', { "isak102/telescope-git-file-history.nvim", dependencies = { "tpope/vim-fugitive" } }, + 'kiyoon/telescope-insert-path.nvim', "zongben/navimark.nvim", }, event = 'VeryLazy', @@ -57,28 +59,32 @@ return { require('telescope').load_extension('undo') require('telescope').load_extension('menufacture') require("telescope").load_extension("git_file_history") + require("telescope").load_extension("git_branch") local def = { noremap = true, silent = true } local map = vim.keymap.set - map('n', 'r', 'lua require("telescope.builtin").resume()', def) - map('n', 'f', 'lua require("telescope").extensions.menufacture.find_files()', def) - map('n', 'a', 'lua require("telescope").extensions.menufacture.grep_string()', def) - map('n', 's', 'lua require("telescope").extensions.menufacture.live_grep()', def) - map('n', 'b', 'lua require("telescope.builtin").buffers()', def) - -- map('n', 'fh', 'lua require('telescope.builtin').help_tags(), def) - map('n', 'tc', 'lua require("telescope.builtin").commands()', def) - map('n', 't:', 'lua require("telescope.builtin").command_history()', def) - map('n', 't/', 'lua require("telescope.builtin").search_history()', def) - map('n', 'tr', 'lua require("telescope.builtin").registers()', def) + map('n', 'fr', function() require("telescope.builtin").resume() end, def) + map('n', 'ff', function() require("telescope").extensions.menufacture.find_files() end, def) + map('n', 'fa', function() require("telescope").extensions.menufacture.grep_string() end, def) + map('n', 'fs', function() require("telescope").extensions.menufacture.live_grep() end, def) + map('n', 'fb', function() require("telescope.builtin").buffers() end, def) + -- map('n', 'fh', function() require('telescope.builtin').help_tags() end, def) + map('n', 'fc', function() require("telescope.builtin").commands() end, def) + map('n', 'f:', function() require("telescope.builtin").command_history() end, def) + map('n', 'f/', function() require("telescope.builtin").search_history() end, def) + map('n', 'fr', function() require("telescope.builtin").registers() end, def) -- Neovim lsp pickers - map('n', 'gr', 'lua require("telescope.builtin").lsp_references()', def) - map('n', 'gd', 'lua require("telescope.builtin").lsp_definitions()', def) + map('n', 'grr', function() require("telescope.builtin").lsp_references() end, def) + map('n', 'gd', function() require("telescope.builtin").lsp_definitions() end, def) -- git pickers - -- map('n', 'gc', 'lua require("telescope.builtin").git_commits()', def) - -- map('n', 'gC', 'lua require("telescope.builtin").git_bcommits()', def) - -- map('n', 'gb', 'lua require("telescope.builtin").git_branches()', def) - -- map('n', 'gb', 'lua require("telescope.builtin").git_branches()', def) + -- map('n', 'gc', function() require("telescope.builtin").git_commits() end, def) + -- map('n', 'gC', function() require("telescope.builtin").git_bcommits() end, def) + -- map('n', 'gb', function() require("telescope.builtin").git_branches() end, def) + -- map('n', 'gb', function() require("telescope.builtin").git_branches() end, def) -- other - -- map('n', 's', 'lua require('telescope').extensions.ultisnips.ultisnips(), def) - map('n', 'u', 'lua require("telescope").extensions.undo.undo()', def) + -- map('n', 's', function() require('telescope').extensions.ultisnips.ultisnips() end, def) + map('n', 'fu', function() require("telescope").extensions.undo.undo() end, def) + map('n', 'fg', function() require('git_branch').files() end, def) + map('n', '', function() require('telescope_insert_path').insert_relpath_insert() end, def) + map('n', '', function() require('telescope_insert_path').insert_abspath_insert() end, def) end }