diff --git a/init.lua b/init.lua index 345aa71..97c23c0 100644 --- a/init.lua +++ b/init.lua @@ -31,9 +31,6 @@ 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 diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index b1ca857..e06c9a9 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -4,35 +4,20 @@ return { lazy = false, version = false, opts = { - provider = "claude", - 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", - model = "qwen2.5-coder", - }, + provider = "openai", + openai = { + api_key_name = "cmd:cat " .. vim.fn.expand("~/.openai"), }, }, -- 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", - "folke/snacks.nvim", + "stevearc/dressing.nvim", }, } diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index fee8d09..02ce023 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -11,15 +11,11 @@ return { 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.g.tokyonight_style = "night" + vim.g.tokyonight_italic_functions = true vim.o.termguicolors = true -- load the colorscheme here - vim.cmd([[colorscheme tokyonight-night]]) + vim.cmd([[colorscheme tokyonight]]) end, }, { diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 53dfcfe..46f9eee 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -98,7 +98,6 @@ return { marksman = {}, nil_ls = {}, nixd = {}, - pyrefly = {}, rust_analyzer = { diagnostics = { enable = true, 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/nvim-aider.lua b/lua/plugins/nvim-aider.lua deleted file mode 100644 index 8913bff..0000000 --- a/lua/plugins/nvim-aider.lua +++ /dev/null @@ -1,17 +0,0 @@ -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/obsidian.lua b/lua/plugins/obsidian.lua deleted file mode 100644 index 0637aa1..0000000 --- a/lua/plugins/obsidian.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - "epwalsh/obsidian.nvim", - lazy = true, - ft = "markdown", - 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", - }, - }, - }, -} 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/smart-splits.lua b/lua/plugins/smart-splits.lua new file mode 100644 index 0000000..7a48e84 --- /dev/null +++ b/lua/plugins/smart-splits.lua @@ -0,0 +1,26 @@ +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" }, + }, +} diff --git a/lua/plugins/snacks.lua b/lua/plugins/snacks.lua deleted file mode 100644 index c003c2b..0000000 --- a/lua/plugins/snacks.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "folke/snacks.nvim", - priority = 1000, - lazy = false, - ---@type snacks.Config - opts = {}, -} 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") diff --git a/lua/plugins/texlabconfig.lua b/lua/plugins/texlabconfig.lua new file mode 100644 index 0000000..0d745fa --- /dev/null +++ b/lua/plugins/texlabconfig.lua @@ -0,0 +1,40 @@ +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 = "/Applications/Skim.app/Contents/SharedSupport/displayline" + 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, +} diff --git a/lua/user/vscode_keymaps.lua b/lua/user/vscode_keymaps.lua index d239c88..c58727b 100644 --- a/lua/user/vscode_keymaps.lua +++ b/lua/user/vscode_keymaps.lua @@ -6,15 +6,6 @@ keymap("n", "", "", opts) vim.g.mapleader = " " vim.g.maplocalleader = " " --- highligh yank -vim.api.nvim_set_hl(0, "YankHighlight", { bg = "#d19a66" }) -vim.api.nvim_create_autocmd("TextYankPost", { - callback = function() - vim.highlight.on_yank({ higroup = "YankHighlight", timeout = 200 }) - end, - pattern = "*", -}) - -- yank to system clipboard keymap({ "n", "v" }, "y", '"+y', opts)