From 7b6176d6d76ff98f0e95eccb8e819f88154be600 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 11 Feb 2023 11:59:44 -0800 Subject: [PATCH 001/114] metals improvements --- lua/plugins/nvim-metals.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lua/plugins/nvim-metals.lua b/lua/plugins/nvim-metals.lua index 635196b..1a5cf1f 100644 --- a/lua/plugins/nvim-metals.lua +++ b/lua/plugins/nvim-metals.lua @@ -12,10 +12,22 @@ return { local metals_config = require("metals").bare_config() metals_config.settings = { + serverVersion = "latest.snapshot", showImplicitArguments = true, + showInferredType = true, + bloopSbtAlreadyInstalled = true, excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" }, + fallbackScalaVersion = "2.13.8", + superMethodLensesEnabled = true, + javaHome = "/Users/salar/.nix-profile", } + metals_config.on_attach = function(client, bufnr) + vim.cmd([[autocmd CursorHold lua vim.lsp.buf.document_highlight()]]) + vim.cmd([[autocmd CursorMoved lua vim.lsp.buf.clear_references()]]) + vim.cmd([[autocmd BufEnter,CursorHold,InsertLeave lua vim.lsp.codelens.refresh()]]) + end + metals_config.init_options.statusBarProvider = "on" metals_config.capabilities = require("cmp_nvim_lsp").default_capabilities() From 89193f43b4fb036a2734231e7fafe32cd8a8efda Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 11 Feb 2023 13:59:53 -0800 Subject: [PATCH 002/114] metals improvements 2 --- lua/plugins/lualine.lua | 46 ++++++++++++++++++++++++++++++++----- lua/plugins/nvim-metals.lua | 10 +++++++- 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 860989d..e273551 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -2,13 +2,47 @@ return { "nvim-lualine/lualine.nvim", lazy = false, config = function() - require("lualine").setup({ + -- Default from its README then customized + -- Added metals status + require('lualine').setup { options = { - icons_enabled = false, - theme = "tokyonight", - component_separators = "|", - section_separators = "", + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } }, - }) + sections = { + lualine_a = {'mode'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'g:metals_status', 'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} + } end, } diff --git a/lua/plugins/nvim-metals.lua b/lua/plugins/nvim-metals.lua index 1a5cf1f..8cd5bf9 100644 --- a/lua/plugins/nvim-metals.lua +++ b/lua/plugins/nvim-metals.lua @@ -10,19 +10,27 @@ return { }, config = function() local metals_config = require("metals").bare_config() + metals_config.tvp = { + icons = { + enabled = true, + }, + } metals_config.settings = { serverVersion = "latest.snapshot", showImplicitArguments = true, + showImplicitConversionsAndClasses = true, showInferredType = true, bloopSbtAlreadyInstalled = true, excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" }, - fallbackScalaVersion = "2.13.8", + -- fallbackScalaVersion = "2.13.8", superMethodLensesEnabled = true, javaHome = "/Users/salar/.nix-profile", } metals_config.on_attach = function(client, bufnr) + vim.keymap.set("n", "tt", require("metals.tvp").toggle_tree_view) + vim.keymap.set("n", "tr", require("metals.tvp").reveal_in_tree) vim.cmd([[autocmd CursorHold lua vim.lsp.buf.document_highlight()]]) vim.cmd([[autocmd CursorMoved lua vim.lsp.buf.clear_references()]]) vim.cmd([[autocmd BufEnter,CursorHold,InsertLeave lua vim.lsp.codelens.refresh()]]) From 9431d011d164289f0f16b851dd8605a0bf334c46 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 11 Feb 2023 14:23:51 -0800 Subject: [PATCH 003/114] add persistence locations for mind.nvim --- lua/plugins/mind.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/plugins/mind.lua b/lua/plugins/mind.lua index a4ee7b7..cf268c0 100644 --- a/lua/plugins/mind.lua +++ b/lua/plugins/mind.lua @@ -2,6 +2,11 @@ return { "phaazon/mind.nvim", branch = "v2.2", config = function() - require("mind").setup() + require("mind").setup({ + persistence = { + dataDir = "~/Documents/mind.nvim/data"; + statePath = "~/Documents/mind.nvim/mind.json"; + }, + }) end, } From 62974959b4425fbfb0442314665343c0cfe89615 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 11 Feb 2023 15:30:04 -0800 Subject: [PATCH 004/114] lint --- lua/plugins/lualine.lua | 32 ++++++++++++++++---------------- lua/plugins/mind.lua | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index e273551..5b3558a 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -4,12 +4,12 @@ return { config = function() -- Default from its README then customized -- Added metals status - require('lualine').setup { + require("lualine").setup({ options = { icons_enabled = true, - theme = 'auto', - component_separators = { left = '', right = ''}, - section_separators = { left = '', right = ''}, + theme = "auto", + component_separators = { left = "", right = "" }, + section_separators = { left = "", right = "" }, disabled_filetypes = { statusline = {}, winbar = {}, @@ -21,28 +21,28 @@ return { statusline = 1000, tabline = 1000, winbar = 1000, - } + }, }, sections = { - lualine_a = {'mode'}, - lualine_b = {'branch', 'diff', 'diagnostics'}, - lualine_c = {'filename'}, - lualine_x = {'g:metals_status', 'encoding', 'fileformat', 'filetype'}, - lualine_y = {'progress'}, - lualine_z = {'location'} + lualine_a = { "mode" }, + lualine_b = { "branch", "diff", "diagnostics" }, + lualine_c = { "filename" }, + lualine_x = { "g:metals_status", "encoding", "fileformat", "filetype" }, + lualine_y = { "progress" }, + lualine_z = { "location" }, }, inactive_sections = { lualine_a = {}, lualine_b = {}, - lualine_c = {'filename'}, - lualine_x = {'location'}, + lualine_c = { "filename" }, + lualine_x = { "location" }, lualine_y = {}, - lualine_z = {} + lualine_z = {}, }, tabline = {}, winbar = {}, inactive_winbar = {}, - extensions = {} - } + extensions = {}, + }) end, } diff --git a/lua/plugins/mind.lua b/lua/plugins/mind.lua index cf268c0..7f1b4c5 100644 --- a/lua/plugins/mind.lua +++ b/lua/plugins/mind.lua @@ -4,8 +4,8 @@ return { config = function() require("mind").setup({ persistence = { - dataDir = "~/Documents/mind.nvim/data"; - statePath = "~/Documents/mind.nvim/mind.json"; + dataDir = "~/Documents/mind.nvim/data", + statePath = "~/Documents/mind.nvim/mind.json", }, }) end, From 30228420ad22efcbb313fe1da744701ce347bb9f Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Tue, 21 Feb 2023 18:02:37 -0800 Subject: [PATCH 005/114] update neotree setting to show hidden files --- lua/plugins/neo-tree.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index d1b3038..8898fec 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -10,6 +10,14 @@ return { { "m", "Neotree toggle", desc = "NeoTree" }, }, config = function() - require("neo-tree").setup() + require("neo-tree").setup({ + filesystem = { + filtered_items = { + visible = true, + hide_dotfiles = false, + hide_gitignored = true, + }, + }, + }) end, } From a8853c25bb1c257ee6f0e6d5ba9d317fbdde6b7f Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Thu, 23 Feb 2023 17:55:09 -0800 Subject: [PATCH 006/114] add key bindings for mind --- lua/plugins/mind.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/plugins/mind.lua b/lua/plugins/mind.lua index 7f1b4c5..588266b 100644 --- a/lua/plugins/mind.lua +++ b/lua/plugins/mind.lua @@ -1,6 +1,13 @@ return { "phaazon/mind.nvim", branch = "v2.2", + keys = { + { "nm", "MindOpenMain", desc = "Open Main Mind" }, + { "np", "MindOpenProject", desc = "Open Mind for current project" }, + { "ns", "MindOpenSmartProject", desc = "Open Mind for smart project" }, + { "nc", "MindClose", desc = "Close Mind" }, + { "nr", "MindReloadState", desc = "Mind: Reload State" }, + }, config = function() require("mind").setup({ persistence = { From e745fc4ec92e96c1ecb5ebbea1f1891660a1cf64 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 24 Feb 2023 00:18:12 -0800 Subject: [PATCH 007/114] add glow --- lua/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 06421ee..389094e 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -60,4 +60,5 @@ return { require("Comment").setup() end, }, + {"ellisonleao/glow.nvim", config = true, cmd = "Glow"} } From f1ca602f8d25d9bd18648acc9b61c1356ec24fd0 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 24 Feb 2023 18:14:38 -0800 Subject: [PATCH 008/114] markdown improvements --- lua/plugins/init.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 389094e..283c584 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -60,5 +60,16 @@ return { require("Comment").setup() end, }, - {"ellisonleao/glow.nvim", config = true, cmd = "Glow"} + "SidOfc/mkdx", + { + "ellisonleao/glow.nvim", + cmd = "Glow", + config = function () + require('glow').setup({ + style = "dark", + width = 120, + install_path = "~/.nix-profile/bin/glow" + }) + end + } } From 3ae37019b1bd1f148d3ac85ae70dad94c37e91ff Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 24 Feb 2023 18:56:36 -0800 Subject: [PATCH 009/114] markdown improvements and lazy config changes --- init.lua | 7 ++++++- lua/plugins/init.lua | 13 +------------ lua/plugins/markdown-composer.lua | 8 ++++++++ 3 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 lua/plugins/markdown-composer.lua diff --git a/init.lua b/init.lua index 977b5b9..dddc205 100644 --- a/init.lua +++ b/init.lua @@ -17,7 +17,12 @@ vim.opt.rtp:prepend(lazypath) vim.g.mapleader = " " vim.g.maplocalleader = " " -require("lazy").setup("plugins") +require("lazy").setup("plugins", { + lockfile = vim.fn.stdpath("data") .. "/lazy-lock.json", -- in data directory as normal location read only as managed by nix + dev = { + path = "~/Projects/Neovim" + } +}) -- [[ Setting options ]] -- See `:help vim.o` diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 283c584..2e7a0c4 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -60,16 +60,5 @@ return { require("Comment").setup() end, }, - "SidOfc/mkdx", - { - "ellisonleao/glow.nvim", - cmd = "Glow", - config = function () - require('glow').setup({ - style = "dark", - width = 120, - install_path = "~/.nix-profile/bin/glow" - }) - end - } + "SidOfc/mkdx" } diff --git a/lua/plugins/markdown-composer.lua b/lua/plugins/markdown-composer.lua new file mode 100644 index 0000000..d895334 --- /dev/null +++ b/lua/plugins/markdown-composer.lua @@ -0,0 +1,8 @@ +return { + "euclio/vim-markdown-composer", + keys = { + { "nv", "ComposerStart", desc = "Composer Start" }, + }, + build = "cargo build --release --locked" +} + From 8b3d267492557f013cf2a65c92fd3e4f1b83b49d Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 24 Feb 2023 19:09:30 -0800 Subject: [PATCH 010/114] fix composer --- lua/plugins/markdown-composer.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lua/plugins/markdown-composer.lua b/lua/plugins/markdown-composer.lua index d895334..cff45bd 100644 --- a/lua/plugins/markdown-composer.lua +++ b/lua/plugins/markdown-composer.lua @@ -1,8 +1,5 @@ return { "euclio/vim-markdown-composer", - keys = { - { "nv", "ComposerStart", desc = "Composer Start" }, - }, - build = "cargo build --release --locked" + build = "cargo build --release" } From ff03b6eaaf55fa6d50a8c03a8747043636a6c0a4 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 24 Feb 2023 19:12:24 -0800 Subject: [PATCH 011/114] linting --- init.lua | 6 +++--- lua/plugins/init.lua | 2 +- lua/plugins/markdown-composer.lua | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index dddc205..85b1753 100644 --- a/init.lua +++ b/init.lua @@ -18,10 +18,10 @@ vim.g.mapleader = " " vim.g.maplocalleader = " " require("lazy").setup("plugins", { - lockfile = vim.fn.stdpath("data") .. "/lazy-lock.json", -- in data directory as normal location read only as managed by nix + lockfile = vim.fn.stdpath("data") .. "/lazy-lock.json", -- in data directory as normal location read only as managed by nix dev = { - path = "~/Projects/Neovim" - } + path = "~/Projects/Neovim", + }, }) -- [[ Setting options ]] diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 2e7a0c4..d13ad4c 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -60,5 +60,5 @@ return { require("Comment").setup() end, }, - "SidOfc/mkdx" + "SidOfc/mkdx", } diff --git a/lua/plugins/markdown-composer.lua b/lua/plugins/markdown-composer.lua index cff45bd..4d6cb1c 100644 --- a/lua/plugins/markdown-composer.lua +++ b/lua/plugins/markdown-composer.lua @@ -1,5 +1,4 @@ return { "euclio/vim-markdown-composer", - build = "cargo build --release" + build = "cargo build --release", } - From 5dc56d22aae84e664f9e802bf6fc86b72f58deb3 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Tue, 28 Feb 2023 17:59:05 -0800 Subject: [PATCH 012/114] add telescope-undo --- lua/plugins/telescope.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 818dd8b..58509cb 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -20,6 +20,7 @@ return { -- Enable telescope fzf native, if installed pcall(require("telescope").load_extension, "fzf") pcall(require("telescope").load_extension, "scaladex") + pcall(require("telescope").load_extension, "undo") -- See `:help telescope.builtin` vim.keymap.set("n", "?", require("telescope.builtin").oldfiles, { desc = "[?] Find recently opened files" }) @@ -37,5 +38,6 @@ return { vim.keymap.set("n", "sw", require("telescope.builtin").grep_string, { desc = "[S]earch current [W]ord" }) vim.keymap.set("n", "sg", require("telescope.builtin").live_grep, { desc = "[S]earch by [G]rep" }) vim.keymap.set("n", "sd", require("telescope.builtin").diagnostics, { desc = "[S]earch [D]iagnostics" }) + vim.keymap.set("n", "su", "Telescope undo", { desc = "[S]earch [U]ndo" }) end, } From e2ac81a6560332af21e18a63482965d68dc299bc Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Tue, 28 Feb 2023 18:14:01 -0800 Subject: [PATCH 013/114] undo keymap correction --- lua/plugins/telescope.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 58509cb..4b97b92 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -38,6 +38,6 @@ return { vim.keymap.set("n", "sw", require("telescope.builtin").grep_string, { desc = "[S]earch current [W]ord" }) vim.keymap.set("n", "sg", require("telescope.builtin").live_grep, { desc = "[S]earch by [G]rep" }) vim.keymap.set("n", "sd", require("telescope.builtin").diagnostics, { desc = "[S]earch [D]iagnostics" }) - vim.keymap.set("n", "su", "Telescope undo", { desc = "[S]earch [U]ndo" }) + vim.keymap.set("n", "su", "Telescope undo", { desc = "[S]earch [U]ndo" }) end, } From e7dfc75b15c3dfecb736809815db09896529bf6d Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Tue, 28 Feb 2023 18:19:20 -0800 Subject: [PATCH 014/114] add undo dependency --- lua/plugins/telescope.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 4b97b92..adb9354 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -4,6 +4,7 @@ return { dependencies = { "nvim-lua/plenary.nvim", { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, + "debugloop/telescope-undo.nvim", }, config = function() require("telescope").setup({ From a07069f030d4c2c58d64ffdd866f266de9ae671e Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Tue, 28 Feb 2023 18:48:33 -0800 Subject: [PATCH 015/114] lua lsp rename --- lua/plugins/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 8819d72..7961431 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -69,7 +69,7 @@ return { -- rust_analyzer = {}, -- tsserver = {}, - sumneko_lua = { + lua_ls = { Lua = { workspace = { checkThirdParty = false }, telemetry = { enable = false }, From 8f9763738d35e3b889d328f75bea8cd69c6ebd8f Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Tue, 28 Feb 2023 19:00:36 -0800 Subject: [PATCH 016/114] terminal escape mapping --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index 85b1753..17166c4 100644 --- a/init.lua +++ b/init.lua @@ -81,6 +81,9 @@ vim.api.nvim_create_autocmd("TextYankPost", { pattern = "*", }) +-- Terminal Escape Key Mapping +vim.keymap.set('t', '', [[]]) + -- Diagnostic keymaps vim.keymap.set("n", "[d", vim.diagnostic.goto_prev) vim.keymap.set("n", "]d", vim.diagnostic.goto_next) From b873a14c3adc0815a51a54fa96f4d2fcfc1e93ba Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Wed, 1 Mar 2023 21:52:13 -0800 Subject: [PATCH 017/114] nvim config update --- init.lua | 2 +- lua/plugins/lsp.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 17166c4..8bc6445 100644 --- a/init.lua +++ b/init.lua @@ -28,7 +28,7 @@ require("lazy").setup("plugins", { -- See `:help vim.o` -- Set highlight on search -vim.o.hlsearch = false +vim.o.hlsearch = true vim.o.incsearch = true -- clipboard diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 7961431..2da4a04 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -71,6 +71,7 @@ return { lua_ls = { Lua = { + diagnostics = { globals = { 'vim' } }, workspace = { checkThirdParty = false }, telemetry = { enable = false }, }, From 3c5cdb2304a76e942cfb126e5ad0c93076626c7a Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Mon, 6 Mar 2023 18:31:23 -0800 Subject: [PATCH 018/114] correct mind data paths --- lua/plugins/mind.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/mind.lua b/lua/plugins/mind.lua index 588266b..3cba289 100644 --- a/lua/plugins/mind.lua +++ b/lua/plugins/mind.lua @@ -11,8 +11,8 @@ return { config = function() require("mind").setup({ persistence = { - dataDir = "~/Documents/mind.nvim/data", - statePath = "~/Documents/mind.nvim/mind.json", + data_dir = "~/Documents/mind.nvim/data", + state_path = "~/Documents/mind.nvim/mind.json", }, }) end, From bc2b71fa94386902cddf145b556575ab7381f827 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 27 May 2023 22:14:12 -0700 Subject: [PATCH 019/114] make metals not lazy --- lua/plugins/nvim-metals.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/nvim-metals.lua b/lua/plugins/nvim-metals.lua index 8cd5bf9..1356846 100644 --- a/lua/plugins/nvim-metals.lua +++ b/lua/plugins/nvim-metals.lua @@ -1,5 +1,6 @@ return { "scalameta/nvim-metals", + lazy = false, keys = { { "ws", "lua require'metals'.hover_worksheet()", desc = "Metals Worksheet" }, { From 38cb2ecab7b77c4c248d1c3a7fe04db958d15b6c Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 6 Oct 2023 07:40:33 -0700 Subject: [PATCH 020/114] Plugin updates --- lua/plugins/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index d13ad4c..3c3518d 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -27,6 +27,8 @@ return { { "folke/which-key.nvim", lazy = false }, { "j-hui/fidget.nvim", + tag = "legacy", + event = "LspAttach", config = function() require("fidget").setup() end, @@ -44,10 +46,10 @@ return { "softinio/scaladex.nvim", { "lukas-reineke/indent-blankline.nvim", + main = "ibl", config = function() require("indent_blankline").setup({ char = "┊", - show_trailing_blankline_indent = false, }) end, }, From e70fbda549b2306b6f45636ab0bf71c880d51ef6 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 6 Oct 2023 07:50:03 -0700 Subject: [PATCH 021/114] indent plugin update --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 3c3518d..74ad41c 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -48,7 +48,7 @@ return { "lukas-reineke/indent-blankline.nvim", main = "ibl", config = function() - require("indent_blankline").setup({ + require("ibl").setup({ char = "┊", }) end, From 980db5dbf89996dcc5287a7fbb34d6c6ba907e9e Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 6 Oct 2023 07:55:10 -0700 Subject: [PATCH 022/114] more updates to indentline config --- lua/plugins/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 74ad41c..956d2f9 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -49,7 +49,7 @@ return { main = "ibl", config = function() require("ibl").setup({ - char = "┊", + indent = { char = "┊" }, }) end, }, From c66027a36132c719ae9cb91c9e1eacc175149b2d Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 6 Oct 2023 15:06:23 -0700 Subject: [PATCH 023/114] add gruvbox theme --- lua/plugins/init.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 956d2f9..f58bf48 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -8,7 +8,7 @@ return { }, { "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme + lazy = true, -- make sure we load this during startup if it is your main colorscheme priority = 1000, -- make sure to load this before all the other start plugins config = function() vim.g.tokyonight_style = "night" @@ -18,6 +18,18 @@ return { vim.cmd([[colorscheme tokyonight]]) end, }, + { + "ellisonleao/gruvbox.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000 , + config = function() + require("gruvbox").setup({ + dim_inactive = false, + }) + vim.o.background = "light" + vim.cmd([[colorscheme gruvbox]]) + end, + }, { "folke/trouble.nvim", config = function() From c2d6d6379dba1c85381e8f18ff5bd1127255306c Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 6 Oct 2023 22:11:34 -0700 Subject: [PATCH 024/114] switch back to dark theme --- lua/plugins/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f58bf48..f7dd7d6 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -8,7 +8,7 @@ return { }, { "folke/tokyonight.nvim", - lazy = true, -- make sure we load this during startup if it is your main colorscheme + lazy = false, -- make sure we load this during startup if it is your main colorscheme priority = 1000, -- make sure to load this before all the other start plugins config = function() vim.g.tokyonight_style = "night" @@ -19,8 +19,8 @@ return { end, }, { - "ellisonleao/gruvbox.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme + "ellisonleao/gruvbox.nvim", + lazy = true, -- make sure we load this during startup if it is your main colorscheme priority = 1000 , config = function() require("gruvbox").setup({ From b25ff7fe59bd3fa781bfcda8b9866e67324c07fd Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Wed, 11 Oct 2023 14:55:50 -0700 Subject: [PATCH 025/114] remove help as parser --- lua/plugins/treesitter.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index dfd4698..2b486ea 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -16,7 +16,6 @@ return { "python", "rust", "typescript", - "help", "vim", "scala", "bash", From 9de4e06a7db826cef55c38cf9f05f606c9fc2b6c Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Mon, 16 Oct 2023 21:39:14 -0700 Subject: [PATCH 026/114] add neorg --- lua/plugins/neorg.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lua/plugins/neorg.lua diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua new file mode 100644 index 0000000..d1dccd5 --- /dev/null +++ b/lua/plugins/neorg.lua @@ -0,0 +1,20 @@ +return { + "nvim-neorg/neorg", + build = ":Neorg sync-parsers", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + require("neorg").setup { + load = { + ["core.defaults"] = {}, -- Loads default behaviour + ["core.concealer"] = {}, -- Adds pretty icons to your documents + ["core.dirman"] = { -- Manages Neorg workspaces + config = { + workspaces = { + notes = "~/notes", + }, + }, + }, + }, + } + end, +} From 8afb4ac78d8ec6f9c52a971cd3721a10e734c603 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Tue, 17 Oct 2023 07:45:29 -0700 Subject: [PATCH 027/114] neorg config improvements. Remove mind. --- lua/plugins/mind.lua | 19 ------------------- lua/plugins/neorg.lua | 19 ++++++++++++++++--- 2 files changed, 16 insertions(+), 22 deletions(-) delete mode 100644 lua/plugins/mind.lua diff --git a/lua/plugins/mind.lua b/lua/plugins/mind.lua deleted file mode 100644 index 3cba289..0000000 --- a/lua/plugins/mind.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - "phaazon/mind.nvim", - branch = "v2.2", - keys = { - { "nm", "MindOpenMain", desc = "Open Main Mind" }, - { "np", "MindOpenProject", desc = "Open Mind for current project" }, - { "ns", "MindOpenSmartProject", desc = "Open Mind for smart project" }, - { "nc", "MindClose", desc = "Close Mind" }, - { "nr", "MindReloadState", desc = "Mind: Reload State" }, - }, - config = function() - require("mind").setup({ - persistence = { - data_dir = "~/Documents/mind.nvim/data", - state_path = "~/Documents/mind.nvim/mind.json", - }, - }) - end, -} diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index d1dccd5..35f4200 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -1,17 +1,30 @@ return { "nvim-neorg/neorg", + lazy = false, build = ":Neorg sync-parsers", dependencies = { "nvim-lua/plenary.nvim" }, + keys = { + { "ni", "Neorg index", desc = "Index" }, + { "ns", "Neorg generate-workspace-summary", desc = "Generate Workspace Summary" }, + { "njt", "Neorg journal today", desc = "Journal Today" }, + { "njT", "Neorg journal template", desc = "Journal Template" }, + }, config = function() require("neorg").setup { load = { - ["core.defaults"] = {}, -- Loads default behaviour - ["core.concealer"] = {}, -- Adds pretty icons to your documents - ["core.dirman"] = { -- Manages Neorg workspaces + ["core.defaults"] = {}, + ["core.summary"] = {}, + ["core.ui.calendar"] = {}, + ["core.concealer"] = { + icon_preset = "diamond" + }, + ["core.dirman"] = { config = { workspaces = { notes = "~/notes", + til = "~/til", }, + default_workspace = "notes", }, }, }, From ac7708c702b826ce155abb232bd6d8b6a999abfa Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Tue, 17 Oct 2023 07:53:32 -0700 Subject: [PATCH 028/114] correction to neorg concealer --- lua/plugins/neorg.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index 35f4200..b209da7 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -16,7 +16,7 @@ return { ["core.summary"] = {}, ["core.ui.calendar"] = {}, ["core.concealer"] = { - icon_preset = "diamond" + icon_preset = "diamond", }, ["core.dirman"] = { config = { From adab4c9868f47e1093058f336d30397623cedc38 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Tue, 17 Oct 2023 07:58:27 -0700 Subject: [PATCH 029/114] neorg correction --- lua/plugins/neorg.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index b209da7..f672d52 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -16,7 +16,9 @@ return { ["core.summary"] = {}, ["core.ui.calendar"] = {}, ["core.concealer"] = { - icon_preset = "diamond", + config = { + icon_preset = "diamond", + }, }, ["core.dirman"] = { config = { From ed9cdefbfea1ace3e904b09daf868fcb0254eb00 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Tue, 17 Oct 2023 08:03:21 -0700 Subject: [PATCH 030/114] neorg: remove calendar module --- lua/plugins/neorg.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index f672d52..170be0c 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -14,7 +14,6 @@ return { load = { ["core.defaults"] = {}, ["core.summary"] = {}, - ["core.ui.calendar"] = {}, ["core.concealer"] = { config = { icon_preset = "diamond", From 543a87b647e771b58941bc6cbf461a9da7b5459a Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 20 Oct 2023 22:44:25 -0700 Subject: [PATCH 031/114] update lsp servers --- lua/plugins/lsp.lua | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 2da4a04..c85dc70 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -57,18 +57,12 @@ return { end, { desc = "Format current buffer with LSP" }) end - -- Enable the following language servers - -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. - -- - -- Add any additional override configuration in the following tables. They will be passed to - -- the `settings` field of the server config. You must look up that documentation yourself. local servers = { - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, - -- rust_analyzer = {}, - -- tsserver = {}, - + bashls = { + bashIde = { + globPattern = "*@(.sh|.inc|.bash|.command)" + } + }, lua_ls = { Lua = { diagnostics = { globals = { 'vim' } }, @@ -76,6 +70,22 @@ return { telemetry = { enable = false }, }, }, + html = {}, + jqls = {}, + jsonls = {}, + marksman = {}, + pyright = { + python = { + analysis = { + autoSearchPaths = true, + diagnosticMode = "openFilesOnly", + useLibraryCodeForTypes = true + } + } + }, + rnix = {}, + tsserver = {}, + yamlls = {}, } -- From c740bd0b9a2478b36eebaa7e5b688a54ad43241e Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 5 Nov 2023 10:05:31 -0800 Subject: [PATCH 032/114] add obsidian.nvim --- lua/plugins/obsidian.nvim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 lua/plugins/obsidian.nvim diff --git a/lua/plugins/obsidian.nvim b/lua/plugins/obsidian.nvim new file mode 100644 index 0000000..0521e74 --- /dev/null +++ b/lua/plugins/obsidian.nvim @@ -0,0 +1,21 @@ +return { + "epwalsh/obsidian.nvim", + lazy = true, + event = { + "BufReadPre " .. vim.fn.expand "~" .. "/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Notes/**.md", + "BufNewFile " .. vim.fn.expand "~" .. "/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Notes/**.md", + }, + dependencies = { + "nvim-lua/plenary.nvim", + }, + opts = { + workspaces = { + { + name = "personal", + path = "~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Notes", + }, + }, + use_advanced_uri = false, + }, +} + From a2a4948626b84eb5115d2826afc76978c659e535 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 5 Nov 2023 14:58:59 -0800 Subject: [PATCH 033/114] obsidian plugin updates --- lua/plugins/{obsidian.nvim => obsidian.lua} | 6 ++++++ 1 file changed, 6 insertions(+) rename lua/plugins/{obsidian.nvim => obsidian.lua} (60%) diff --git a/lua/plugins/obsidian.nvim b/lua/plugins/obsidian.lua similarity index 60% rename from lua/plugins/obsidian.nvim rename to lua/plugins/obsidian.lua index 0521e74..8669dd3 100644 --- a/lua/plugins/obsidian.nvim +++ b/lua/plugins/obsidian.lua @@ -8,6 +8,12 @@ return { dependencies = { "nvim-lua/plenary.nvim", }, + keys = { + { "no", "ObsidianQuickSwitch", desc = "Obsidian Quick Switch (Telescope)" }, + { "nn", "ObsidianNew", desc = "Create a new obsidian note" }, + { "ns", "ObsidianSearch", desc = "Obsidian Search" }, + { "not", "ObsidianToday", desc = "Obsidian new daily note" }, + }, opts = { workspaces = { { From bfe51501c07bbcd9e5b97741cffe1b23b0091b56 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 5 Nov 2023 15:09:24 -0800 Subject: [PATCH 034/114] obsidian config correction --- lua/plugins/obsidian.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/obsidian.lua b/lua/plugins/obsidian.lua index 8669dd3..31fed14 100644 --- a/lua/plugins/obsidian.lua +++ b/lua/plugins/obsidian.lua @@ -2,8 +2,8 @@ return { "epwalsh/obsidian.nvim", lazy = true, event = { - "BufReadPre " .. vim.fn.expand "~" .. "/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Notes/**.md", - "BufNewFile " .. vim.fn.expand "~" .. "/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Notes/**.md", + "BufReadPre " .. vim.fn.expand "~" .. "\"/Library/Mobile Documents/iCloud~md~obsidian/Documents/Notes/**.md\"", + "BufNewFile " .. vim.fn.expand "~" .. "\"/Library/Mobile Documents/iCloud~md~obsidian/Documents/Notes/**.md\"", }, dependencies = { "nvim-lua/plenary.nvim", @@ -18,7 +18,7 @@ return { workspaces = { { name = "personal", - path = "~/Library/Mobile\ Documents/iCloud~md~obsidian/Documents/Notes", + path = "\"~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Notes\"", }, }, use_advanced_uri = false, From d1f3552a6bb1b574f553301a99482652be6ab5f3 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 5 Nov 2023 20:26:08 -0800 Subject: [PATCH 035/114] better neorg key mappings --- lua/plugins/neorg.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua index 170be0c..1559d5c 100644 --- a/lua/plugins/neorg.lua +++ b/lua/plugins/neorg.lua @@ -4,10 +4,10 @@ return { build = ":Neorg sync-parsers", dependencies = { "nvim-lua/plenary.nvim" }, keys = { - { "ni", "Neorg index", desc = "Index" }, - { "ns", "Neorg generate-workspace-summary", desc = "Generate Workspace Summary" }, - { "njt", "Neorg journal today", desc = "Journal Today" }, - { "njT", "Neorg journal template", desc = "Journal Template" }, + { "ni", "Neorg index", desc = "Neorg index" }, + { "nw", "Neorg generate-workspace-summary", desc = "Neorg generate Workspace Summary" }, + { "njt", "Neorg journal today", desc = "Neorg Journal Today" }, + { "njT", "Neorg journal template", desc = "Neorg Journal Template" }, }, config = function() require("neorg").setup { From 30857126bc323af64c495fda8a8256f24d0ff1fa Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 5 Nov 2023 20:36:00 -0800 Subject: [PATCH 036/114] obsidian key map update --- lua/plugins/obsidian.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/obsidian.lua b/lua/plugins/obsidian.lua index 31fed14..90d6896 100644 --- a/lua/plugins/obsidian.lua +++ b/lua/plugins/obsidian.lua @@ -12,7 +12,7 @@ return { { "no", "ObsidianQuickSwitch", desc = "Obsidian Quick Switch (Telescope)" }, { "nn", "ObsidianNew", desc = "Create a new obsidian note" }, { "ns", "ObsidianSearch", desc = "Obsidian Search" }, - { "not", "ObsidianToday", desc = "Obsidian new daily note" }, + { "nd", "ObsidianToday", desc = "Obsidian new daily note" }, }, opts = { workspaces = { From eb9068022763edafca9ac280ab3553fafc59ee5b Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 5 Nov 2023 20:50:31 -0800 Subject: [PATCH 037/114] obsidian paths correction --- lua/plugins/obsidian.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/obsidian.lua b/lua/plugins/obsidian.lua index 90d6896..cb20731 100644 --- a/lua/plugins/obsidian.lua +++ b/lua/plugins/obsidian.lua @@ -2,8 +2,8 @@ return { "epwalsh/obsidian.nvim", lazy = true, event = { - "BufReadPre " .. vim.fn.expand "~" .. "\"/Library/Mobile Documents/iCloud~md~obsidian/Documents/Notes/**.md\"", - "BufNewFile " .. vim.fn.expand "~" .. "\"/Library/Mobile Documents/iCloud~md~obsidian/Documents/Notes/**.md\"", + "BufReadPre " .. vim.fn.expand "~" .. "/obsidian", + "BufNewFile " .. vim.fn.expand "~" .. "/obsidian", }, dependencies = { "nvim-lua/plenary.nvim", @@ -18,7 +18,7 @@ return { workspaces = { { name = "personal", - path = "\"~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Notes\"", + path = "~/obsidian", }, }, use_advanced_uri = false, From 023d479cad1a3e7cdc51f5f8370743d2b7814a9e Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 17 Dec 2023 13:16:29 -0800 Subject: [PATCH 038/114] add copilot --- lua/plugins/copilot.lua | 4 ++++ lua/plugins/init.lua | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/copilot.lua diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua new file mode 100644 index 0000000..3829791 --- /dev/null +++ b/lua/plugins/copilot.lua @@ -0,0 +1,4 @@ +return { + "github/copilot.vim", + lazy = false, +} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index f7dd7d6..99104e1 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -21,7 +21,7 @@ return { { "ellisonleao/gruvbox.nvim", lazy = true, -- make sure we load this during startup if it is your main colorscheme - priority = 1000 , + priority = 1000 , config = function() require("gruvbox").setup({ dim_inactive = false, From 0c64477fde776a16cb57fdd5525df5008026c771 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 17 Dec 2023 13:55:43 -0800 Subject: [PATCH 039/114] remap tab for copilot --- lua/plugins/copilot.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index 3829791..5f3072e 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -1,4 +1,9 @@ return { "github/copilot.vim", lazy = false, + config = function () + vim.api.nvim_set_keymap('i', '', 'copilot#Accept("")', { silent = true, script = true, expr = true }) + vim.g.copilot_no_tab_map = true; + vim.g.copilot_assume_mapped = true; + end } From 127bb2900202c53606acdaa7f4c239b4b64fdd3b Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 17 Dec 2023 15:17:14 -0800 Subject: [PATCH 040/114] update metals to use global executable --- lua/plugins/nvim-metals.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/nvim-metals.lua b/lua/plugins/nvim-metals.lua index 1356846..08d6c74 100644 --- a/lua/plugins/nvim-metals.lua +++ b/lua/plugins/nvim-metals.lua @@ -19,6 +19,7 @@ return { metals_config.settings = { serverVersion = "latest.snapshot", + useGlobalExecutable = true, showImplicitArguments = true, showImplicitConversionsAndClasses = true, showInferredType = true, From 49af022e9a5fbf4d5a87a4fabafb42fd4890cfed Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 17 Dec 2023 15:25:05 -0800 Subject: [PATCH 041/114] remove JAVA_HOME setting in metals --- lua/plugins/nvim-metals.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/nvim-metals.lua b/lua/plugins/nvim-metals.lua index 08d6c74..8cedf90 100644 --- a/lua/plugins/nvim-metals.lua +++ b/lua/plugins/nvim-metals.lua @@ -27,7 +27,6 @@ return { excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" }, -- fallbackScalaVersion = "2.13.8", superMethodLensesEnabled = true, - javaHome = "/Users/salar/.nix-profile", } metals_config.on_attach = function(client, bufnr) From b89b3e708b8faac467f7f104f7a768e791ee638d Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 17 Feb 2024 15:44:34 -0800 Subject: [PATCH 042/114] add img-clip plugin --- lua/plugins/img-clip.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lua/plugins/img-clip.lua diff --git a/lua/plugins/img-clip.lua b/lua/plugins/img-clip.lua new file mode 100644 index 0000000..dcc2f7e --- /dev/null +++ b/lua/plugins/img-clip.lua @@ -0,0 +1,13 @@ +return { + "HakonHarnes/img-clip.nvim", + event = "BufEnter", + opts = { + -- add options here + -- or leave it empty to use the default settings + }, + keys = { + -- suggested keymap + { "p", "PasteImage", desc = "Paste clipboard image" }, + }, +} + From f6da4d1530ff27ad873da4b9e06adf74d2869845 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 9 Mar 2024 10:16:54 -0800 Subject: [PATCH 043/114] removed obisidian and added conform and todo comments --- lua/plugins/conform.lua | 24 ++++++++++++++++++++++++ lua/plugins/obsidian.lua | 27 --------------------------- lua/plugins/todo-comments.lua | 12 ++++++++++++ 3 files changed, 36 insertions(+), 27 deletions(-) create mode 100644 lua/plugins/conform.lua delete mode 100644 lua/plugins/obsidian.lua create mode 100644 lua/plugins/todo-comments.lua diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua new file mode 100644 index 0000000..ac0a0e8 --- /dev/null +++ b/lua/plugins/conform.lua @@ -0,0 +1,24 @@ +return { + "stevearc/conform.nvim", + config = function() + require("conform").setup({ + formatters_by_ft = { + lua = { "stylua" }, + python = function(bufnr) + if require("conform").get_formatter_info("ruff_format", bufnr).available then + return { "ruff_fix", "ruff_format" } + else + return { "isort", "black", "flake8" } + end + end, + scala = { "scalafmt" }, + swift = { "swift_format" }, + ["*"] = { "trim_whitespace", "trim_newlines" }, + }, + format_on_save = { + timeout_ms = 500, + lsp_fallback = true, + }, + }) + end, +} diff --git a/lua/plugins/obsidian.lua b/lua/plugins/obsidian.lua deleted file mode 100644 index cb20731..0000000 --- a/lua/plugins/obsidian.lua +++ /dev/null @@ -1,27 +0,0 @@ -return { - "epwalsh/obsidian.nvim", - lazy = true, - event = { - "BufReadPre " .. vim.fn.expand "~" .. "/obsidian", - "BufNewFile " .. vim.fn.expand "~" .. "/obsidian", - }, - dependencies = { - "nvim-lua/plenary.nvim", - }, - keys = { - { "no", "ObsidianQuickSwitch", desc = "Obsidian Quick Switch (Telescope)" }, - { "nn", "ObsidianNew", desc = "Create a new obsidian note" }, - { "ns", "ObsidianSearch", desc = "Obsidian Search" }, - { "nd", "ObsidianToday", desc = "Obsidian new daily note" }, - }, - opts = { - workspaces = { - { - name = "personal", - path = "~/obsidian", - }, - }, - use_advanced_uri = false, - }, -} - diff --git a/lua/plugins/todo-comments.lua b/lua/plugins/todo-comments.lua new file mode 100644 index 0000000..a03871a --- /dev/null +++ b/lua/plugins/todo-comments.lua @@ -0,0 +1,12 @@ +return { + "folke/todo-comments.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + keys = { + { "t", "TodoTelescope", desc = "To Do Comments" }, + }, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + } +} From 11315a02af41ec986c2b32bf3509c0ed539bed42 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 23 Mar 2024 09:42:10 -0700 Subject: [PATCH 044/114] add rust lsp support and cleanup --- lua/plugins/lsp.lua | 17 +++++++++++------ lua/plugins/neorg.lua | 34 ---------------------------------- 2 files changed, 11 insertions(+), 40 deletions(-) delete mode 100644 lua/plugins/neorg.lua diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index c85dc70..5dbdfeb 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -60,12 +60,12 @@ return { local servers = { bashls = { bashIde = { - globPattern = "*@(.sh|.inc|.bash|.command)" - } + globPattern = "*@(.sh|.inc|.bash|.command)", + }, }, lua_ls = { Lua = { - diagnostics = { globals = { 'vim' } }, + diagnostics = { globals = { "vim" } }, workspace = { checkThirdParty = false }, telemetry = { enable = false }, }, @@ -79,11 +79,16 @@ return { analysis = { autoSearchPaths = true, diagnosticMode = "openFilesOnly", - useLibraryCodeForTypes = true - } - } + useLibraryCodeForTypes = true, + }, + }, }, rnix = {}, + rust_analyzer = { + diagnostics = { + enable = true, + }, + }, tsserver = {}, yamlls = {}, } diff --git a/lua/plugins/neorg.lua b/lua/plugins/neorg.lua deleted file mode 100644 index 1559d5c..0000000 --- a/lua/plugins/neorg.lua +++ /dev/null @@ -1,34 +0,0 @@ -return { - "nvim-neorg/neorg", - lazy = false, - build = ":Neorg sync-parsers", - dependencies = { "nvim-lua/plenary.nvim" }, - keys = { - { "ni", "Neorg index", desc = "Neorg index" }, - { "nw", "Neorg generate-workspace-summary", desc = "Neorg generate Workspace Summary" }, - { "njt", "Neorg journal today", desc = "Neorg Journal Today" }, - { "njT", "Neorg journal template", desc = "Neorg Journal Template" }, - }, - config = function() - require("neorg").setup { - load = { - ["core.defaults"] = {}, - ["core.summary"] = {}, - ["core.concealer"] = { - config = { - icon_preset = "diamond", - }, - }, - ["core.dirman"] = { - config = { - workspaces = { - notes = "~/notes", - til = "~/til", - }, - default_workspace = "notes", - }, - }, - }, - } - end, -} From 97b02badadb64b1abd97729ae9349c4cddaace46 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 30 Mar 2024 21:47:40 -0700 Subject: [PATCH 045/114] update conform config to be able to toggle it on or off --- lua/plugins/conform.lua | 47 +++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index ac0a0e8..0430c49 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -3,22 +3,43 @@ return { config = function() require("conform").setup({ formatters_by_ft = { - lua = { "stylua" }, - python = function(bufnr) - if require("conform").get_formatter_info("ruff_format", bufnr).available then - return { "ruff_fix", "ruff_format" } - else - return { "isort", "black", "flake8" } - end + lua = { "stylua" }, + python = function(bufnr) + if require("conform").get_formatter_info("ruff_format", bufnr).available then + return { "ruff_fix", "ruff_format" } + else + return { "isort", "black", "flake8" } + end end, - scala = { "scalafmt" }, - swift = { "swift_format" }, + scala = { "scalafmt" }, + swift = { "swift_format" }, ["*"] = { "trim_whitespace", "trim_newlines" }, }, - format_on_save = { - timeout_ms = 500, - lsp_fallback = true, - }, + format_on_save = function(bufnr) + -- Disable with a global or buffer-local variable + if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then + return + end + return { timeout_ms = 500, lsp_fallback = true } + end, + }) + + vim.api.nvim_create_user_command("FormatDisable", function(args) + if args.bang then + -- FormatDisable! will disable formatting just for this buffer + vim.b.disable_autoformat = true + else + vim.g.disable_autoformat = true + end + end, { + desc = "Disable autoformat-on-save", + bang = true, + }) + vim.api.nvim_create_user_command("FormatEnable", function() + vim.b.disable_autoformat = false + vim.g.disable_autoformat = false + end, { + desc = "Re-enable autoformat-on-save", }) end, } From e321003bb84ab1fbb01bcbd2379b2cad149909c9 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 18 May 2024 22:04:13 -0700 Subject: [PATCH 046/114] remove unused plugins and run stylelua --- init.lua | 2 +- lua/plugins/copilot.lua | 10 +++++----- lua/plugins/img-clip.lua | 1 - lua/plugins/init.lua | 21 --------------------- lua/plugins/todo-comments.lua | 2 +- 5 files changed, 7 insertions(+), 29 deletions(-) diff --git a/init.lua b/init.lua index 8bc6445..e9da6ef 100644 --- a/init.lua +++ b/init.lua @@ -82,7 +82,7 @@ vim.api.nvim_create_autocmd("TextYankPost", { }) -- Terminal Escape Key Mapping -vim.keymap.set('t', '', [[]]) +vim.keymap.set("t", "", [[]]) -- Diagnostic keymaps vim.keymap.set("n", "[d", vim.diagnostic.goto_prev) diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index 5f3072e..4a02b54 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -1,9 +1,9 @@ return { "github/copilot.vim", lazy = false, - config = function () - vim.api.nvim_set_keymap('i', '', 'copilot#Accept("")', { silent = true, script = true, expr = true }) - vim.g.copilot_no_tab_map = true; - vim.g.copilot_assume_mapped = true; - end + config = function() + vim.api.nvim_set_keymap("i", "", 'copilot#Accept("")', { silent = true, script = true, expr = true }) + vim.g.copilot_no_tab_map = true + vim.g.copilot_assume_mapped = true + end, } diff --git a/lua/plugins/img-clip.lua b/lua/plugins/img-clip.lua index dcc2f7e..66d49cb 100644 --- a/lua/plugins/img-clip.lua +++ b/lua/plugins/img-clip.lua @@ -10,4 +10,3 @@ return { { "p", "PasteImage", desc = "Paste clipboard image" }, }, } - diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 99104e1..02ce023 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -18,18 +18,6 @@ return { vim.cmd([[colorscheme tokyonight]]) end, }, - { - "ellisonleao/gruvbox.nvim", - lazy = true, -- make sure we load this during startup if it is your main colorscheme - priority = 1000 , - config = function() - require("gruvbox").setup({ - dim_inactive = false, - }) - vim.o.background = "light" - vim.cmd([[colorscheme gruvbox]]) - end, - }, { "folke/trouble.nvim", config = function() @@ -65,14 +53,5 @@ return { }) end, }, - "tpope/vim-fugitive", - "tpope/vim-rhubarb", - "tpope/vim-sleuth", - { - "numToStr/Comment.nvim", - config = function() - require("Comment").setup() - end, - }, "SidOfc/mkdx", } diff --git a/lua/plugins/todo-comments.lua b/lua/plugins/todo-comments.lua index a03871a..1d88635 100644 --- a/lua/plugins/todo-comments.lua +++ b/lua/plugins/todo-comments.lua @@ -8,5 +8,5 @@ return { -- your configuration comes here -- or leave it empty to use the default settings -- refer to the configuration section below - } + }, } From b3e023926ac8aff68c6db7e6ec02847485e53f08 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 19 May 2024 17:11:05 -0700 Subject: [PATCH 047/114] treesitter updates --- lua/plugins/treesitter.lua | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 2b486ea..f8cee9f 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -9,22 +9,18 @@ return { require("nvim-treesitter.configs").setup({ -- Add languages to be installed here that you want installed for treesitter ensure_installed = { + "awk", + "bash", "c", "cpp", - "go", - "lua", - "python", - "rust", - "typescript", - "vim", - "scala", - "bash", + "css", "dockerfile", "fish", "git_rebase", "gitattributes", "gitcommit", "gitignore", + "go", "haskell", "hocon", "html", @@ -33,12 +29,24 @@ return { "javascript", "json", "json5", + "jsonc", "latex", + "lua", "make", "markdown_inline", "nix", + "proto", + "python", + "rust", + "scala", + "scss", "sql", + "swift", "terraform", + "toml", + "typescript", + "vim", + "xml", "yaml", }, From 21ebd9083027ec2bdd0007809dbfd32db31cdb54 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 2 Jun 2024 11:16:46 -0700 Subject: [PATCH 048/114] add gen.nvim --- lua/plugins/gen.lua | 48 +++++++++++++++++++++++++++++++++++++++ lua/plugins/telescope.lua | 2 ++ 2 files changed, 50 insertions(+) create mode 100644 lua/plugins/gen.lua diff --git a/lua/plugins/gen.lua b/lua/plugins/gen.lua new file mode 100644 index 0000000..6659e80 --- /dev/null +++ b/lua/plugins/gen.lua @@ -0,0 +1,48 @@ +return { + "David-Kunz/gen.nvim", + lazy = false, + keys = { + { "ai", ":Gen", mode = { "n", "v" }, desc = "AI tools using Ollama" }, + { "aa", ":Gen Ask", mode = { "n", "v" }, desc = "[A]I [A]sk" }, + { + "am", + function() + require("gen").select_model() + end, + mode = { "n", "v" }, + desc = "Select [A]I [m]odel", + }, + }, + config = function() + require("gen").setup({ + ollama = { + model = "codellama", + host = "localhost", + port = "11434", + quit_map = "q", + retry_map = "", + init = function(options) + pcall(io.popen, "ollama serve > /dev/null 2>&1 &") + end, + command = function(options) + local body = { model = options.model, stream = true } + return "curl --silent --no-buffer -X POST http://" + .. options.host + .. ":" + .. options.port + .. "/api/chat -d $body" + end, + display_mode = "split", -- "split" or "float" + show_prompt = true, + show_model = true, + no_auto_close = false, + debug = false, + }, + }) + require("gen").prompts["Fix_Code"] = { + prompt = "Fix the following code. Only ouput the result in format ```$filetype\n...\n```:\n```$filetype\n$text\n```", + replace = true, + extract = "```$filetype\n(.-)```", + } + end, +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index adb9354..c460410 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -5,6 +5,7 @@ return { "nvim-lua/plenary.nvim", { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, "debugloop/telescope-undo.nvim", + "nvim-telescope/telescope-ui-select.nvim", }, config = function() require("telescope").setup({ @@ -21,6 +22,7 @@ return { -- Enable telescope fzf native, if installed pcall(require("telescope").load_extension, "fzf") pcall(require("telescope").load_extension, "scaladex") + pcall(require("telescope").load_extension, "ui-select") pcall(require("telescope").load_extension, "undo") -- See `:help telescope.builtin` From 0d0c2c489898bad99cdf8f9d00df572f52276e2f Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 2 Jun 2024 12:13:46 -0700 Subject: [PATCH 049/114] correction to gen.nvim --- lua/plugins/gen.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/gen.lua b/lua/plugins/gen.lua index 6659e80..e9b0e3c 100644 --- a/lua/plugins/gen.lua +++ b/lua/plugins/gen.lua @@ -15,7 +15,7 @@ return { }, config = function() require("gen").setup({ - ollama = { + { model = "codellama", host = "localhost", port = "11434", From b1f111c8ed59fcf87d132345f63eb92a5c8d47e7 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 2 Jun 2024 13:57:16 -0700 Subject: [PATCH 050/114] make gen.nvim lazy --- lua/plugins/gen.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/gen.lua b/lua/plugins/gen.lua index e9b0e3c..4a01257 100644 --- a/lua/plugins/gen.lua +++ b/lua/plugins/gen.lua @@ -1,6 +1,6 @@ return { "David-Kunz/gen.nvim", - lazy = false, + lazy = true, keys = { { "ai", ":Gen", mode = { "n", "v" }, desc = "AI tools using Ollama" }, { "aa", ":Gen Ask", mode = { "n", "v" }, desc = "[A]I [A]sk" }, From 1dce120f9bd00bd41a44b0e330f5c0fd5e4f5ae1 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 7 Jun 2024 23:18:34 -0700 Subject: [PATCH 051/114] nix lsp update --- lua/plugins/conform.lua | 1 + lua/plugins/lsp.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua index 0430c49..4a872d3 100644 --- a/lua/plugins/conform.lua +++ b/lua/plugins/conform.lua @@ -4,6 +4,7 @@ return { require("conform").setup({ formatters_by_ft = { lua = { "stylua" }, + nix = { "nixfmt" }, python = function(bufnr) if require("conform").get_formatter_info("ruff_format", bufnr).available then return { "ruff_fix", "ruff_format" } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 5dbdfeb..a6bbef2 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -74,6 +74,7 @@ return { jqls = {}, jsonls = {}, marksman = {}, + nil_ls = {}, pyright = { python = { analysis = { @@ -83,7 +84,6 @@ return { }, }, }, - rnix = {}, rust_analyzer = { diagnostics = { enable = true, From 79193d44f7543db67498291be306347575fb5718 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Wed, 7 Aug 2024 08:19:18 -0700 Subject: [PATCH 052/114] add vscode support --- init.lua | 189 ++++++++++++++++++------------------ lua/user/vscode_keymaps.lua | 41 ++++++++ 2 files changed, 138 insertions(+), 92 deletions(-) create mode 100644 lua/user/vscode_keymaps.lua diff --git a/init.lua b/init.lua index e9da6ef..1cde3e3 100644 --- a/init.lua +++ b/init.lua @@ -1,94 +1,99 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, +if vim.g.vscode then + -- VSCode Neovim + require("user.vscode_keymaps") +else + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) + end + vim.opt.rtp:prepend(lazypath) + + -- Set as the leader key + -- See `:help mapleader` + -- NOTE: Must happen before plugins are required (otherwise wrong leader will be used) + vim.g.mapleader = " " + vim.g.maplocalleader = " " + + require("lazy").setup("plugins", { + lockfile = vim.fn.stdpath("data") .. "/lazy-lock.json", -- in data directory as normal location read only as managed by nix + dev = { + path = "~/Projects/Neovim", + }, }) + + -- [[ Setting options ]] + -- See `:help vim.o` + + -- Set highlight on search + vim.o.hlsearch = true + vim.o.incsearch = true + + -- clipboard + vim.o.clipboard = "unnamedplus" + + -- Make line numbers default + vim.wo.number = true + + -- Enable mouse mode + vim.o.mouse = "a" + + -- Enable break indent + vim.o.breakindent = true + + -- Save undo history + vim.o.undofile = true + + -- Case insensitive searching UNLESS /C or capital in search + vim.o.ignorecase = true + vim.o.smartcase = true + + -- Decrease update time + vim.o.updatetime = 250 + vim.wo.signcolumn = "yes" + + vim.g.loaded_netrw = 1 + vim.g.loaded_netrwPlugin = 1 + + -- Set completeopt to have a better completion experience + vim.o.completeopt = "menuone,noselect" + + -- [[ Basic Keymaps ]] + + -- Keymaps for better default experience + -- See `:help vim.keymap.set()` + vim.keymap.set({ "n", "v" }, "", "", { silent = true }) + + -- Remap for dealing with word wrap + vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) + vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) + + -- [[ Highlight on yank ]] + -- See `:help vim.highlight.on_yank()` + local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }) + vim.api.nvim_create_autocmd("TextYankPost", { + callback = function() + vim.highlight.on_yank() + end, + group = highlight_group, + pattern = "*", + }) + + -- Terminal Escape Key Mapping + vim.keymap.set("t", "", [[]]) + + -- Diagnostic keymaps + vim.keymap.set("n", "[d", vim.diagnostic.goto_prev) + vim.keymap.set("n", "]d", vim.diagnostic.goto_next) + vim.keymap.set("n", "e", vim.diagnostic.open_float) + vim.keymap.set("n", "q", vim.diagnostic.setloclist) + + -- The line beneath this is called `modeline`. See `:help modeline` + -- vim: ts=2 sts=2 sw=2 et end -vim.opt.rtp:prepend(lazypath) - --- Set as the leader key --- See `:help mapleader` --- NOTE: Must happen before plugins are required (otherwise wrong leader will be used) -vim.g.mapleader = " " -vim.g.maplocalleader = " " - -require("lazy").setup("plugins", { - lockfile = vim.fn.stdpath("data") .. "/lazy-lock.json", -- in data directory as normal location read only as managed by nix - dev = { - path = "~/Projects/Neovim", - }, -}) - --- [[ Setting options ]] --- See `:help vim.o` - --- Set highlight on search -vim.o.hlsearch = true -vim.o.incsearch = true - --- clipboard -vim.o.clipboard = "unnamedplus" - --- Make line numbers default -vim.wo.number = true - --- Enable mouse mode -vim.o.mouse = "a" - --- Enable break indent -vim.o.breakindent = true - --- Save undo history -vim.o.undofile = true - --- Case insensitive searching UNLESS /C or capital in search -vim.o.ignorecase = true -vim.o.smartcase = true - --- Decrease update time -vim.o.updatetime = 250 -vim.wo.signcolumn = "yes" - -vim.g.loaded_netrw = 1 -vim.g.loaded_netrwPlugin = 1 - --- Set completeopt to have a better completion experience -vim.o.completeopt = "menuone,noselect" - --- [[ Basic Keymaps ]] - --- Keymaps for better default experience --- See `:help vim.keymap.set()` -vim.keymap.set({ "n", "v" }, "", "", { silent = true }) - --- Remap for dealing with word wrap -vim.keymap.set("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) -vim.keymap.set("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) - --- [[ Highlight on yank ]] --- See `:help vim.highlight.on_yank()` -local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }) -vim.api.nvim_create_autocmd("TextYankPost", { - callback = function() - vim.highlight.on_yank() - end, - group = highlight_group, - pattern = "*", -}) - --- Terminal Escape Key Mapping -vim.keymap.set("t", "", [[]]) - --- Diagnostic keymaps -vim.keymap.set("n", "[d", vim.diagnostic.goto_prev) -vim.keymap.set("n", "]d", vim.diagnostic.goto_next) -vim.keymap.set("n", "e", vim.diagnostic.open_float) -vim.keymap.set("n", "q", vim.diagnostic.setloclist) - --- The line beneath this is called `modeline`. See `:help modeline` --- vim: ts=2 sts=2 sw=2 et diff --git a/lua/user/vscode_keymaps.lua b/lua/user/vscode_keymaps.lua new file mode 100644 index 0000000..c58727b --- /dev/null +++ b/lua/user/vscode_keymaps.lua @@ -0,0 +1,41 @@ +local keymap = vim.keymap.set +local opts = { noremap = true, silent = true } + +-- remap leader key +keymap("n", "", "", opts) +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +-- yank to system clipboard +keymap({ "n", "v" }, "y", '"+y', opts) + +-- paste from system clipboard +keymap({ "n", "v" }, "p", '"+p', opts) + +-- better indent handling +keymap("v", "<", "", ">gv", opts) + +-- move text up and down +keymap("v", "J", ":m .+1==", opts) +keymap("v", "K", ":m .-2==", opts) +keymap("x", "J", ":move '>+1gv-gv", opts) +keymap("x", "K", ":move '<-2gv-gv", opts) + +-- paste preserves primal yanked piece +keymap("v", "p", '"_dP', opts) + +-- removes highlighting after escaping vim search +keymap("n", "", ":noh", opts) + +-- call vscode commands from neovim +keymap({ "n", "v" }, "t", "lua require('vscode').action('workbench.action.terminal.toggleTerminal')") +keymap({ "n", "v" }, "b", "lua require('vscode').action('editor.debug.action.toggleBreakpoint')") +keymap({ "n", "v" }, "d", "lua require('vscode').action('editor.action.showHover')") +keymap({ "n", "v" }, "a", "lua require('vscode').action('editor.action.quickFix')") +keymap({ "n", "v" }, "sp", "lua require('vscode').action('workbench.actions.view.problems')") +keymap({ "n", "v" }, "cn", "lua require('vscode').action('notifications.clearAll')") +keymap({ "n", "v" }, "ff", "lua require('vscode').action('workbench.action.quickOpen')") +keymap({ "n", "v" }, "cp", "lua require('vscode').action('workbench.action.showCommands')") +keymap({ "n", "v" }, "pr", "lua require('vscode').action('code-runner.run')") +keymap({ "n", "v" }, "fd", "lua require('vscode').action('editor.action.formatDocument')") From 59359e9d5eb45245827098c6ed8ff17845c51d3a Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 16 Aug 2024 18:38:27 -0700 Subject: [PATCH 053/114] copilot setting update --- lua/plugins/copilot.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index 4a02b54..36bf477 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -2,7 +2,12 @@ return { "github/copilot.vim", lazy = false, config = function() - vim.api.nvim_set_keymap("i", "", 'copilot#Accept("")', { silent = true, script = true, expr = true }) + vim.api.nvim_set_keymap( + "i", + "", + 'copilot#Accept("\\")', + { silent = true, script = true, expr = true, replace_keycodes = false } + ) vim.g.copilot_no_tab_map = true vim.g.copilot_assume_mapped = true end, From 14ba336744f7aa74ae39f95a3105d97ec4d54886 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 16 Aug 2024 18:52:27 -0700 Subject: [PATCH 054/114] use ctrl-j to accept copilot --- lua/plugins/copilot.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index 36bf477..99b091d 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -4,7 +4,7 @@ return { config = function() vim.api.nvim_set_keymap( "i", - "", + "", 'copilot#Accept("\\")', { silent = true, script = true, expr = true, replace_keycodes = false } ) From 05da9e89e0a01820dc8dc645d41cd9b8a1962f98 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 18 Aug 2024 10:43:00 -0700 Subject: [PATCH 055/114] open neotree on the right --- lua/plugins/neo-tree.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 8898fec..68bf8fe 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -11,6 +11,9 @@ return { }, config = function() require("neo-tree").setup({ + window = { + position = "right", + }, filesystem = { filtered_items = { visible = true, From 2c54ee721d3a67f2ddfb1bb826ea96633f33c3a9 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 25 Aug 2024 21:24:24 -0700 Subject: [PATCH 056/114] disable smartindent --- init.lua | 3 +++ lua/plugins/treesitter.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 1cde3e3..f31275b 100644 --- a/init.lua +++ b/init.lua @@ -47,6 +47,9 @@ else -- Enable break indent vim.o.breakindent = true + -- smart indenting + vim.o.smartindent = false + -- Save undo history vim.o.undofile = true diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index f8cee9f..cfc5538 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -58,7 +58,7 @@ return { auto_install = true, highlight = { enable = true }, - indent = { enable = true, disable = { "python" } }, + indent = { enable = true }, incremental_selection = { enable = true, keymaps = { From 87a0613402f9ea6fe193612792e758480dfbc291 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 25 Aug 2024 21:28:54 -0700 Subject: [PATCH 057/114] disable treesitter indent and re-enable smartindent --- init.lua | 2 +- lua/plugins/treesitter.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index f31275b..e7fea8c 100644 --- a/init.lua +++ b/init.lua @@ -48,7 +48,7 @@ else vim.o.breakindent = true -- smart indenting - vim.o.smartindent = false + vim.o.smartindent = true -- Save undo history vim.o.undofile = true diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index cfc5538..b2d666d 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -58,7 +58,7 @@ return { auto_install = true, highlight = { enable = true }, - indent = { enable = true }, + indent = { enable = false }, incremental_selection = { enable = true, keymaps = { From 889d7df0c73d9aac2c62f969d869ec86e42817c0 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 30 Aug 2024 23:24:53 -0700 Subject: [PATCH 058/114] pyright config change --- lua/plugins/lsp.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index a6bbef2..e661549 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -78,8 +78,10 @@ return { pyright = { python = { analysis = { + autoImportCompletions = true, autoSearchPaths = true, diagnosticMode = "openFilesOnly", + typeCheckingMode = "basic", useLibraryCodeForTypes = true, }, }, From 4dccd8145218f40a85ebacdc5a3400c40ef0308d Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 31 Aug 2024 09:13:32 -0700 Subject: [PATCH 059/114] replace pyright with basedpyright --- lua/plugins/lsp.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index e661549..3a1a95e 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -75,13 +75,21 @@ return { jsonls = {}, marksman = {}, nil_ls = {}, - pyright = { + basedpyright = { python = { analysis = { autoImportCompletions = true, autoSearchPaths = true, - diagnosticMode = "openFilesOnly", - typeCheckingMode = "basic", + diagnosticMode = "workspace", + reportMissingImports = true, + reportMissingParameterType = true, + reportUnnecessaryComparison = true, + reportUnnecessaryContains = true, + reportUnusedClass = true, + reportUnusedFunction = true, + reportUnsedImports = true, + reportUnsusedVariables = true, + typeCheckingMode = "all", useLibraryCodeForTypes = true, }, }, From 00741a1f18019d0b3592ac2a946cfcf04ad2f368 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 31 Aug 2024 09:37:12 -0700 Subject: [PATCH 060/114] correction to basedpyright settings --- lua/plugins/lsp.lua | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 3a1a95e..65122c4 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -76,22 +76,20 @@ return { marksman = {}, nil_ls = {}, basedpyright = { - python = { - analysis = { - autoImportCompletions = true, - autoSearchPaths = true, - diagnosticMode = "workspace", - reportMissingImports = true, - reportMissingParameterType = true, - reportUnnecessaryComparison = true, - reportUnnecessaryContains = true, - reportUnusedClass = true, - reportUnusedFunction = true, - reportUnsedImports = true, - reportUnsusedVariables = true, - typeCheckingMode = "all", - useLibraryCodeForTypes = true, - }, + analysis = { + autoImportCompletions = true, + autoSearchPaths = true, + diagnosticMode = "openFilesOnly", + reportMissingImports = true, + reportMissingParameterType = true, + reportUnnecessaryComparison = true, + reportUnnecessaryContains = true, + reportUnusedClass = true, + reportUnusedFunction = true, + reportUnsedImports = true, + reportUnsusedVariables = true, + typeCheckingMode = "all", + useLibraryCodeForTypes = true, }, }, rust_analyzer = { From f0f0a04618cbf1c59c9381d5e418eac6280e8d95 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 1 Sep 2024 22:54:53 -0700 Subject: [PATCH 061/114] add neotest and overseer --- lua/plugins/lualine.lua | 2 +- lua/plugins/neotest.lua | 40 ++++++++++++++++++++++++++++++++++++++++ lua/plugins/overseer.lua | 4 ++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/neotest.lua create mode 100644 lua/plugins/overseer.lua diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 5b3558a..ba3a5ec 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -27,7 +27,7 @@ return { lualine_a = { "mode" }, lualine_b = { "branch", "diff", "diagnostics" }, lualine_c = { "filename" }, - lualine_x = { "g:metals_status", "encoding", "fileformat", "filetype" }, + lualine_x = { "g:metals_status", "encoding", "fileformat", "filetype", "overseer" }, lualine_y = { "progress" }, lualine_z = { "location" }, }, diff --git a/lua/plugins/neotest.lua b/lua/plugins/neotest.lua new file mode 100644 index 0000000..0150363 --- /dev/null +++ b/lua/plugins/neotest.lua @@ -0,0 +1,40 @@ +return { + "nvim-neotest/neotest", + dependencies = { + "nvim-neotest/nvim-nio", + "nvim-lua/plenary.nvim", + "antoinemadec/FixCursorHold.nvim", + "nvim-treesitter/nvim-treesitter", + "rcasia/neotest-java", + "nvim-neotest/neotest-python", + "stevanmilic/neotest-scala", + }, + keys = { + { "na", "lua require('neotest').run.attach()", desc = "Attach to the nearest test" }, + { "nl", "lua require('neotest').run.run_last()", desc = "Toggle Test Summary" }, + { "no", "lua require('neotest').output_panel.toggle()", desc = "Toggle Test Output Panel" }, + { "np", "lua require('neotest').run.stop()", desc = "Stop the nearest test" }, + { "ns", "lua require('neotest').summary.toggle()", desc = "Toggle Test Summary" }, + { "nt", "lua require('neotest').run.run()", desc = "Run the nearest test" }, + { + "nT", + "lua require('neotest').run.run(vim.fn.expand('%'))", + desc = "Run test the current file", + }, + }, + opts = { + adapters = { + ["neotest-java"] = {}, + ["neotest-python"] = { + runner = "pytest", + args = { "-vvv" }, + python = ".venv/bin/python", + }, + ["neotest-scala"] = { + runner = "sbt", + command = "test", + framework = "munit", + }, + }, + }, +} diff --git a/lua/plugins/overseer.lua b/lua/plugins/overseer.lua new file mode 100644 index 0000000..559779d --- /dev/null +++ b/lua/plugins/overseer.lua @@ -0,0 +1,4 @@ +return { + "stevearc/overseer.nvim", + opts = {}, +} From 2e34ee2c18d2b070986c2ce98df8e7f42f766761 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Mon, 2 Sep 2024 08:41:33 -0700 Subject: [PATCH 062/114] add neoclip and octo plugins --- lua/plugins/neoclip.lua | 63 +++++++++++++++++++++++++++++++++++++++ lua/plugins/octo.lua | 25 ++++++++++++++++ lua/plugins/telescope.lua | 1 + 3 files changed, 89 insertions(+) create mode 100644 lua/plugins/neoclip.lua create mode 100644 lua/plugins/octo.lua diff --git a/lua/plugins/neoclip.lua b/lua/plugins/neoclip.lua new file mode 100644 index 0000000..34c6ab5 --- /dev/null +++ b/lua/plugins/neoclip.lua @@ -0,0 +1,63 @@ +return { + "AckslD/nvim-neoclip.lua", + dependencies = { "kkharji/sqlite.lua" }, + keys = { + { "sp", "Telescope neoclip", desc = "Neoclip" }, + }, + opts = { + history = 1000, + enable_persistent_history = true, + length_limit = 1048576, + continuous_sync = false, + db_path = vim.fn.stdpath("data") .. "/databases/neoclip.sqlite3", + filter = nil, + preview = true, + prompt = nil, + default_register = '"', + default_register_macros = "q", + enable_macro_history = true, + content_spec_column = false, + disable_keycodes_parsing = false, + on_select = { + move_to_front = false, + close_telescope = true, + }, + on_paste = { + set_reg = false, + move_to_front = false, + close_telescope = true, + }, + on_replay = { + set_reg = false, + move_to_front = false, + close_telescope = true, + }, + on_custom_action = { + close_telescope = true, + }, + keys = { + telescope = { + i = { + select = "", + paste = "", + paste_behind = "", + replay = "", -- replay a macro + delete = "", -- delete an entry + edit = "", -- edit an entry + custom = {}, + }, + n = { + select = "", + paste = "p", + --- It is possible to map to more than one key. + -- paste = { 'p', '' }, + paste_behind = "P", + replay = "q", + delete = "d", + edit = "e", + custom = {}, + }, + }, + }, + }, +} diff --git a/lua/plugins/octo.lua b/lua/plugins/octo.lua new file mode 100644 index 0000000..acbaeaf --- /dev/null +++ b/lua/plugins/octo.lua @@ -0,0 +1,25 @@ +return { + "pwntester/octo.nvim", + cmd = "Octo", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-telescope/telescope.nvim", + "nvim-tree/nvim-web-devicons", + }, + config = function() + require("octo").setup({ + enable_builtin = true, + file_panel = { use_icons = true }, + mappings = { + review_diff = { + select_next_entry = { lhs = "", desc = "move to previous changed file" }, + select_prev_entry = { lhs = "", desc = "move to next changed file" }, + }, + }, + }) + vim.treesitter.language.register("markdown", "octo") + end, + keys = { + { "o", "Octo", desc = "Octo" }, + }, +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index c460410..6dfe88c 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -6,6 +6,7 @@ return { { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, "debugloop/telescope-undo.nvim", "nvim-telescope/telescope-ui-select.nvim", + "AckslD/nvim-neoclip.lua", }, config = function() require("telescope").setup({ From e032529ae28ab6b414ee5d0354e3d2f6f25fd0a7 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Mon, 2 Sep 2024 08:57:41 -0700 Subject: [PATCH 063/114] neoclip corrections --- lua/plugins/neoclip.lua | 2 +- lua/plugins/telescope.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/neoclip.lua b/lua/plugins/neoclip.lua index 34c6ab5..80e2fed 100644 --- a/lua/plugins/neoclip.lua +++ b/lua/plugins/neoclip.lua @@ -9,7 +9,7 @@ return { enable_persistent_history = true, length_limit = 1048576, continuous_sync = false, - db_path = vim.fn.stdpath("data") .. "/databases/neoclip.sqlite3", + db_path = vim.fn.stdpath("data") .. "~/.config/databases/neoclip.sqlite3", filter = nil, preview = true, prompt = nil, diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 6dfe88c..d8975d1 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -25,6 +25,7 @@ return { pcall(require("telescope").load_extension, "scaladex") pcall(require("telescope").load_extension, "ui-select") pcall(require("telescope").load_extension, "undo") + pcall(require("telescope").load_extension, "neoclip") -- See `:help telescope.builtin` vim.keymap.set("n", "?", require("telescope.builtin").oldfiles, { desc = "[?] Find recently opened files" }) From 4ad660ff6baa7c63a5338b0e9795e297bbd6baa8 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Tue, 3 Sep 2024 00:46:11 -0700 Subject: [PATCH 064/114] neoclip update --- lua/plugins/neoclip.lua | 67 +++++------------------------------------ 1 file changed, 8 insertions(+), 59 deletions(-) diff --git a/lua/plugins/neoclip.lua b/lua/plugins/neoclip.lua index 80e2fed..74144ef 100644 --- a/lua/plugins/neoclip.lua +++ b/lua/plugins/neoclip.lua @@ -1,63 +1,12 @@ return { "AckslD/nvim-neoclip.lua", dependencies = { "kkharji/sqlite.lua" }, - keys = { - { "sp", "Telescope neoclip", desc = "Neoclip" }, - }, - opts = { - history = 1000, - enable_persistent_history = true, - length_limit = 1048576, - continuous_sync = false, - db_path = vim.fn.stdpath("data") .. "~/.config/databases/neoclip.sqlite3", - filter = nil, - preview = true, - prompt = nil, - default_register = '"', - default_register_macros = "q", - enable_macro_history = true, - content_spec_column = false, - disable_keycodes_parsing = false, - on_select = { - move_to_front = false, - close_telescope = true, - }, - on_paste = { - set_reg = false, - move_to_front = false, - close_telescope = true, - }, - on_replay = { - set_reg = false, - move_to_front = false, - close_telescope = true, - }, - on_custom_action = { - close_telescope = true, - }, - keys = { - telescope = { - i = { - select = "", - paste = "", - paste_behind = "", - replay = "", -- replay a macro - delete = "", -- delete an entry - edit = "", -- edit an entry - custom = {}, - }, - n = { - select = "", - paste = "p", - --- It is possible to map to more than one key. - -- paste = { 'p', '' }, - paste_behind = "P", - replay = "q", - delete = "d", - edit = "e", - custom = {}, - }, - }, - }, - }, + config = function() + require("neoclip").setup({ + history = 1000, + enable_persistent_history = true, + db_path = vim.fn.stdpath("data") .. "~/.config/databases/neoclip.sqlite3", + default_register = "+", + }) + end, } From 852c41e2fd4779252d19ef6c9f675f19caf192a5 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Tue, 3 Sep 2024 00:50:08 -0700 Subject: [PATCH 065/114] remove neoclip --- lua/plugins/neoclip.lua | 12 ------------ lua/plugins/telescope.lua | 2 -- 2 files changed, 14 deletions(-) delete mode 100644 lua/plugins/neoclip.lua diff --git a/lua/plugins/neoclip.lua b/lua/plugins/neoclip.lua deleted file mode 100644 index 74144ef..0000000 --- a/lua/plugins/neoclip.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - "AckslD/nvim-neoclip.lua", - dependencies = { "kkharji/sqlite.lua" }, - config = function() - require("neoclip").setup({ - history = 1000, - enable_persistent_history = true, - db_path = vim.fn.stdpath("data") .. "~/.config/databases/neoclip.sqlite3", - default_register = "+", - }) - end, -} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index d8975d1..c460410 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -6,7 +6,6 @@ return { { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, "debugloop/telescope-undo.nvim", "nvim-telescope/telescope-ui-select.nvim", - "AckslD/nvim-neoclip.lua", }, config = function() require("telescope").setup({ @@ -25,7 +24,6 @@ return { pcall(require("telescope").load_extension, "scaladex") pcall(require("telescope").load_extension, "ui-select") pcall(require("telescope").load_extension, "undo") - pcall(require("telescope").load_extension, "neoclip") -- See `:help telescope.builtin` vim.keymap.set("n", "?", require("telescope.builtin").oldfiles, { desc = "[?] Find recently opened files" }) From b2957a1307a1cddc7ce1443321171c08728d0139 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 7 Sep 2024 10:04:14 -0700 Subject: [PATCH 066/114] lsp updates --- lua/plugins/lsp.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 65122c4..8ee6694 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -63,6 +63,7 @@ return { globPattern = "*@(.sh|.inc|.bash|.command)", }, }, + fish_lsp = {}, lua_ls = { Lua = { diagnostics = { globals = { "vim" } }, @@ -75,6 +76,7 @@ return { jsonls = {}, marksman = {}, nil_ls = {}, + nixd = {}, basedpyright = { analysis = { autoImportCompletions = true, @@ -97,7 +99,7 @@ return { enable = true, }, }, - tsserver = {}, + ts_ls = {}, yamlls = {}, } From e725608176ed9b34ad4883f66bc0789c8de031d7 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 7 Sep 2024 10:11:07 -0700 Subject: [PATCH 067/114] remove fish lsp --- lua/plugins/lsp.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 8ee6694..dc245fc 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -63,7 +63,6 @@ return { globPattern = "*@(.sh|.inc|.bash|.command)", }, }, - fish_lsp = {}, lua_ls = { Lua = { diagnostics = { globals = { "vim" } }, From 085806840e8c257109c1d9d3efda5c62e2cc2283 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 7 Sep 2024 11:12:10 -0700 Subject: [PATCH 068/114] remove mason --- lua/plugins/lsp.lua | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index dc245fc..d7ff675 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,10 +1,6 @@ return { "neovim/nvim-lspconfig", dependencies = { - -- Automatically install LSPs to stdpath for neovim - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - -- Useful status updates for LSP "j-hui/fidget.nvim", @@ -13,6 +9,8 @@ return { }, config = function() -- LSP settings. + -- Require the lspconfig module + local lspconfig = require("lspconfig") -- This function gets run when an LSP connects to a particular buffer. local on_attach = function(_, bufnr) -- NOTE: Remember that lua is a real programming language, and as such it is possible @@ -101,30 +99,18 @@ return { ts_ls = {}, yamlls = {}, } - - -- -- nvim-cmp supports additional completion capabilities, so broadcast that to servers local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities) - -- Setup mason so it can manage external tooling - require("mason").setup() - - -- Ensure the servers above are installed - local mason_lspconfig = require("mason-lspconfig") - - mason_lspconfig.setup({ - ensure_installed = vim.tbl_keys(servers), - }) - - mason_lspconfig.setup_handlers({ - function(server_name) - require("lspconfig")[server_name].setup({ - capabilities = capabilities, - on_attach = on_attach, - settings = servers[server_name], - }) - end, - }) + -- Iterate over the servers table and configure each one + for server, config in pairs(servers) do + -- Set up the server using the `config` if provided, otherwise just `on_attach` and `capabilities` + lspconfig[server].setup({ + on_attach = on_attach, + capabilities = capabilities, + settings = config, -- Pass the specific server settings here + }) + end end, } From 96dad8d8037b67695b6e513d7be85e3ff0b59e64 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 21 Sep 2024 20:11:13 -0700 Subject: [PATCH 069/114] formatting improvements --- lua/plugins/lsp.lua | 20 +++++++++++++++++++- lua/plugins/treesitter.lua | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index d7ff675..c13682b 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -6,6 +6,9 @@ return { -- Additional lua configuration, makes nvim stuff amazing "folke/neodev.nvim", + + -- schemas for json and yaml files + "b0o/schemastore.nvim", }, config = function() -- LSP settings. @@ -70,7 +73,22 @@ return { }, html = {}, jqls = {}, - jsonls = {}, + jsonls = { + json = { + format = { + enable = true, + }, + schemas = require("schemastore").json.schemas(), + validate = true, + }, + }, + pyright = { + analysis = { + autoSearchPaths = true, + diagnosticMode = "workspace", + useLibraryCodeForTypes = true, + }, + }, marksman = {}, nil_ls = {}, nixd = {}, diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index b2d666d..cfc5538 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -58,7 +58,7 @@ return { auto_install = true, highlight = { enable = true }, - indent = { enable = false }, + indent = { enable = true }, incremental_selection = { enable = true, keymaps = { From 1949d31e980fbd3418f1aaab7f092b619e3f82fc Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 21 Sep 2024 20:18:55 -0700 Subject: [PATCH 070/114] set tab size for json files --- init.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/init.lua b/init.lua index e7fea8c..30f58ef 100644 --- a/init.lua +++ b/init.lua @@ -88,6 +88,16 @@ else pattern = "*", }) + -- sets the tab size for json files + vim.api.nvim_create_autocmd("FileType", { + pattern = "json", + callback = function() + vim.bo.tabstop = 2 + vim.bo.shiftwidth = 2 + vim.bo.expandtab = true + end, + }) + -- Terminal Escape Key Mapping vim.keymap.set("t", "", [[]]) From 2630d96e0b932baaef3430407ac9a37879670ddf Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Mon, 23 Sep 2024 18:15:26 -0700 Subject: [PATCH 071/114] improvements to yank --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 30f58ef..759eec5 100644 --- a/init.lua +++ b/init.lua @@ -82,7 +82,7 @@ else local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }) vim.api.nvim_create_autocmd("TextYankPost", { callback = function() - vim.highlight.on_yank() + vim.highlight.on_yank({ higroup = "IncSearch", timeout = 1000 }) end, group = highlight_group, pattern = "*", From 03bf0a72b1c59822d0cc07b5c05ac1e2e724a0df Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Mon, 23 Sep 2024 18:34:30 -0700 Subject: [PATCH 072/114] yank highlight tweak --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 759eec5..ef49179 100644 --- a/init.lua +++ b/init.lua @@ -79,10 +79,10 @@ else -- [[ Highlight on yank ]] -- See `:help vim.highlight.on_yank()` - local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }) + local highlight_group = vim.api.nvim_create_augroup("highlight_yank", { clear = true }) vim.api.nvim_create_autocmd("TextYankPost", { callback = function() - vim.highlight.on_yank({ higroup = "IncSearch", timeout = 1000 }) + vim.highlight.on_yank({ higroup = "IncSearch", timeout = 200 }) end, group = highlight_group, pattern = "*", From 9452693037960f28f00c4df74691eb418957cf6a Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Mon, 23 Sep 2024 19:09:12 -0700 Subject: [PATCH 073/114] remove yank changes and disable smartindent --- init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index ef49179..479f1b3 100644 --- a/init.lua +++ b/init.lua @@ -48,7 +48,7 @@ else vim.o.breakindent = true -- smart indenting - vim.o.smartindent = true + vim.o.smartindent = false -- Save undo history vim.o.undofile = true @@ -79,10 +79,10 @@ else -- [[ Highlight on yank ]] -- See `:help vim.highlight.on_yank()` - local highlight_group = vim.api.nvim_create_augroup("highlight_yank", { clear = true }) + local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }) vim.api.nvim_create_autocmd("TextYankPost", { callback = function() - vim.highlight.on_yank({ higroup = "IncSearch", timeout = 200 }) + vim.highlight.on_yank() end, group = highlight_group, pattern = "*", From ffc2d4c13daf8e09f4684a5f9d51928052f93ae2 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 6 Oct 2024 22:48:48 -0700 Subject: [PATCH 074/114] replace gen.nvim with avante --- lua/plugins/avante.lua | 76 ++++++++++++++++++++++++++++++++++++++++++ lua/plugins/gen.lua | 48 -------------------------- 2 files changed, 76 insertions(+), 48 deletions(-) create mode 100644 lua/plugins/avante.lua delete mode 100644 lua/plugins/gen.lua diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua new file mode 100644 index 0000000..cbee33a --- /dev/null +++ b/lua/plugins/avante.lua @@ -0,0 +1,76 @@ +return { + "yetone/avante.nvim", + event = "VeryLazy", + lazy = false, + version = false, -- set this if you want to always pull the latest change + opts = { + provider = "openai", + openai = { + api_key_name = "cmd:cat ~/.openai", + }, + provider = "ollama", + vendors = { + ---@type AvanteProvider + ollama = { + ["local"] = true, + endpoint = "127.0.0.1:11434/v1", + model = "codegemma", + parse_curl_args = function(opts, code_opts) + return { + url = opts.endpoint .. "/chat/completions", + headers = { + ["Accept"] = "application/json", + ["Content-Type"] = "application/json", + }, + body = { + model = opts.model, + messages = require("avante.providers").copilot.parse_message(code_opts), -- you can make your own message, but this is very advanced + max_tokens = 2048, + stream = true, + }, + } + end, + parse_response_data = function(data_stream, event_state, opts) + require("avante.providers").openai.parse_response(data_stream, event_state, opts) + end, + }, + }, + }, + }, + -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` + build = "make", + -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows + dependencies = { + "nvim-treesitter/nvim-treesitter", + "stevearc/dressing.nvim", + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", + --- The below dependencies are optional, + "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons + { + -- support for image pasting + "HakonHarnes/img-clip.nvim", + event = "VeryLazy", + opts = { + -- recommended settings + default = { + embed_image_as_base64 = false, + prompt_for_file_name = false, + drag_and_drop = { + insert_mode = true, + }, + -- required for Windows users + use_absolute_path = true, + }, + }, + }, + { + -- Make sure to set this up properly if you have lazy=true + "MeanderingProgrammer/render-markdown.nvim", + opts = { + file_types = { "markdown", "Avante" }, + }, + ft = { "markdown", "Avante" }, + }, + }, +} diff --git a/lua/plugins/gen.lua b/lua/plugins/gen.lua deleted file mode 100644 index 4a01257..0000000 --- a/lua/plugins/gen.lua +++ /dev/null @@ -1,48 +0,0 @@ -return { - "David-Kunz/gen.nvim", - lazy = true, - keys = { - { "ai", ":Gen", mode = { "n", "v" }, desc = "AI tools using Ollama" }, - { "aa", ":Gen Ask", mode = { "n", "v" }, desc = "[A]I [A]sk" }, - { - "am", - function() - require("gen").select_model() - end, - mode = { "n", "v" }, - desc = "Select [A]I [m]odel", - }, - }, - config = function() - require("gen").setup({ - { - model = "codellama", - host = "localhost", - port = "11434", - quit_map = "q", - retry_map = "", - init = function(options) - pcall(io.popen, "ollama serve > /dev/null 2>&1 &") - end, - command = function(options) - local body = { model = options.model, stream = true } - return "curl --silent --no-buffer -X POST http://" - .. options.host - .. ":" - .. options.port - .. "/api/chat -d $body" - end, - display_mode = "split", -- "split" or "float" - show_prompt = true, - show_model = true, - no_auto_close = false, - debug = false, - }, - }) - require("gen").prompts["Fix_Code"] = { - prompt = "Fix the following code. Only ouput the result in format ```$filetype\n...\n```:\n```$filetype\n$text\n```", - replace = true, - extract = "```$filetype\n(.-)```", - } - end, -} From d184855eb2ff506a504efa6a23345f772d86f02b Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 6 Oct 2024 23:00:12 -0700 Subject: [PATCH 075/114] remove ollama --- lua/plugins/avante.lua | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index cbee33a..e83cf4f 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -8,34 +8,6 @@ return { openai = { api_key_name = "cmd:cat ~/.openai", }, - provider = "ollama", - vendors = { - ---@type AvanteProvider - ollama = { - ["local"] = true, - endpoint = "127.0.0.1:11434/v1", - model = "codegemma", - parse_curl_args = function(opts, code_opts) - return { - url = opts.endpoint .. "/chat/completions", - headers = { - ["Accept"] = "application/json", - ["Content-Type"] = "application/json", - }, - body = { - model = opts.model, - messages = require("avante.providers").copilot.parse_message(code_opts), -- you can make your own message, but this is very advanced - max_tokens = 2048, - stream = true, - }, - } - end, - parse_response_data = function(data_stream, event_state, opts) - require("avante.providers").openai.parse_response(data_stream, event_state, opts) - end, - }, - }, - }, }, -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` build = "make", From c1825115587fe42f272bddb5510aa5b02426cfab Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 6 Oct 2024 23:00:23 -0700 Subject: [PATCH 076/114] treesitter and indent updates --- init.lua | 2 +- lua/plugins/treesitter.lua | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 479f1b3..30f58ef 100644 --- a/init.lua +++ b/init.lua @@ -48,7 +48,7 @@ else vim.o.breakindent = true -- smart indenting - vim.o.smartindent = false + vim.o.smartindent = true -- Save undo history vim.o.undofile = true diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index cfc5538..4834476 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -4,7 +4,12 @@ return { -- build = function() -- pcall(require("nvim-treesitter.install").update({ with_sync = true })) -- end, - dependencies = { "nvim-treesitter/nvim-treesitter-textobjects", "nvim-treesitter/playground" }, + dependencies = { + "nvim-treesitter/nvim-treesitter-context", + "nvim-treesitter/nvim-treesitter-refactor", + "nvim-treesitter/nvim-treesitter-textobjects", + "nvim-treesitter/playground", + }, config = function() require("nvim-treesitter.configs").setup({ -- Add languages to be installed here that you want installed for treesitter @@ -58,7 +63,13 @@ return { auto_install = true, highlight = { enable = true }, - indent = { enable = true }, + indent = { + enable = true, + disable = { + "python", + "css", + }, + }, incremental_selection = { enable = true, keymaps = { From 2776da83bb9f4635a41c84b00a96aba7b8979f22 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 6 Oct 2024 23:03:04 -0700 Subject: [PATCH 077/114] update tab size for lua and nix --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 30f58ef..97c23c0 100644 --- a/init.lua +++ b/init.lua @@ -90,7 +90,7 @@ else -- sets the tab size for json files vim.api.nvim_create_autocmd("FileType", { - pattern = "json", + pattern = { "json", "lua", "nix" }, callback = function() vim.bo.tabstop = 2 vim.bo.shiftwidth = 2 From ccfff580a35f2458eb9a1b61dbad4a1707452d67 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 6 Oct 2024 23:31:09 -0700 Subject: [PATCH 078/114] correction --- lua/plugins/avante.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index e83cf4f..83d94ed 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -6,7 +6,7 @@ return { opts = { provider = "openai", openai = { - api_key_name = "cmd:cat ~/.openai", + api_key_name = "cmd:cat /Users/salar/.openai", }, }, -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` From 93702f8d19a26f801a1bbf4402f976a3e2c67103 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 6 Oct 2024 23:35:50 -0700 Subject: [PATCH 079/114] use expand --- lua/plugins/avante.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index 83d94ed..b52fcc4 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -6,7 +6,7 @@ return { opts = { provider = "openai", openai = { - api_key_name = "cmd:cat /Users/salar/.openai", + api_key_name = "cmd:cat" .. vim.fn.expand("~/.openai"), }, }, -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` From 0baf336e89c9b80182e70a14b0795dd31f004037 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 6 Oct 2024 23:41:48 -0700 Subject: [PATCH 080/114] correction --- lua/plugins/avante.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index b52fcc4..a37111f 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -6,7 +6,7 @@ return { opts = { provider = "openai", openai = { - api_key_name = "cmd:cat" .. vim.fn.expand("~/.openai"), + api_key_name = "cmd:cat " .. vim.fn.expand("~/.openai"), }, }, -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` From 38aaf6cffc8bf76c3b55399e743947fe6b436dc2 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 20 Oct 2024 19:35:38 -0700 Subject: [PATCH 081/114] avante plugin related cleanup --- lua/plugins/avante.lua | 37 ++++++--------------------------- lua/plugins/img-clip.lua | 10 +++++++-- lua/plugins/neotest.lua | 2 -- lua/plugins/overseer.lua | 4 ---- lua/plugins/render-markdown.lua | 11 ++++++++++ lua/plugins/treesitter.lua | 1 + 6 files changed, 26 insertions(+), 39 deletions(-) delete mode 100644 lua/plugins/overseer.lua create mode 100644 lua/plugins/render-markdown.lua diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index a37111f..68ab504 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -2,7 +2,7 @@ return { "yetone/avante.nvim", event = "VeryLazy", lazy = false, - version = false, -- set this if you want to always pull the latest change + version = true, opts = { provider = "openai", openai = { @@ -11,38 +11,13 @@ return { }, -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` build = "make", - -- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows dependencies = { + "HakonHarnes/img-clip.nvim", + "MeanderingProgrammer/render-markdown.nvim", + "MunifTanjim/nui.nvim", + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", "nvim-treesitter/nvim-treesitter", "stevearc/dressing.nvim", - "nvim-lua/plenary.nvim", - "MunifTanjim/nui.nvim", - --- The below dependencies are optional, - "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons - { - -- support for image pasting - "HakonHarnes/img-clip.nvim", - event = "VeryLazy", - opts = { - -- recommended settings - default = { - embed_image_as_base64 = false, - prompt_for_file_name = false, - drag_and_drop = { - insert_mode = true, - }, - -- required for Windows users - use_absolute_path = true, - }, - }, - }, - { - -- Make sure to set this up properly if you have lazy=true - "MeanderingProgrammer/render-markdown.nvim", - opts = { - file_types = { "markdown", "Avante" }, - }, - ft = { "markdown", "Avante" }, - }, }, } diff --git a/lua/plugins/img-clip.lua b/lua/plugins/img-clip.lua index 66d49cb..2ffeac0 100644 --- a/lua/plugins/img-clip.lua +++ b/lua/plugins/img-clip.lua @@ -2,8 +2,14 @@ return { "HakonHarnes/img-clip.nvim", event = "BufEnter", opts = { - -- add options here - -- or leave it empty to use the default settings + default = { + embed_image_as_base64 = false, + prompt_for_file_name = false, + drag_and_drop = { + insert_mode = true, + }, + use_absolute_path = true, + }, }, keys = { -- suggested keymap diff --git a/lua/plugins/neotest.lua b/lua/plugins/neotest.lua index 0150363..7a049f3 100644 --- a/lua/plugins/neotest.lua +++ b/lua/plugins/neotest.lua @@ -5,7 +5,6 @@ return { "nvim-lua/plenary.nvim", "antoinemadec/FixCursorHold.nvim", "nvim-treesitter/nvim-treesitter", - "rcasia/neotest-java", "nvim-neotest/neotest-python", "stevanmilic/neotest-scala", }, @@ -24,7 +23,6 @@ return { }, opts = { adapters = { - ["neotest-java"] = {}, ["neotest-python"] = { runner = "pytest", args = { "-vvv" }, diff --git a/lua/plugins/overseer.lua b/lua/plugins/overseer.lua deleted file mode 100644 index 559779d..0000000 --- a/lua/plugins/overseer.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "stevearc/overseer.nvim", - opts = {}, -} diff --git a/lua/plugins/render-markdown.lua b/lua/plugins/render-markdown.lua new file mode 100644 index 0000000..4ceee58 --- /dev/null +++ b/lua/plugins/render-markdown.lua @@ -0,0 +1,11 @@ +return { + "MeanderingProgrammer/render-markdown.nvim", + dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, + ---@module 'render-markdown' + ---@type render.md.UserConfig + opts = { + file_types = { "markdown", "Avante" }, + render_modes = true, + }, + ft = { "markdown", "Avante" }, +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 4834476..843cbcf 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -38,6 +38,7 @@ return { "latex", "lua", "make", + "markdown", "markdown_inline", "nix", "proto", From 2a385cac5852cc8b090f29b2f3ef68be7935c3ea Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 20 Oct 2024 20:33:58 -0700 Subject: [PATCH 082/114] avante update --- lua/plugins/avante.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index 68ab504..e06c9a9 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -2,7 +2,7 @@ return { "yetone/avante.nvim", event = "VeryLazy", lazy = false, - version = true, + version = false, opts = { provider = "openai", openai = { From 2b0701c8a09c0c720faa89598725e8f7120ed676 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Mon, 21 Oct 2024 17:11:09 -0700 Subject: [PATCH 083/114] remove pyright --- lua/plugins/lsp.lua | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index c13682b..edb8d4e 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -82,13 +82,6 @@ return { validate = true, }, }, - pyright = { - analysis = { - autoSearchPaths = true, - diagnosticMode = "workspace", - useLibraryCodeForTypes = true, - }, - }, marksman = {}, nil_ls = {}, nixd = {}, From 68910abbe066964a49c76a8d34b1280704f95041 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Wed, 30 Oct 2024 23:56:08 -0700 Subject: [PATCH 084/114] add smart splits --- lua/plugins/smart-splits.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 lua/plugins/smart-splits.lua diff --git a/lua/plugins/smart-splits.lua b/lua/plugins/smart-splits.lua new file mode 100644 index 0000000..e552197 --- /dev/null +++ b/lua/plugins/smart-splits.lua @@ -0,0 +1,27 @@ +return { + { "mrjones2014/smart-splits.nvim" }, + lazy = false, + config = function() + local smart_splits = require("smart-splits") + local keymap = vim.keymap + -- recommended mappings + -- resizing splits + -- these keymaps will also accept a range, + -- for example `10` will `resize_left` by `(10 * config.default_amount)` + keymap.set("n", "", smart_splits.resize_left) + keymap.set("n", "", smart_splits.resize_down) + keymap.set("n", "", smart_splits.resize_up) + keymap.set("n", "", smart_splits.resize_right) + -- moving between splits + keymap.set("n", "", smart_splits.move_cursor_left) + keymap.set("n", "", smart_splits.move_cursor_down) + keymap.set("n", "", smart_splits.move_cursor_up) + keymap.set("n", "", smart_splits.move_cursor_right) + keymap.set("n", "", smart_splits.move_cursor_previous) + -- swapping buffers between windows + keymap.set("n", "h", smart_splits.swap_buf_left) + keymap.set("n", "j", smart_splits.swap_buf_down) + keymap.set("n", "k", smart_splits.swap_buf_up) + keymap.set("n", "l", smart_splits.swap_buf_right) + end, +} From c6c097057c0f7a47706d4965aca6b5ea4cc5f3f9 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 1 Nov 2024 17:48:29 -0700 Subject: [PATCH 085/114] change smart split keys --- lua/plugins/smart-splits.lua | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/lua/plugins/smart-splits.lua b/lua/plugins/smart-splits.lua index e552197..cf4a09a 100644 --- a/lua/plugins/smart-splits.lua +++ b/lua/plugins/smart-splits.lua @@ -1,27 +1,22 @@ return { { "mrjones2014/smart-splits.nvim" }, lazy = false, - config = function() - local smart_splits = require("smart-splits") - local keymap = vim.keymap - -- recommended mappings + keys = { -- resizing splits - -- these keymaps will also accept a range, - -- for example `10` will `resize_left` by `(10 * config.default_amount)` - keymap.set("n", "", smart_splits.resize_left) - keymap.set("n", "", smart_splits.resize_down) - keymap.set("n", "", smart_splits.resize_up) - keymap.set("n", "", smart_splits.resize_right) + { "n", "", ":lua require('smart-splits').resize_left()" }, + { "n", "", ":lua require('smart-splits').resize_down()" }, + { "n", "", ":lua require('smart-splits').resize_up()" }, + { "n", "", ":lua require('smart-splits').resize_right()" }, -- moving between splits - keymap.set("n", "", smart_splits.move_cursor_left) - keymap.set("n", "", smart_splits.move_cursor_down) - keymap.set("n", "", smart_splits.move_cursor_up) - keymap.set("n", "", smart_splits.move_cursor_right) - keymap.set("n", "", smart_splits.move_cursor_previous) + { "n", "", ":lua require('smart-splits').move_cursor_left()" }, + { "n", "", ":lua require('smart-splits').move_cursor_down()" }, + { "n", "", ":lua require('smart-splits').move_cursor_up()" }, + { "n", "", ":lua require('smart-splits').move_cursor_right()" }, + { "n", "", ":lua require('smart-splits').move_cursor_previous()" }, -- swapping buffers between windows - keymap.set("n", "h", smart_splits.swap_buf_left) - keymap.set("n", "j", smart_splits.swap_buf_down) - keymap.set("n", "k", smart_splits.swap_buf_up) - keymap.set("n", "l", smart_splits.swap_buf_right) - end, + { "n", "a", ":lua require('smart-splits').swap_buf_left()" }, + { "n", "o", ":lua require('smart-splits').swap_buf_down()" }, + { "n", "e", ":lua require('smart-splits').swap_buf_up()" }, + { "n", "u", ":lua require('smart-splits').swap_buf_right()" }, + }, } From 9bae641b35498ef3c356fc244dfdeeb1d2c25a6e Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 1 Nov 2024 17:56:44 -0700 Subject: [PATCH 086/114] correct syntax --- lua/plugins/smart-splits.lua | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/lua/plugins/smart-splits.lua b/lua/plugins/smart-splits.lua index cf4a09a..7a872c4 100644 --- a/lua/plugins/smart-splits.lua +++ b/lua/plugins/smart-splits.lua @@ -3,20 +3,24 @@ return { lazy = false, keys = { -- resizing splits - { "n", "", ":lua require('smart-splits').resize_left()" }, - { "n", "", ":lua require('smart-splits').resize_down()" }, - { "n", "", ":lua require('smart-splits').resize_up()" }, - { "n", "", ":lua require('smart-splits').resize_right()" }, + { "", ":lua require('smart-splits').resize_left()", desc = "smart split: resize left" }, + { "", ":lua require('smart-splits').resize_down()", desc = "smart split: resize down" }, + { "", ":lua require('smart-splits').resize_up()", desc = "smart split: resize up" }, + { "", ":lua require('smart-splits').resize_right()", desc = "smart split: resize right" }, -- moving between splits - { "n", "", ":lua require('smart-splits').move_cursor_left()" }, - { "n", "", ":lua require('smart-splits').move_cursor_down()" }, - { "n", "", ":lua require('smart-splits').move_cursor_up()" }, - { "n", "", ":lua require('smart-splits').move_cursor_right()" }, - { "n", "", ":lua require('smart-splits').move_cursor_previous()" }, + { "", ":lua require('smart-splits').move_cursor_left()", desc = "smart split: move cursor left" }, + { "", ":lua require('smart-splits').move_cursor_down()", desc = "smart split: move cursor up" }, + { "", ":lua require('smart-splits').move_cursor_up()", desc = "smart split: move cursor up" }, + { "", ":lua require('smart-splits').move_cursor_right()", desc = "smart split: move cursor right" }, + { + "", + ":lua require('smart-splits').move_cursor_previous()", + desc = "smart split: move cursor to previous", + }, -- swapping buffers between windows - { "n", "a", ":lua require('smart-splits').swap_buf_left()" }, - { "n", "o", ":lua require('smart-splits').swap_buf_down()" }, - { "n", "e", ":lua require('smart-splits').swap_buf_up()" }, - { "n", "u", ":lua require('smart-splits').swap_buf_right()" }, + { "a", ":lua require('smart-splits').swap_buf_left()", desc = "smart split: swap left" }, + { "o", ":lua require('smart-splits').swap_buf_down()", desc = "smart split: swap down" }, + { "e", ":lua require('smart-splits').swap_buf_up()", desc = "smart split: swap up" }, + { "u", ":lua require('smart-splits').swap_buf_right()", desc = "smart split: swap right" }, }, } From 70e5afac39c32d2ec725a4737bf702c54b72b73f Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 1 Nov 2024 18:06:13 -0700 Subject: [PATCH 087/114] smart splits correction --- lua/plugins/smart-splits.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/smart-splits.lua b/lua/plugins/smart-splits.lua index 7a872c4..7a48e84 100644 --- a/lua/plugins/smart-splits.lua +++ b/lua/plugins/smart-splits.lua @@ -1,5 +1,5 @@ return { - { "mrjones2014/smart-splits.nvim" }, + "mrjones2014/smart-splits.nvim", lazy = false, keys = { -- resizing splits From 4f39c23dd78646511727f81c05665fd264df051a Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 9 Nov 2024 10:43:20 -0800 Subject: [PATCH 088/114] add swift and cleanup lsp --- lua/plugins/lsp.lua | 65 ++++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index edb8d4e..46f9eee 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -16,11 +16,7 @@ return { local lspconfig = require("lspconfig") -- This function gets run when an LSP connects to a particular buffer. local on_attach = function(_, bufnr) - -- NOTE: Remember that lua is a real programming language, and as such it is possible - -- to define small helper and utility functions so you don't have to repeat yourself - -- many times. - -- - -- In this case, we create a function that lets us more easily define mappings specific + -- We create a function that lets us more easily define mappings specific -- for LSP related items. It sets the mode, buffer and description for us each time. local nmap = function(keys, func, desc) if desc then @@ -59,32 +55,6 @@ return { end local servers = { - bashls = { - bashIde = { - globPattern = "*@(.sh|.inc|.bash|.command)", - }, - }, - lua_ls = { - Lua = { - diagnostics = { globals = { "vim" } }, - workspace = { checkThirdParty = false }, - telemetry = { enable = false }, - }, - }, - html = {}, - jqls = {}, - jsonls = { - json = { - format = { - enable = true, - }, - schemas = require("schemastore").json.schemas(), - validate = true, - }, - }, - marksman = {}, - nil_ls = {}, - nixd = {}, basedpyright = { analysis = { autoImportCompletions = true, @@ -102,11 +72,44 @@ return { useLibraryCodeForTypes = true, }, }, + bashls = { + bashIde = { + globPattern = "*@(.sh|.inc|.bash|.command)", + }, + }, + html = {}, + jqls = {}, + jsonls = { + json = { + format = { + enable = true, + }, + schemas = require("schemastore").json.schemas(), + validate = true, + }, + }, + lua_ls = { + Lua = { + diagnostics = { globals = { "vim" } }, + workspace = { checkThirdParty = false }, + telemetry = { enable = false }, + }, + }, + marksman = {}, + nil_ls = {}, + nixd = {}, rust_analyzer = { diagnostics = { enable = true, }, }, + sourcekit = { + workspace = { + didChangeConfiguration = { + dynamicRegistration = true, + }, + }, + }, ts_ls = {}, yamlls = {}, } From fb5fe56073b9b9c0064a2038a9aa8c0c622970ac Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 15 Nov 2024 22:45:58 -0800 Subject: [PATCH 089/114] add new plugins to support jujitsu --- lua/plugins/neo-tree-jj.lua | 32 ++++++++++++++++++++++++++++++++ lua/plugins/telescope.lua | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 lua/plugins/neo-tree-jj.lua diff --git a/lua/plugins/neo-tree-jj.lua b/lua/plugins/neo-tree-jj.lua new file mode 100644 index 0000000..db36945 --- /dev/null +++ b/lua/plugins/neo-tree-jj.lua @@ -0,0 +1,32 @@ +return { + "Cretezy/neo-tree-jj.nvim", + dependencies = { + { + "nvim-neo-tree/neo-tree.nvim", + opts = function(_, opts) + -- Register the source + table.insert(opts.sources, "jj") + + -- Optional: Replace git tab in neo-tree when in jj repo + if require("neo-tree.sources.jj.utils").get_repository_root() then + -- Remove git tab + for i, source in ipairs(opts.source_selector.sources) do + if source.source == "git_status" then + table.remove(opts.source_selector.sources, i) + break + end + end + + -- Add jj tab + table.insert(opts.source_selector.sources, { + display_name = "󰊢 JJ", + source = "jj", + }) + end + end, + }, + }, + keys = { + { "mj", "Neotree jj", desc = "NeoTree JJ" }, + }, +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index c460410..239c587 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -6,6 +6,7 @@ return { { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, "debugloop/telescope-undo.nvim", "nvim-telescope/telescope-ui-select.nvim", + "zschreur/telescope-jj.nvim", }, config = function() require("telescope").setup({ @@ -21,6 +22,7 @@ return { -- Enable telescope fzf native, if installed pcall(require("telescope").load_extension, "fzf") + pcall(require("telescope").load_extension, "jj") pcall(require("telescope").load_extension, "scaladex") pcall(require("telescope").load_extension, "ui-select") pcall(require("telescope").load_extension, "undo") From 0e32e25ef48fcdcba2e25f4f6c835eb2c64e3322 Mon Sep 17 00:00:00 2001 From: softinio Date: Fri, 15 Nov 2024 23:40:05 -0800 Subject: [PATCH 090/114] revert 63c054848fdfeeb898b2a3702026e5a5a1ce4779 revert Merge pull request 'add new plugins to support jujitsu' (#33) from push-utyvykwmwlyl into main Reviewed-on: https://code.softinio.com/softinio/nvim-config/pulls/33 --- lua/plugins/neo-tree-jj.lua | 32 -------------------------------- lua/plugins/telescope.lua | 2 -- 2 files changed, 34 deletions(-) delete mode 100644 lua/plugins/neo-tree-jj.lua diff --git a/lua/plugins/neo-tree-jj.lua b/lua/plugins/neo-tree-jj.lua deleted file mode 100644 index db36945..0000000 --- a/lua/plugins/neo-tree-jj.lua +++ /dev/null @@ -1,32 +0,0 @@ -return { - "Cretezy/neo-tree-jj.nvim", - dependencies = { - { - "nvim-neo-tree/neo-tree.nvim", - opts = function(_, opts) - -- Register the source - table.insert(opts.sources, "jj") - - -- Optional: Replace git tab in neo-tree when in jj repo - if require("neo-tree.sources.jj.utils").get_repository_root() then - -- Remove git tab - for i, source in ipairs(opts.source_selector.sources) do - if source.source == "git_status" then - table.remove(opts.source_selector.sources, i) - break - end - end - - -- Add jj tab - table.insert(opts.source_selector.sources, { - display_name = "󰊢 JJ", - source = "jj", - }) - end - end, - }, - }, - keys = { - { "mj", "Neotree jj", desc = "NeoTree JJ" }, - }, -} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 239c587..c460410 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -6,7 +6,6 @@ return { { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, "debugloop/telescope-undo.nvim", "nvim-telescope/telescope-ui-select.nvim", - "zschreur/telescope-jj.nvim", }, config = function() require("telescope").setup({ @@ -22,7 +21,6 @@ return { -- Enable telescope fzf native, if installed pcall(require("telescope").load_extension, "fzf") - pcall(require("telescope").load_extension, "jj") pcall(require("telescope").load_extension, "scaladex") pcall(require("telescope").load_extension, "ui-select") pcall(require("telescope").load_extension, "undo") From 04861de924b90c3e82ff002427a6fc0c796a8426 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 17 Nov 2024 14:06:19 -0800 Subject: [PATCH 091/114] update latex config to zathura --- lua/plugins/texlabconfig.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lua/plugins/texlabconfig.lua b/lua/plugins/texlabconfig.lua index 0d745fa..f23f1c1 100644 --- a/lua/plugins/texlabconfig.lua +++ b/lua/plugins/texlabconfig.lua @@ -4,12 +4,18 @@ return { dependencies = { "lervag/vimtex" }, config = function() -- vimtex - vim.g.vimtex_view_method = "skim" + vim.g.vimtex_view_method = "zathura" vim.g.vimtex_compiler_method = "tectonic" -- nvim-texlabconfig - local tex_preview_executable = "/Applications/Skim.app/Contents/SharedSupport/displayline" - local tex_preview_args = { "%l", "%p", "%f" } + local tex_preview_executable = "zathura" + local tex_preview_args = { + "--synctex-editor-command", + [[nvim-texlabconfig -file '%%%{input}' -line %%%{line} -server ]] .. vim.v.servername, + "--synctex-forward", + "%l:1:%f", + "%p", + } local texlab_build_executable = "tectonic" local texlab_build_args = { "-X", From 5649da4647543b1bc976bc079a6a19339d883c2b Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 17 Nov 2024 14:50:40 -0800 Subject: [PATCH 092/114] switch latex to use sioyek --- lua/plugins/texlabconfig.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lua/plugins/texlabconfig.lua b/lua/plugins/texlabconfig.lua index f23f1c1..d710c2b 100644 --- a/lua/plugins/texlabconfig.lua +++ b/lua/plugins/texlabconfig.lua @@ -4,16 +4,21 @@ return { dependencies = { "lervag/vimtex" }, config = function() -- vimtex - vim.g.vimtex_view_method = "zathura" + vim.g.vimtex_view_method = "sioyek" vim.g.vimtex_compiler_method = "tectonic" -- nvim-texlabconfig local tex_preview_executable = "zathura" local tex_preview_args = { - "--synctex-editor-command", - [[nvim-texlabconfig -file '%%%{input}' -line %%%{line} -server ]] .. vim.v.servername, - "--synctex-forward", - "%l:1:%f", + "--reuse-window", + "--execute-command", + "toggle_synctex", -- Open Sioyek in synctex mode. + "--inverse-search", + [[nvim-texlabconfig -file %%%1 -line %%%2 -server ]] .. vim.v.servername, + "--forward-search-file", + "%f", + "--forward-search-line", + "%l", "%p", } local texlab_build_executable = "tectonic" From bfde2a57854d8fb3fed9489ea4c76913cbdcb75c Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 17 Nov 2024 16:19:42 -0800 Subject: [PATCH 093/114] add path for nvim texlab --- lua/plugins/texlabconfig.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/plugins/texlabconfig.lua b/lua/plugins/texlabconfig.lua index d710c2b..3166e02 100644 --- a/lua/plugins/texlabconfig.lua +++ b/lua/plugins/texlabconfig.lua @@ -14,7 +14,8 @@ return { "--execute-command", "toggle_synctex", -- Open Sioyek in synctex mode. "--inverse-search", - [[nvim-texlabconfig -file %%%1 -line %%%2 -server ]] .. vim.v.servername, + [[/Users/salar/.local/share/nvim/lazy/nvim-texl/nvim-texlabconfig -file %%%1 -line %%%2 -server ]] + .. vim.v.servername, "--forward-search-file", "%f", "--forward-search-line", From e8b0fe4b5199a86438afebbc5747357e2cbd4dc8 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 17 Nov 2024 16:25:28 -0800 Subject: [PATCH 094/114] move back to skim for latex preview --- lua/plugins/texlabconfig.lua | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/lua/plugins/texlabconfig.lua b/lua/plugins/texlabconfig.lua index 3166e02..6b7611d 100644 --- a/lua/plugins/texlabconfig.lua +++ b/lua/plugins/texlabconfig.lua @@ -4,24 +4,12 @@ return { dependencies = { "lervag/vimtex" }, config = function() -- vimtex - vim.g.vimtex_view_method = "sioyek" + vim.g.vimtex_view_method = "skim" vim.g.vimtex_compiler_method = "tectonic" -- nvim-texlabconfig - local tex_preview_executable = "zathura" - local tex_preview_args = { - "--reuse-window", - "--execute-command", - "toggle_synctex", -- Open Sioyek in synctex mode. - "--inverse-search", - [[/Users/salar/.local/share/nvim/lazy/nvim-texl/nvim-texlabconfig -file %%%1 -line %%%2 -server ]] - .. vim.v.servername, - "--forward-search-file", - "%f", - "--forward-search-line", - "%l", - "%p", - } + local tex_preview_executable = "skim" + local tex_preview_args = { "%l", "%p", "%f" } local texlab_build_executable = "tectonic" local texlab_build_args = { "-X", From 1ea7d94bfc0021569b85472c84b90469d4c92da3 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 26 Jan 2025 16:09:42 -0800 Subject: [PATCH 095/114] tokyo night updates for a darker background --- lua/plugins/init.lua | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 02ce023..db768cc 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,21 +1,29 @@ return { { "folke/neoconf.nvim", cmd = "Neoconf" }, - { - "folke/neodev.nvim", - config = function() - require("neodev").setup() - end, - }, { "folke/tokyonight.nvim", lazy = false, -- make sure we load this during startup if it is your main colorscheme priority = 1000, -- make sure to load this before all the other start plugins + opts = { + style = "night", + transparent = true, + terminal_colors = true, + on_colors = function(colors) + colors.bg = "#000000" + end, + config = function() + vim.g.tokyonight_style = "night" + vim.g.tokyonight_italic_functions = true + vim.o.termguicolors = true + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight-night]]) + end, + }, + }, + { + "folke/neodev.nvim", config = function() - vim.g.tokyonight_style = "night" - vim.g.tokyonight_italic_functions = true - vim.o.termguicolors = true - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight]]) + require("neodev").setup() end, }, { From d226c17b0609075861f7c11afc0e668406974b49 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 26 Jan 2025 16:22:39 -0800 Subject: [PATCH 096/114] Tokyo night option corrections --- lua/plugins/init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index db768cc..4a59794 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -11,7 +11,10 @@ return { on_colors = function(colors) colors.bg = "#000000" end, - config = function() + config = function(_, opts) + local tokyonight = require("tokyonight") + tokyonight.setup(opts) + tokyonight.load() vim.g.tokyonight_style = "night" vim.g.tokyonight_italic_functions = true vim.o.termguicolors = true From ce43f554fc56b5ef63e7dabde740307f4a778af0 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 26 Jan 2025 16:40:12 -0800 Subject: [PATCH 097/114] tokyo night refactor --- lua/plugins/init.lua | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 4a59794..fee8d09 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,34 +1,27 @@ return { { "folke/neoconf.nvim", cmd = "Neoconf" }, - { - "folke/tokyonight.nvim", - lazy = false, -- make sure we load this during startup if it is your main colorscheme - priority = 1000, -- make sure to load this before all the other start plugins - opts = { - style = "night", - transparent = true, - terminal_colors = true, - on_colors = function(colors) - colors.bg = "#000000" - end, - config = function(_, opts) - local tokyonight = require("tokyonight") - tokyonight.setup(opts) - tokyonight.load() - vim.g.tokyonight_style = "night" - vim.g.tokyonight_italic_functions = true - vim.o.termguicolors = true - -- load the colorscheme here - vim.cmd([[colorscheme tokyonight-night]]) - end, - }, - }, { "folke/neodev.nvim", config = function() require("neodev").setup() end, }, + { + "folke/tokyonight.nvim", + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + require("tokyonight").setup({ + style = "night", + on_colors = function(colors) + colors.bg = "#000000" -- "#1a1b26" + end, + }) + vim.o.termguicolors = true + -- load the colorscheme here + vim.cmd([[colorscheme tokyonight-night]]) + end, + }, { "folke/trouble.nvim", config = function() From 5b931a90a58bebcedf713f78925cc416e6d07683 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 1 Feb 2025 11:35:21 -0800 Subject: [PATCH 098/114] Add snacks and nvim-aider plugins --- lua/plugins/nvim-aider.lua | 17 +++++++++++++++++ lua/plugins/snacks.lua | 7 +++++++ 2 files changed, 24 insertions(+) create mode 100644 lua/plugins/nvim-aider.lua create mode 100644 lua/plugins/snacks.lua diff --git a/lua/plugins/nvim-aider.lua b/lua/plugins/nvim-aider.lua new file mode 100644 index 0000000..8913bff --- /dev/null +++ b/lua/plugins/nvim-aider.lua @@ -0,0 +1,17 @@ +return { + "GeorgesAlkhouri/nvim-aider", + cmd = { + "AiderTerminalToggle", + "AiderHealth", + }, + keys = { + { "a/", "AiderTerminalToggle", desc = "Open Aider" }, + { "as", "AiderTerminalSend", desc = "Send to Aider", mode = { "n", "v" } }, + { "ac", "AiderQuickSendCommand", desc = "Send Command To Aider" }, + { "ab", "AiderQuickSendBuffer", desc = "Send Buffer To Aider" }, + { "a+", "AiderQuickAddFile", desc = "Add File to Aider" }, + { "a-", "AiderQuickDropFile", desc = "Drop File from Aider" }, + { "ar", "AiderQuickReadOnlyFile", desc = "Add File as Read-Only" }, + }, + config = true, +} diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua new file mode 100644 index 0000000..c003c2b --- /dev/null +++ b/lua/plugins/snacks.lua @@ -0,0 +1,7 @@ +return { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + ---@type snacks.Config + opts = {}, +} From fa1a1f4803f96d18b6df10b4380537207bfb65d9 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 23 Feb 2025 21:38:34 -0800 Subject: [PATCH 099/114] remove smart-splits --- lua/plugins/smart-splits.lua | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 lua/plugins/smart-splits.lua diff --git a/lua/plugins/smart-splits.lua b/lua/plugins/smart-splits.lua deleted file mode 100644 index 7a48e84..0000000 --- a/lua/plugins/smart-splits.lua +++ /dev/null @@ -1,26 +0,0 @@ -return { - "mrjones2014/smart-splits.nvim", - lazy = false, - keys = { - -- resizing splits - { "", ":lua require('smart-splits').resize_left()", desc = "smart split: resize left" }, - { "", ":lua require('smart-splits').resize_down()", desc = "smart split: resize down" }, - { "", ":lua require('smart-splits').resize_up()", desc = "smart split: resize up" }, - { "", ":lua require('smart-splits').resize_right()", desc = "smart split: resize right" }, - -- moving between splits - { "", ":lua require('smart-splits').move_cursor_left()", desc = "smart split: move cursor left" }, - { "", ":lua require('smart-splits').move_cursor_down()", desc = "smart split: move cursor up" }, - { "", ":lua require('smart-splits').move_cursor_up()", desc = "smart split: move cursor up" }, - { "", ":lua require('smart-splits').move_cursor_right()", desc = "smart split: move cursor right" }, - { - "", - ":lua require('smart-splits').move_cursor_previous()", - desc = "smart split: move cursor to previous", - }, - -- swapping buffers between windows - { "a", ":lua require('smart-splits').swap_buf_left()", desc = "smart split: swap left" }, - { "o", ":lua require('smart-splits').swap_buf_down()", desc = "smart split: swap down" }, - { "e", ":lua require('smart-splits').swap_buf_up()", desc = "smart split: swap up" }, - { "u", ":lua require('smart-splits').swap_buf_right()", desc = "smart split: swap right" }, - }, -} From f962e982b648af6090a3f491996efcfd2cc37ee1 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 28 Feb 2025 13:48:33 -0800 Subject: [PATCH 100/114] try new highlight yank setting --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 97c23c0..78719bb 100644 --- a/init.lua +++ b/init.lua @@ -82,7 +82,7 @@ else local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }) vim.api.nvim_create_autocmd("TextYankPost", { callback = function() - vim.highlight.on_yank() + vim.highlight.on_yank({ higroup = "Search" }) end, group = highlight_group, pattern = "*", From 82f5352d1adc763d68fa882bf54b5e1cb1a6e2dc Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 28 Feb 2025 14:09:10 -0800 Subject: [PATCH 101/114] try new highlight yank setting - part2 --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 78719bb..8a3e8a9 100644 --- a/init.lua +++ b/init.lua @@ -79,10 +79,11 @@ else -- [[ Highlight on yank ]] -- See `:help vim.highlight.on_yank()` + vim.api.nvim_set_hl(0, "YankHighlight", { guibg = "#d19a66" }) local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }) vim.api.nvim_create_autocmd("TextYankPost", { callback = function() - vim.highlight.on_yank({ higroup = "Search" }) + vim.highlight.on_yank({ higroup = "YankHighlight", timeout = 1000 }) end, group = highlight_group, pattern = "*", From 942200da6a1ee6910e34e44ad086d8b33ffecdeb Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 28 Feb 2025 15:14:08 -0800 Subject: [PATCH 102/114] Correction --- init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 8a3e8a9..c38297b 100644 --- a/init.lua +++ b/init.lua @@ -79,11 +79,10 @@ else -- [[ Highlight on yank ]] -- See `:help vim.highlight.on_yank()` - vim.api.nvim_set_hl(0, "YankHighlight", { guibg = "#d19a66" }) local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }) vim.api.nvim_create_autocmd("TextYankPost", { callback = function() - vim.highlight.on_yank({ higroup = "YankHighlight", timeout = 1000 }) + vim.highlight.on_yank({ higroup = "IncSearch", timeout = 1000 }) end, group = highlight_group, pattern = "*", From c5f6c482495281614010c0bf6f883011e3f5fe28 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 1 Mar 2025 05:58:04 -0800 Subject: [PATCH 103/114] updates to avante and vscode yank settings --- init.lua | 2 +- lua/plugins/avante.lua | 16 +++++++++++++++- lua/user/vscode_keymaps.lua | 9 +++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index c38297b..97c23c0 100644 --- a/init.lua +++ b/init.lua @@ -82,7 +82,7 @@ else local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }) vim.api.nvim_create_autocmd("TextYankPost", { callback = function() - vim.highlight.on_yank({ higroup = "IncSearch", timeout = 1000 }) + vim.highlight.on_yank() end, group = highlight_group, pattern = "*", diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index e06c9a9..03b02d8 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -4,10 +4,24 @@ return { lazy = false, version = false, opts = { - provider = "openai", + provider = "claude", + claude = { + model = "claude-3-7-sonnet-latest", + api_key_name = "cmd:cat " .. vim.fn.expand("~/.anthropic"), + }, openai = { + model = "o3-mini", + reasoning_effort = "high", api_key_name = "cmd:cat " .. vim.fn.expand("~/.openai"), }, + vendors = { + ollama = { + __inherited_from = "openai", + api_key_name = "", + endpoint = "http://127.0.0.1:11434/v1", + model = "qwen2.5-coder", + }, + }, }, -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` build = "make", diff --git a/lua/user/vscode_keymaps.lua b/lua/user/vscode_keymaps.lua index c58727b..3b11e1f 100644 --- a/lua/user/vscode_keymaps.lua +++ b/lua/user/vscode_keymaps.lua @@ -6,6 +6,15 @@ keymap("n", "", "", opts) vim.g.mapleader = " " vim.g.maplocalleader = " " +-- highligh yank +vim.api.nvim_set_hl(0, "YankHighlight", { guibg = "#d19a66" }) +vim.api.nvim_create_autocmd("TextYankPost", { + callback = function() + vim.highlight.on_yank({ higroup = "YankHighlight", timeout = 1000 }) + end, + pattern = "*", +}) + -- yank to system clipboard keymap({ "n", "v" }, "y", '"+y', opts) From ddb8d1eb6e5875bd6671449465d8a06cf5e794ab Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 1 Mar 2025 06:05:35 -0800 Subject: [PATCH 104/114] correction to vscode yank bg --- lua/user/vscode_keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/user/vscode_keymaps.lua b/lua/user/vscode_keymaps.lua index 3b11e1f..d703c65 100644 --- a/lua/user/vscode_keymaps.lua +++ b/lua/user/vscode_keymaps.lua @@ -7,7 +7,7 @@ vim.g.mapleader = " " vim.g.maplocalleader = " " -- highligh yank -vim.api.nvim_set_hl(0, "YankHighlight", { guibg = "#d19a66" }) +vim.api.nvim_set_hl(0, "YankHighlight", { bg = "#d19a66" }) vim.api.nvim_create_autocmd("TextYankPost", { callback = function() vim.highlight.on_yank({ higroup = "YankHighlight", timeout = 1000 }) From 50e56d40254e170c776e3740f50a3fd3d58a2f84 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 1 Mar 2025 06:08:49 -0800 Subject: [PATCH 105/114] highlight delay updated for vscode yank --- lua/user/vscode_keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/user/vscode_keymaps.lua b/lua/user/vscode_keymaps.lua index d703c65..d239c88 100644 --- a/lua/user/vscode_keymaps.lua +++ b/lua/user/vscode_keymaps.lua @@ -10,7 +10,7 @@ vim.g.maplocalleader = " " vim.api.nvim_set_hl(0, "YankHighlight", { bg = "#d19a66" }) vim.api.nvim_create_autocmd("TextYankPost", { callback = function() - vim.highlight.on_yank({ higroup = "YankHighlight", timeout = 1000 }) + vim.highlight.on_yank({ higroup = "YankHighlight", timeout = 200 }) end, pattern = "*", }) From e5d9a171a78811dddbe1a658e301a05b1340fac7 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 4 May 2025 21:37:30 -0700 Subject: [PATCH 106/114] add obsidian plugin --- lua/plugins/obsidian.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lua/plugins/obsidian.lua diff --git a/lua/plugins/obsidian.lua b/lua/plugins/obsidian.lua new file mode 100644 index 0000000..c6407b7 --- /dev/null +++ b/lua/plugins/obsidian.lua @@ -0,0 +1,26 @@ +return { + "epwalsh/obsidian.nvim", + lazy = true, + event = { + "BufReadPre " .. "'/Users/salar/Library/Mobile Documents/iCloud~md~obsidian/Documents/Softinio'", + "BufNewFile " .. "'/Users/salar/Library/Mobile Documents/iCloud~md~obsidian/Documents/Softinio'", + }, + dependencies = { + "nvim-lua/plenary.nvim", + }, + keys = { + { "fo", "ObsidianQuickSwitch", desc = "Obsidian Quick Switch (Telescope)" }, + { "fn", "ObsidianNew", desc = "Create a new obsidian note" }, + { "fs", "ObsidianSearch", desc = "Obsidian Search" }, + { "fd", "ObsidianToday", desc = "Obsidian new daily note" }, + }, + opts = { + workspaces = { + { + name = "personal", + path = "'/Users/salar/Library/Mobile Documents/iCloud~md~obsidian/Documents/Softinio'", + }, + }, + use_advanced_uri = false, + }, +} From df43254bc9a68e661fc5fd9fac63fbc5b8de7df4 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 4 May 2025 22:04:26 -0700 Subject: [PATCH 107/114] obsidian plugin config cleanup --- lua/plugins/obsidian.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lua/plugins/obsidian.lua b/lua/plugins/obsidian.lua index c6407b7..d1b6770 100644 --- a/lua/plugins/obsidian.lua +++ b/lua/plugins/obsidian.lua @@ -1,10 +1,7 @@ return { "epwalsh/obsidian.nvim", lazy = true, - event = { - "BufReadPre " .. "'/Users/salar/Library/Mobile Documents/iCloud~md~obsidian/Documents/Softinio'", - "BufNewFile " .. "'/Users/salar/Library/Mobile Documents/iCloud~md~obsidian/Documents/Softinio'", - }, + ft = "markdown", dependencies = { "nvim-lua/plenary.nvim", }, @@ -21,6 +18,5 @@ return { path = "'/Users/salar/Library/Mobile Documents/iCloud~md~obsidian/Documents/Softinio'", }, }, - use_advanced_uri = false, }, } From 590f972e4b2eb4f33bbf374704a2da6071e83e03 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 4 May 2025 22:09:12 -0700 Subject: [PATCH 108/114] obsidian plugin path fix --- lua/plugins/obsidian.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/obsidian.lua b/lua/plugins/obsidian.lua index d1b6770..0637aa1 100644 --- a/lua/plugins/obsidian.lua +++ b/lua/plugins/obsidian.lua @@ -15,7 +15,7 @@ return { workspaces = { { name = "personal", - path = "'/Users/salar/Library/Mobile Documents/iCloud~md~obsidian/Documents/Softinio'", + path = "/Users/salar/Library/Mobile Documents/iCloud~md~obsidian/Documents/Softinio", }, }, }, From f3886dfc499f6eab80357a0e340fcc3ba5e39802 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 4 May 2025 22:16:45 -0700 Subject: [PATCH 109/114] set conceal level as needed by obsidian plugin --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index 97c23c0..345aa71 100644 --- a/init.lua +++ b/init.lua @@ -31,6 +31,9 @@ else -- [[ Setting options ]] -- See `:help vim.o` + -- conceal level (needed for obsidian) + vim.o.conceallevel = 1 + -- Set highlight on search vim.o.hlsearch = true vim.o.incsearch = true From 997bece059d23d8e87f2d8dbe4c8cc5781e3f485 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 28 Jun 2025 10:17:21 -0700 Subject: [PATCH 110/114] Avante plugin updates --- lua/plugins/avante.lua | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index 03b02d8..e2dddab 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -5,20 +5,22 @@ return { version = false, opts = { provider = "claude", - claude = { - model = "claude-3-7-sonnet-latest", - api_key_name = "cmd:cat " .. vim.fn.expand("~/.anthropic"), - }, - openai = { - model = "o3-mini", - reasoning_effort = "high", - api_key_name = "cmd:cat " .. vim.fn.expand("~/.openai"), - }, - vendors = { + providers = { + claude = { + model = "claude-sonnet-4-20250514", + api_key_name = "cmd:cat " .. vim.fn.expand("~/.anthropic"), + }, + openai = { + model = "o4-mini", + api_key_name = "cmd:cat " .. vim.fn.expand("~/.openai"), + extra_request_body = { + reasoning_effort = "high", + }, + }, ollama = { __inherited_from = "openai", api_key_name = "", - endpoint = "http://127.0.0.1:11434/v1", + endpoint = "http://127.0.0.1:11434", model = "qwen2.5-coder", }, }, @@ -26,12 +28,12 @@ return { -- if you want to build from source then do `make BUILD_FROM_SOURCE=true` build = "make", dependencies = { + "nvim-lua/plenary.nvim", + "MunifTanjim/nui.nvim", "HakonHarnes/img-clip.nvim", "MeanderingProgrammer/render-markdown.nvim", - "MunifTanjim/nui.nvim", - "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons", "nvim-treesitter/nvim-treesitter", - "stevearc/dressing.nvim", + "folke/snacks.nvim", }, } From 3ac11faa28b682e93eebdba08d2b26cc6ac490e1 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 29 Jun 2025 09:23:49 -0700 Subject: [PATCH 111/114] Add pyrefly to lsp --- lua/plugins/lsp.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 46f9eee..53dfcfe 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -98,6 +98,7 @@ return { marksman = {}, nil_ls = {}, nixd = {}, + pyrefly = {}, rust_analyzer = { diagnostics = { enable = true, From 4eb4d93850e6219203c11d6075d599bb38e1d0ce Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 29 Jun 2025 10:49:12 -0700 Subject: [PATCH 112/114] Remove latex support --- lua/plugins/texlabconfig.lua | 40 ------------------------------------ 1 file changed, 40 deletions(-) delete mode 100644 lua/plugins/texlabconfig.lua diff --git a/lua/plugins/texlabconfig.lua b/lua/plugins/texlabconfig.lua deleted file mode 100644 index 6b7611d..0000000 --- a/lua/plugins/texlabconfig.lua +++ /dev/null @@ -1,40 +0,0 @@ -return { - "f3fora/nvim-texlabconfig", - build = "go build", - dependencies = { "lervag/vimtex" }, - config = function() - -- vimtex - vim.g.vimtex_view_method = "skim" - vim.g.vimtex_compiler_method = "tectonic" - - -- nvim-texlabconfig - local tex_preview_executable = "skim" - local tex_preview_args = { "%l", "%p", "%f" } - local texlab_build_executable = "tectonic" - local texlab_build_args = { - "-X", - "compile", - "%f", - "--synctex", - "--keep-logs", - "--keep-intermediates", - } - require("texlabconfig").setup({ - cache_activate = true, - cache_filetypes = { "tex", "bib" }, - reverse_search_edit_cmd = vim.cmd.edit, - settings = { - texlab = { - build = { - executable = texlab_build_executable, - args = texlab_build_args, - }, - forwardSearch = { - executable = tex_preview_executable, - args = tex_preview_args, - }, - }, - }, - }) - end, -} From 913025121496e56550f9f4b58f95f48c7e028117 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 29 Jun 2025 10:50:46 -0700 Subject: [PATCH 113/114] comment out render-markdown --- lua/plugins/avante.lua | 2 +- lua/plugins/render-markdown.lua | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index e2dddab..04599d3 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -31,7 +31,7 @@ return { "nvim-lua/plenary.nvim", "MunifTanjim/nui.nvim", "HakonHarnes/img-clip.nvim", - "MeanderingProgrammer/render-markdown.nvim", + -- "MeanderingProgrammer/render-markdown.nvim", "nvim-tree/nvim-web-devicons", "nvim-treesitter/nvim-treesitter", "folke/snacks.nvim", diff --git a/lua/plugins/render-markdown.lua b/lua/plugins/render-markdown.lua index 4ceee58..f5f201f 100644 --- a/lua/plugins/render-markdown.lua +++ b/lua/plugins/render-markdown.lua @@ -1,11 +1,11 @@ -return { - "MeanderingProgrammer/render-markdown.nvim", - dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, - ---@module 'render-markdown' - ---@type render.md.UserConfig - opts = { - file_types = { "markdown", "Avante" }, - render_modes = true, - }, - ft = { "markdown", "Avante" }, -} +-- return { +-- "MeanderingProgrammer/render-markdown.nvim", +-- dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, +-- ---@module 'render-markdown' +-- ---@type render.md.UserConfig +-- opts = { +-- file_types = { "markdown", "Avante" }, +-- render_modes = true, +-- }, +-- ft = { "markdown", "Avante" }, +-- } From 595b6d78f0dbd2d352c8f903988cd989d11d62fd Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 29 Jun 2025 11:12:17 -0700 Subject: [PATCH 114/114] Actually remove render-markdown instead of commeting out --- lua/plugins/avante.lua | 1 - lua/plugins/render-markdown.lua | 11 ----------- 2 files changed, 12 deletions(-) delete mode 100644 lua/plugins/render-markdown.lua diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index 04599d3..b1ca857 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -31,7 +31,6 @@ return { "nvim-lua/plenary.nvim", "MunifTanjim/nui.nvim", "HakonHarnes/img-clip.nvim", - -- "MeanderingProgrammer/render-markdown.nvim", "nvim-tree/nvim-web-devicons", "nvim-treesitter/nvim-treesitter", "folke/snacks.nvim", diff --git a/lua/plugins/render-markdown.lua b/lua/plugins/render-markdown.lua deleted file mode 100644 index f5f201f..0000000 --- a/lua/plugins/render-markdown.lua +++ /dev/null @@ -1,11 +0,0 @@ --- return { --- "MeanderingProgrammer/render-markdown.nvim", --- dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, --- ---@module 'render-markdown' --- ---@type render.md.UserConfig --- opts = { --- file_types = { "markdown", "Avante" }, --- render_modes = true, --- }, --- ft = { "markdown", "Avante" }, --- }