From 2ef5662c333cc8cc9e12033a8a6197fd73588085 Mon Sep 17 00:00:00 2001 From: th3r00t Date: Sun, 12 Oct 2025 17:42:02 -0400 Subject: [PATCH] Bringing repo up to date --- coc-settings.json | 2 +- init.lua | 149 +++++++++++++---- lua/avante_settings.lua | 69 ++++++++ lua/completion.lua | 110 +++++++------ lua/keymaps.lua | 68 ++++++-- lua/lsp.lua | 57 ++++--- lua/options.lua | 2 + lua/plugins.lua | 353 ++++++++++++++++++++++++++++++++++------ 8 files changed, 647 insertions(+), 163 deletions(-) create mode 100644 lua/avante_settings.lua diff --git a/coc-settings.json b/coc-settings.json index b8b0f51..9c35c40 100644 --- a/coc-settings.json +++ b/coc-settings.json @@ -4,7 +4,7 @@ "suggest.floatEnable": true, "suggest.detailField": "preview", "suggest.maxPreviewWidth": 80, - "signature.enable": true, + "signature.enable": false, "signature.target": "float", "extensions": [ "coc-json", diff --git a/init.lua b/init.lua index 7c71a82..da1486f 100644 --- a/init.lua +++ b/init.lua @@ -13,36 +13,121 @@ require("coc") -- ./lua/coc.lua require("treesitter") -- ./lua/treesitter.lua require("autocmds") -- ./lua/autocmds.lua require("diagnostics") -- ./lua/diagnostics.lua +require("avante_settings") -- ./lua/avante_settings.lua require('telescope_configuration') -- ./lua/telescope_configuration.lua +local function cyberdream() + require("cyberdream").setup({ + -- Set light or dark variant + variant = "default", -- use "light" for the light variant. Also accepts "auto" to set dark or light colors based on the current value of `vim.o.background` + -- Enable transparent background + transparent = true, + -- Reduce the overall saturation of colours for a more muted look + saturation = 1, -- accepts a value between 0 and 1. 0 will be fully desaturated (greyscale) and 1 will be the full color (default) + -- Enable italics comments + italic_comments = true, + -- Replace all fillchars with ' ' for the ultimate clean look + hide_fillchars = false, + -- Apply a modern borderless look to pickers like Telescope, Snacks Picker & Fzf-Lua + borderless_pickers = true, + -- Set terminal colors used in `:terminal` + terminal_colors = true, + -- Improve start up time by caching highlights. Generate cache with :CyberdreamBuildCache and clear with :CyberdreamClearCache + cache = true, + -- Override highlight groups with your own colour values + -- highlights = { + -- -- Highlight groups to override, adding new groups is also possible + -- -- See `:h highlight-groups` for a list of highlight groups or run `:hi` to see all groups and their current values + -- -- Example: + -- Comment = { fg = "#696969", bg = "NONE", italic = true }, + -- -- More examples can be found in `lua/cyberdream/extensions/*.lua` + -- }, + -- Override a highlight group entirely using the built-in colour palette + -- overrides = function(colors) -- NOTE: This function nullifies the `highlights` option + -- -- Example: + -- return { + -- Comment = { fg = colors.green, bg = "NONE", italic = true }, + -- ["@property"] = { fg = colors.magenta, bold = true }, + -- } + -- end, + -- Override colors + -- colors = { + -- -- For a list of colors see `lua/cyberdream/colours.lua` + -- -- Override colors for both light and dark variants + -- bg = "#000000", + -- green = "#00ff00", + -- -- If you want to override colors for light or dark variants only, use the following format: + -- dark = { + -- magenta = "#ff00ff", + -- fg = "#eeeeee", + -- }, + -- light = { + -- red = "#ff5c57", + -- cyan = "#5ef1ff", + -- }, + -- }, + -- Disable or enable colorscheme extensions + extensions = { + telescope = true, + notify = true, + mini = true, + treesitter = true, + whichkey = true, + treesittercontext = true, + markdown = true, + snacks = true, + trouble = true, + -- More extensions can be found in `lua/cyberdream/extensions/*.lua` + } + }) +end + if host == "xps13" then - require('tokyonight').setup({ - style = "moon", -- "storm", "moon", "day", "night" - transparent = false, -- Enable transparent background - terminal_colors = true, -- Enable terminal colors - styles = { - comments = { italic = true }, -- Italic comments - keywords = { italic = true }, -- Italic keywords - functions = { bold = true }, -- Bold functions - variables = {}, -- No special style for variables - sidebars = "dark", -- Dark sidebars - floats = "dark", -- Dark floating windows - }, - }) + cyberdream() + -- require('tokyonight').setup({ + -- style = "moon", -- "storm", "moon", "day", "night" + -- transparent = false, -- Enable transparent background + -- terminal_colors = true, -- Enable terminal colors + -- styles = { + -- comments = { italic = true }, -- Italic comments + -- keywords = { italic = true }, -- Italic keywords + -- functions = { bold = true }, -- Bold functions + -- variables = {}, -- No special style for variables + -- sidebars = "dark", -- Dark sidebars + -- floats = "dark", -- Dark floating windows + -- }, + -- }) +-- }) +elseif host == "Vector" then + cyberdream() + -- require('tokyonight').setup({ + -- style = "storm", -- "storm", "moon", "day", "night" + -- transparent = false, -- Enable transparent background + -- terminal_colors = true, -- Enable terminal colors + -- styles = { + -- comments = { italic = true }, -- Italic comments + -- keywords = { italic = true }, -- Italic keywords + -- functions = { bold = true }, -- Bold functions + -- variables = {}, -- No special style for variables + -- sidebars = "dark", -- Dark sidebars + -- floats = "dark", -- Dark floating windows + -- }, + -- }) elseif host == "Titan" then - require('tokyonight').setup({ - style = "storm", -- "storm", "moon", "day", "night" - transparent = false, -- Enable transparent background - terminal_colors = true, -- Enable terminal colors - styles = { - comments = { italic = true }, -- Italic comments - keywords = { italic = true }, -- Italic keywords - functions = { bold = true }, -- Bold functions - variables = {}, -- No special style for variables - sidebars = "dark", -- Dark sidebars - floats = "dark", -- Dark floating windows - }, - }) + cyberdream() + -- require('tokyonight').setup({ + -- style = "storm", -- "storm", "moon", "day", "night" + -- transparent = false, -- Enable transparent background + -- terminal_colors = true, -- Enable terminal colors + -- styles = { + -- comments = { italic = true }, -- Italic comments + -- keywords = { italic = true }, -- Italic keywords + -- functions = { bold = true }, -- Bold functions + -- variables = {}, -- No special style for variables + -- sidebars = "dark", -- Dark sidebars + -- floats = "dark", -- Dark floating windows + -- }, + -- }) end local function is_linux_console() @@ -55,10 +140,11 @@ local function want_truecolor() or ((vim.env.COLORTERM or ""):lower():find("truecolor") ~= nil) end + local function set_colorscheme() if want_truecolor() then vim.o.termguicolors = true - if not pcall(vim.cmd.colorscheme, "tokyonight") then + if not pcall(vim.cmd.colorscheme, "cyberdream") then pcall(vim.cmd.colorscheme, "habamax") end else @@ -92,7 +178,12 @@ vim.api.nvim_create_autocmd("VimEnter", { lualine_a = { "mode" }, lualine_b = { "branch" }, lualine_c = { { "filename", file_status = true, path = 1 } }, - lualine_x = { "encoding", "fileformat", "filetype" }, + lualine_x = { + "encoding", "fileformat", "filetype", + require("noice").api.statusline.mode.get, + cond = require("noice").api.statusline.mode.has, + color = { fg = "#ff9e64" }, + }, lualine_y = { "progress" }, lualine_z = { "location" }, }, @@ -100,7 +191,7 @@ vim.api.nvim_create_autocmd("VimEnter", { else lualine.setup({ options = { - theme = "tokyonight", + theme = "auto", icons_enabled = true, globalstatus = true, }, diff --git a/lua/avante_settings.lua b/lua/avante_settings.lua new file mode 100644 index 0000000..c66ffaf --- /dev/null +++ b/lua/avante_settings.lua @@ -0,0 +1,69 @@ +require('avante').setup({ + instructions_file = "avante.md", + provider = "ollama", + providers = { + ollama = { + endpoint = "http://localhost:11434", + model = "codellama:latest", + }, + }, + behavior = { + auto_focus_sidebar = true, + auto_suggestions = true, -- Experimental. + jump_result_buffer_on_finish = false, + }, + windows = { + position = "right", + fillchars = "eob: ", + wrap = true, + width = 30, + height = 30, + sidebar_header = { + enabled = true, + align = "center", + rounded = true, + }, + spinner = { + editing = { + "⡀", + "⠄", + "⠂", + "⠁", + "⠈", + "⠐", + "⠠", + "⢀", + "⣀", + "⢄", + "⢂", + "⢁", + "⢈", + "⢐", + "⢠", + "⣠", + "⢤", + "⢢", + "⢡", + "⢨", + "⢰", + "⣰", + "⢴", + "⢲", + "⢱", + "⢸", + "⣸", + "⢼", + "⢺", + "⢹", + "⣹", + "⢽", + "⢻", + "⣻", + "⢿", + "⣿", + }, + generating = { "·", "✢", "✳", "∗", "✻", "✽" }, + thinking = { "🤯", "🙄" }, + }, + }, +}) diff --git a/lua/completion.lua b/lua/completion.lua index 308001d..a20eec8 100644 --- a/lua/completion.lua +++ b/lua/completion.lua @@ -15,8 +15,21 @@ cmp.setup({ return vim_item end, }, + -- completion = { + -- completeopt = 'menu,menuone,noinsert', + -- }, + completion = { + completeopt = 'menu,menuone,noinsert', + }, + performance = { + max_view_entries = 10, + }, window = { - completion = cmp.config.window.bordered(), + completion = cmp.config.window.bordered({ + -- winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None", + col_offset = -3, + side_padding = 0, + }), documentation = cmp.config.window.bordered(), }, mapping = cmp.mapping.preset.insert({ @@ -88,50 +101,51 @@ cmp.setup.cmdline(":", { }), }) -local capabilities = require("cmp_nvim_lsp").default_capabilities() -require("lspconfig").clangd.setup({ - capabilities = capabilities, -}) -require("lspconfig").taplo.setup({ - capabilities = capabilities, -}) -require("lspconfig").marksman.setup({ - capabilities = capabilities, -}) -require("lspconfig").lua_ls.setup({ - capabilities = capabilities, -}) -require("lspconfig").rust_analyzer.setup({ - capabilities = capabilities, -}) -require("lspconfig").zls.setup({ - capabilities = capabilities, -}) -require("lspconfig").gopls.setup({ - capabilities = capabilities, - settings = { - gopls = { - analyses = { - unusedparams = true, - unusedwrite = true, - shadow = true, - }, - staticcheck = true, - usePlaceholders = true, - hints = { - assignVariableTypes = true, - compositeLiteralFields = true, - compositeLiteralTypes = true, - functionTypeParameters = true, - parameterNames = true, - rangeVariableTypes = true, - }, - }, - }, -}) -require("lspconfig").pyright.setup({ - capabilities = capabilities, -}) -require("lspconfig").nim_langserver.setup({ - capabilities = capabilities, -}) +-- LSP server configurations moved to lsp.lua to avoid duplicates +-- local capabilities = require("cmp_nvim_lsp").default_capabilities() +-- require("lspconfig").clangd.setup({ +-- capabilities = capabilities, +-- }) +-- require("lspconfig").taplo.setup({ +-- capabilities = capabilities, +-- }) +-- require("lspconfig").marksman.setup({ +-- capabilities = capabilities, +-- }) +-- require("lspconfig").lua_ls.setup({ +-- capabilities = capabilities, +-- }) +-- require("lspconfig").rust_analyzer.setup({ +-- capabilities = capabilities, +-- }) +-- require("lspconfig").zls.setup({ +-- capabilities = capabilities, +-- }) +-- require("lspconfig").gopls.setup({ +-- capabilities = capabilities, +-- settings = { +-- gopls = { +-- analyses = { +-- unusedparams = true, +-- unusedwrite = true, +-- shadow = true, +-- }, +-- staticcheck = true, +-- usePlaceholders = true, +-- hints = { +-- assignVariableTypes = true, +-- compositeLiteralFields = true, +-- compositeLiteralTypes = true, +-- functionTypeParameters = true, +-- parameterNames = true, +-- rangeVariableTypes = true, +-- }, +-- }, +-- }, +-- }) +-- require("lspconfig").pyright.setup({ +-- capabilities = capabilities, +-- }) +-- require("lspconfig").nim_langserver.setup({ +-- capabilities = capabilities, +-- }) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 0d542cb..6e607a0 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -12,8 +12,8 @@ end, { noremap = true }) -- Leader Maps vim.keymap.set("n", "f", "", { desc = "Files"}) -vim.keymap.set("n", "ff", ":FzfLua files", { desc = "File Finder"}) --- vim.keymap.set("n", "fe", ":Pick files", { desc = "File Picker"}) +-- vim.keymap.set("n", "ff", ":FzfLua files", { desc = "File Finder"}) +vim.keymap.set("n", "ff", ":Pick files", { desc = "File Picker"}) vim.keymap.set("n", "ft", t3_toggle_netrw, { desc = "File Tree"}) vim.keymap.set("n", "b", "", { desc = "Buffers"}) @@ -88,6 +88,7 @@ vim.keymap.set("n", "_", ":resize -5", { desc = "Decrease Window Height -- CTRL X Maps +vim.keymap.set("n", "", "", { desc = "Ctrl-X"}) vim.keymap.set("n", "", ":Pick buffers", { desc = "Buffer Picker"}) vim.keymap.set("n", "", ":Pick files", { desc = "File Picker"}) vim.keymap.set("n", "", ":Pick help", { desc = "Help Picker"}) @@ -100,6 +101,12 @@ vim.keymap.set("n", "v", "TWView", { desc = "View Tasks", nor vim.keymap.set("n", "u", "TWUpdateCurrent", { desc="Update Tasks", noremap = true, silent = true }) vim.keymap.set("n", "s", "TWSyncTasks", { desc = "Sync Tasks", noremap = true, silent = true }) vim.keymap.set("n", "", "TWToggle", { desc = "Toggle Taskwarrior", silent = true }) +vim.keymap.set("n", "", "", { desc = "Devdocs"}) +vim.keymap.set("n", "i", ":DevdocsInstall ", { desc = "Install Docset"}) +vim.keymap.set("n", "o", ":DevdocsOpen ", { desc = "Open Docs In Window"}) +vim.keymap.set("n", "f", ":DevdocsOpenFloat ", { desc = "Open Docs In Float"}) +vim.keymap.set("n", "t", "DevdocsToggle", { desc = "Toggle Float"}) + -- FN Keys -- vim.keymap.set("n", "", ":nohlsearch", { desc = "Clear Search Highlight"}) @@ -110,17 +117,17 @@ vim.keymap.set("n", "", ":Telescope live_grep", { desc = "live grep"}) vim.keymap.set("n", "", ":setlocal spell! spelllang=en_us", { desc = "Toggle Spell Check"}) vim.keymap.set("n", "", ":setlocal wrap!", { desc = "Toggle Line Wrap"}) -vim.keymap.set( "n", "a", "", {desc = "AI/Claude Code" }) -vim.keymap.set( "n", "ac", "ClaudeCode", {desc = "Toggle Claude" }) -vim.keymap.set( "n", "af", "ClaudeCodeFocus", {desc = "Focus Claude" }) -vim.keymap.set( "n", "ar", "ClaudeCode --resume", {desc = "Resume Claude" }) -vim.keymap.set( "n", "aC", "ClaudeCode --continue", {desc = "Continue Claude" }) -vim.keymap.set( "n", "am", "ClaudeCodeSelectModel", {desc = "Select Claude model" }) -vim.keymap.set( "n", "ab", "ClaudeCodeAdd %", {desc = "Add current buffer" }) -vim.keymap.set( "v", "as", "ClaudeCodeSend", {desc = "Send to Claude" }) +-- vim.keymap.set( "n", "a", "", {desc = "AI/Claude Code" }) +-- vim.keymap.set( "n", "ac", "ClaudeCode", {desc = "Toggle Claude" }) +-- vim.keymap.set( "n", "af", "ClaudeCodeFocus", {desc = "Focus Claude" }) +-- vim.keymap.set( "n", "ar", "ClaudeCode --resume", {desc = "Resume Claude" }) +-- vim.keymap.set( "n", "aC", "ClaudeCode --continue", {desc = "Continue Claude" }) +-- vim.keymap.set( "n", "am", "ClaudeCodeSelectModel", {desc = "Select Claude model" }) +-- vim.keymap.set( "n", "ab", "ClaudeCodeAdd %", {desc = "Add current buffer" }) +-- vim.keymap.set( "v", "as", "ClaudeCodeSend", {desc = "Send to Claude" }) -- vim.keymap.set( "n", "as", "ClaudeCodeTreeAdd", {desc = "Add file", ft = { "NvimTree", "neo-tree", "oil", "minifiles" }}) -vim.keymap.set( "n", "aa", "ClaudeCodeDiffAccept", {desc = "Accept diff" }) -vim.keymap.set( "n", "ad", "ClaudeCodeDiffDeny", {desc = "Deny diff" }) +-- vim.keymap.set( "n", "aa", "ClaudeCodeDiffAccept", {desc = "Accept diff" }) +-- vim.keymap.set( "n", "ad", "ClaudeCodeDiffDeny", {desc = "Deny diff" }) vim.api.nvim_create_autocmd("FileType", { pattern = { "NvimTree", "neo-tree", "oil", "minifiles" }, callback = function() @@ -139,6 +146,9 @@ vim.keymap.set( "n", "lc", "", {desc = "Completions" }) vim.keymap.set( "n", "lch", "CocCommand document.toggleInlayHint", {desc = "Toggle Inline Hints" }) vim.keymap.set( "n", "lcs", "CocOutline", {desc = "Show Symbol Outline" }) vim.keymap.set( "n", "lcl", "CocCommand document.toggleCodeLens", {desc = "Show Code Lens" }) +vim.keymap.set( "n", "lo", "", {desc = "Overlays" }) +vim.keymap.set( "n", "lod", "Trouble dignostics", {desc = "Diagnostics" }) +vim.keymap.set( "n", "los", "Trouble symbols", {desc = "Symbols" }) -- Tag-like functionality using LSP vim.keymap.set( "n", "lt", "", {desc = "Tags" }) @@ -148,3 +158,37 @@ vim.keymap.set( "n", "ltd", ":Telescope lsp_dynamic_workspace_symbols", "lua vim.lsp.buf.definition()", {desc = "Go to Definition" }) vim.keymap.set( "n", "", "", {desc = "Jump Back" }) vim.keymap.set( "n", "g]", "lua vim.lsp.buf.references()", {desc = "Find References" }) + +-- Top Pickers & Explorer +vim.keymap.set("n", "", ":lua Snacks.picker.smart()", { desc = "Smart Find Files" }) +vim.keymap.set("n", "/", ":lua Snacks.picker.grep()", { desc = "Grep" }) +vim.keymap.set("n", ":", ":lua Snacks.picker.command_history()", { desc = "Command History" }) +vim.keymap.set("n", "n", ":lua Snacks.picker.notifications()", { desc = "Notification History" }) +vim.keymap.set("n", "e", ":lua Snacks.explorer()", { desc = "File Explorer" }) +vim.keymap.set("n", "fb", ":lua Snacks.picker.buffers()", { desc = "Buffers" }) +vim.keymap.set("n", "ff", ":lua Snacks.picker.files()", { desc = "Find Files" }) +vim.keymap.set("n", "fg", ":lua Snacks.picker.git_files()", { desc = "Find Git Files" }) +vim.keymap.set("n", "fp", ":lua Snacks.picker.projects()", { desc = "Projects" }) +vim.keymap.set("n", "fr", ":lua Snacks.picker.recent()", { desc = "Recent" }) +vim.keymap.set("n", "Gb", ":lua Snacks.picker.git_branches()", { desc = "Git Branches" }) +vim.keymap.set("n", "Gl", ":lua Snacks.picker.git_log()", { desc = "Git Log" }) +vim.keymap.set("n", "GL", ":lua Snacks.picker.git_log_line()", { desc = "Git Log Line" }) +vim.keymap.set("n", "Gs", ":lua Snacks.picker.git_status()", { desc = "Git Status" }) +vim.keymap.set("n", "GS", ":lua Snacks.picker.git_stash()", { desc = "Git Stash" }) +vim.keymap.set("n", "Gd", ":lua Snacks.picker.git_diff()", { desc = "Git Diff (Hunks)" }) +vim.keymap.set("n", "Gf", ":lua Snacks.picker.git_log_file()", { desc = "Git Log File" }) +vim.keymap.set("n", "sb", ":lua Snacks.picker.buffers()", { desc = "Buffers" }) +vim.keymap.set("n", "ss", ":lua Snacks.picker.smart()", { desc = "Smart Find Files" }) +vim.keymap.set("n", "sp", ":lua Snacks.picker.projects()", { desc = "Projects" }) +vim.keymap.set("n", "sr", ":lua Snacks.picker.recent()", { desc = "Recent" }) +vim.keymap.set("n", "sw", ":lua Snacks.picker.words()", { desc = "Next Reference" }) +vim.keymap.set("n", "sw", ":lua Snacks.words.jump(vim.v.count1)", { desc = "Next Reference" }) +vim.keymap.set("n", "sw", ":lua Snacks.words.jump(-vim.v.count1)", { desc = "Prev Reference" }) + +-- Terminal +-- vim.keymap.set("n", "", ":lua Snacks.terminal()", { desc = "Toggle Terminal" }) +-- vim.keymap.set("n", "", ":lua Snacks.terminal()", { desc = "which_key_ignore" }) + +-- Words Jump +vim.keymap.set("n", "]]", ":lua Snacks.words.jump(vim.v.count1)", { desc = "Next Reference", }) +vim.keymap.set("n", "[[", ":lua Snacks.words.jump(-vim.v.count1)", { desc = "Prev Reference", }) diff --git a/lua/lsp.lua b/lua/lsp.lua index 082028a..1523f61 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -1,11 +1,6 @@ local vim = vim --- vim.cmd [[ --- augroup LspCompletion --- autocmd! --- autocmd InsertEnter * setlocal omnifunc=v:lua.vim.lsp.omnifunc --- autocmd TextChangedI * if pumvisible() == 0 | silent! lua vim.fn.complete(vim.fn.col('.'), vim.fn["vim.lsp.omnifunc"]()) | endif --- augroup END --- ]] + +-- Enable LSP servers with proper configuration vim.lsp.enable('lua_ls') vim.lsp.enable('gopls', { settings = { @@ -29,30 +24,48 @@ vim.lsp.enable('gopls', { }, }) vim.lsp.enable('nim_langserver') + +-- Fix: Add proper configuration for pyright/basedpyright +-- For NixOS with basedpyright: +vim.lsp.enable('basedpyright', { + settings = { + basedpyright = { + analysis = { + typeCheckingMode = "basic", + autoSearchPaths = true, + useLibraryCodeForTypes = true, + diagnosticMode = "workspace", + }, + } + } +}) + + require("lsp_signature").setup({ debug = false, - bind = true, -- registers signature handler - doc_lines = 10, - max_height = 12, - max_width = function() return math.floor(vim.api.nvim_win_get_width(0) * 0.8) end, + bind = true, + doc_lines = 5, + max_height = 8, + max_width = function() return math.floor(vim.api.nvim_win_get_width(0) * 0.7) end, wrap = true, - floating_window = true, -- show the popup - floating_window_above_cur_line = true, + floating_window = true, + floating_window_above_cur_line = false, floating_window_off_x = 1, - floating_window_off_y = 0, - - -- IMPORTANT: don’t inline (you can change later if you want) - hint_enable = true, + floating_window_off_y = 2, + -- hint_enable = true, + hint_enable = false, hint_inline = function() return false end, - - hint_prefix = "🐼 ", + -- hint_prefix = "🐼 ", + hint_prefix = "", hint_scheme = "String", hi_parameter = "LspSignatureActiveParameter", handler_opts = { border = "rounded" }, - always_trigger = false, - extra_trigger_chars = { "(", "," }, -- good default - zindex = 200, + auto_close_after = 5, + extra_trigger_chars = { "(", "," }, + -- zindex = 200, + zindex = 50, padding = "", timer_interval = 200, }) + diff --git a/lua/options.lua b/lua/options.lua index 96bc697..148e03f 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -15,6 +15,8 @@ vim.o.termguicolors = true vim.o.winborder = "rounded" vim.o.clipboard = "unnamedplus" vim.o.completeopt = "menuone" +vim.o.shell = "/usr/bin/env fish" +-- vim.o.shell = "/usr/bin/env zsh" -- vim.o.completeopt = "menuone,noinsert,noselect" vim.o.cursorline = true diff --git a/lua/plugins.lua b/lua/plugins.lua index a9b5cc0..cdc3702 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -2,7 +2,8 @@ local vim = vim local host = vim.loop.os_gethostname() vim.pack.add({ - { src = "https://github.com/folke/tokyonight.nvim" }, + -- { src = "https://github.com/folke/tokyonight.nvim" }, + { src = "https://github.com/scottmckendry/cyberdream.nvim" }, { src = "https://github.com/nvim-tree/nvim-web-devicons" }, { src = "https://github.com/ibhagwan/fzf-lua" }, { src = "https://github.com/echasnovski/mini.pick" }, @@ -27,7 +28,8 @@ vim.pack.add({ -- { src = "https://github.com/hrsh7th/cmp-cmdline" }, -- { src = "https://github.com/hrsh7th/cmp-nvim-lua" }, -- { src = "https://github.com/saadparwaiz1/cmp_luasnip" }, - { src = "https://github.com/github/copilot.vim" }, + -- { src = "https://github.com/github/copilot.vim" }, + -- { src = "https://github.com/jacob411/Ollama-Copilot" }, { src = "https://github.com/pysan3/pathlib.nvim" }, { src = "https://github.com/nvim-orgmode/org-bullets.nvim" }, { src = "https://github.com/lukas-reineke/headlines.nvim" }, @@ -58,14 +60,17 @@ vim.pack.add({ { src = "https://github.com/mbbill/undotree.git" }, { src = "https://github.com/francoiscabrol/ranger.vim" }, { src = "https://github.com/folke/snacks.nvim" }, - { src = "https://github.com/coder/claudecode.nvim" }, + -- { src = "https://github.com/coder/claudecode.nvim" }, { src = "https://github.com/yetone/avante.nvim" }, { src = "https://github.com/alaviss/nim.nvim" }, + { src = "https://github.com/glebzlat/arduino-nvim" }, + { src = "https://github.com/norcalli/nvim-colorizer.lua" }, + { src = "https://github.com/HiPhish/rainbow-delimiters.nvim" }, + { src = "https://github.com/lewis6991/gitsigns.nvim" }, + { src = "https://github.com/amitds1997/remote-nvim.nvim" }, + }) -if host == "xps13" then -end - require('mini.icons').setup({}) require('mini.pick').setup({}) require('mini.pairs').setup({}) @@ -74,9 +79,74 @@ require('mini.surround').setup({}) require('mini.indentscope').setup({}) require('mini.tabline').setup({}) require('mini.fuzzy').setup({}) -require('lualine').setup({ options = { theme = 'tokyonight' } }) +-- require('lualine').setup({ options = { theme = 'tokyonight' } }) require('which-key').setup({}) -require('fzf-lua').setup({}) +require("snacks").setup({ + explorer = { enabled = true }, + image = { enabled = true }, + input = { enabled = true }, + picker = { enabled = true }, + scope = { enabled = true }, + notifier = { enabled = true }, + quickfile = { enabled = true }, + scroll = { enabled = true }, + statuscolumn = { enabled = true }, +}) +require('fzf-lua').setup({ + winopts = { + height = 0.85, + width = 0.80, + row = 0.35, + col = 0.50, + border = 'rounded', + preview = { + border = 'border', + wrap = 'nowrap', + hidden = 'nohidden', + vertical = 'down:45%', + horizontal = 'right:60%', + layout = 'flex', + flip_columns = 120, + }, + }, + keymap = { + builtin = { + [""] = "toggle-help", + [""] = "toggle-fullscreen", + [""] = "toggle-preview-wrap", + [""] = "toggle-preview", + [""] = "toggle-preview-ccw", + [""] = "toggle-preview-cw", + [""] = "preview-page-down", + [""] = "preview-page-up", + [""] = "preview-page-reset", + }, + fzf = { + ["ctrl-z"] = "abort", + ["ctrl-u"] = "unix-line-discard", + ["ctrl-f"] = "half-page-down", + ["ctrl-b"] = "half-page-up", + ["ctrl-a"] = "beginning-of-line", + ["ctrl-e"] = "end-of-line", + ["alt-a"] = "toggle-all", + ["f3"] = "toggle-preview-wrap", + ["f4"] = "toggle-preview", + ["shift-down"] = "preview-page-down", + ["shift-up"] = "preview-page-up", + }, + }, + previewers = { + head = { + cmd = "head", + args = nil, + }, + git_diff = { + cmd_deleted = "git show HEAD --", + cmd_modified = "git diff HEAD", + cmd_untracked = "git diff --no-index /dev/null", + }, + }, +}) require('crates').setup({}) require('todo-comments').setup({ options = { @@ -125,48 +195,229 @@ require('goto-preview').setup({ default_mappings = true }) require('telescope').setup({}) require('nvim-devdocs').setup({}) -- require('noice').setup({ --- lsp = { --- override = { --- ["vim.lsp.util.convert_input_to_markdown_lines"] = true, --- ["vim.lsp.util.stylize_markdown"] = true, --- ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp --- }, --- }, --- presets = { --- bottom_search = true, -- use a classic bottom cmdline for search --- command_palette = true, -- position the cmdline and popupmenu together --- long_message_to_split = true, -- long messages will be sent to a split --- inc_rename = false, -- enables an input dialog for inc-rename.nvim --- lsp_doc_border = false, -- add a border to hover docs and signature help --- }, +-- lsp = { +-- override = { +-- ["vim.lsp.util.convert_input_to_markdown_lines"] = true, +-- ["vim.lsp.util.stylize_markdown"] = true, +-- ["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp +-- }, +-- }, +-- presets = { +-- bottom_search = true, -- use a classic bottom cmdline for search +-- command_palette = true, -- position the cmdline and popupmenu together +-- long_message_to_split = true, -- long messages will be sent to a split +-- inc_rename = false, -- enables an input dialog for inc-rename.nvim +-- lsp_doc_border = false, -- add a border to hover docs and signature help +-- }, +-- routes = { +-- view = "notify", +-- filter = { event = "msg_showmode" }, +-- }, -- }) -require("claudecode").setup({}) -require('avante').setup({ - opts = { - -- add any opts here - -- this file can contain specific instructions for your project - instructions_file = "avante.md", - -- for example - provider = "copilot", - providers = { - -- claude = { - -- endpoint = "https://api.anthropic.com", - -- model = "claude-sonnet-4-20250514", - -- timeout = 30000, -- Timeout in milliseconds - -- extra_request_body = { - -- temperature = 0.75, - -- max_tokens = 20480, - -- }, - -- }, - -- moonshot = { - -- endpoint = "https://api.moonshot.ai/v1", - -- model = "kimi-k2-0711-preview", - -- timeout = 30000, -- Timeout in milliseconds - -- extra_request_body = { - -- temperature = 0.75, - -- max_tokens = 32768, - -- }, - -- }, - } - } +-- require("claudecode").setup({}) + +require('arduino-nvim').setup({ + default_fqbn = "esp32:esp32:esp32", + filetypes = {"arduino"} +}) +require('colorizer').setup({ + '*', +}, { + RGB = true, + RRGGBB = true, + names = true, + RRGGBBAA = true, + rgb_fn = true, + hsl_fn = true, + css = true, + css_fn = true, + mode = 'background', +}) +require('gitsigns').setup({ + signs = { + add = { text = '┃' }, + change = { text = '┃' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + untracked = { text = '┆' }, + }, + signs_staged = { + add = { text = '┃' }, + change = { text = '┃' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + untracked = { text = '┆' }, + }, + signs_staged_enable = true, + signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` + numhl = false, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + watch_gitdir = { + follow_files = true + }, + auto_attach = true, + attach_to_untracked = false, + current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + virt_text_priority = 100, + use_focus = true, + }, + current_line_blame_formatter = ', - ', + sign_priority = 6, + update_debounce = 100, + status_formatter = nil, -- Use default + max_file_length = 40000, -- Disable if file is longer than this (in lines) + preview_config = { + -- Options passed to nvim_open_win + style = 'minimal', + relative = 'cursor', + row = 0, + col = 1 + }, +}) +require("remote-nvim").setup({ + -- Configuration for devpod connections + devpod = { + binary = "devpod", -- Binary to use for devpod + docker_binary = "docker", -- Binary to use for docker-related commands + ---@diagnostic disable-next-line:param-type-mismatch + -- ssh_config_path = utils.path_join(utils.is_windows, vim.fn.stdpath("data"), constants.PLUGIN_NAME, "ssh_config"), -- Path where devpod SSH configurations should be stored + search_style = "current_dir_only", -- How should devcontainers be searched + -- For dotfiles, see https://devpod.sh/docs/developing-in-workspaces/dotfiles-in-a-workspace for more information + dotfiles = { + path = nil, -- Path to your dotfiles which should be copied into devcontainers + install_script = nil -- Install script that should be called to install your dotfiles + }, + gpg_agent_forwarding = false, -- Should GPG agent be forwarded over the network + container_list = "running_only", -- How should docker list containers ("running_only" or "all") + }, + -- Configuration for SSH connections + ssh_config = { + ssh_binary = "ssh", -- Binary to use for running SSH command + scp_binary = "scp", -- Binary to use for running SSH copy commands + ssh_config_file_paths = { "$HOME/.ssh/config" }, -- Which files should be considered to contain the ssh host configurations. NOTE: `Include` is respected in the provided files. + + -- These are useful for password-based SSH authentication. + -- It provides parsing pattern for the plugin to detect that an input is requested. + -- Each element contains the following attributes: + -- match - The string to match (plain matching is done) + -- type - Supports two values "plain"|"secret". Secret means when you provide the value, it should not be stored in the completion history of Neovim. + -- value - Default value for the prompt + -- value_type - "static"|"dynamic". For things like password, it would be needed for each new connection that the plugin initiates which could be obtrusive. + -- So, we save the value (only for current session's interval) to ease the process. If set to "dynamic", we do not save the value even for the session. You have to provide a fresh value each time. + ssh_prompts = { + { + match = "password:", + type = "secret", + value_type = "static", + value = "", + }, + { + match = "continue connecting (yes/no/[fingerprint])?", + type = "plain", + value_type = "static", + value = "", + }, + -- There are other values here which can be checked in lua/remote-nvim/init.lua + }, + }, + + -- Path to the script that would be copied to the remote and called to ensure that neovim gets installed. + -- Default path is to the plugin's own ./scripts/neovim_install.sh file. + -- neovim_install_script_path = utils.path_join( + -- utils.is_windows, + -- vim.fn.fnamemodify(debug.getinfo(1).source:sub(2), ":h:h:h"), + -- "scripts", + -- "neovim_install.sh" + -- ), + + -- Modify the UI for the plugin's progress viewer. + -- type can be "split" or "popup". All options from https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/popup and https://github.com/MunifTanjim/nui.nvim/tree/main/lua/nui/split are supported. + -- Note that some options like "border" are only available for "popup". + progress_view = { + type = "popup", + }, + + + -- Offline mode configuration. For more details, see the "Offline mode" section below. + offline_mode = { + -- Should offline mode be enabled? + enabled = false, + -- Do not connect to GitHub at all. Not even to get release information. + no_github = false, + -- What path should be looked at to find locally available releases + -- cache_dir = utils.path_join(utils.is_windows, vim.fn.stdpath("cache"), constants.PLUGIN_NAME, "version_cache"), + }, + + -- Remote configuration + remote = { + app_name = "nvim", -- This directly maps to the value NVIM_APPNAME. If you use any other paths for configuration, also make sure to set this. + -- List of directories that should be copied over + copy_dirs = { + -- What to copy to remote's Neovim config directory + config = { + base = vim.fn.stdpath("config"), -- Path from where data has to be copied + dirs = "*", -- Directories that should be copied over. "*" means all directories. To specify a subset, use a list like {"lazy", "mason"} where "lazy", "mason" are subdirectories + -- under path specified in `base`. + compression = { + enabled = false, -- Should compression be enabled or not + additional_opts = {} -- Any additional options that should be used for compression. Any argument that is passed to `tar` (for compression) can be passed here as separate elements. + }, + }, + -- What to copy to remote's Neovim data directory + data = { + base = vim.fn.stdpath("data"), + dirs = {}, + compression = { + enabled = true, + }, + }, + -- What to copy to remote's Neovim cache directory + cache = { + base = vim.fn.stdpath("cache"), + dirs = {}, + compression = { + enabled = true, + }, + }, + -- What to copy to remote's Neovim state directory + state = { + base = vim.fn.stdpath("state"), + dirs = {}, + compression = { + enabled = true, + }, + }, + }, + }, + + -- You can supply your own callback that should be called to create the local client. This is the default implementation. + -- Two arguments are passed to the callback: + -- port: Local port at which the remote server is available + -- workspace_config: Workspace configuration for the host. For all the properties available, see https://github.com/amitds1997/remote-nvim.nvim/blob/main/lua/remote-nvim/providers/provider.lua#L4 + -- A sample implementation using WezTerm tab is at: https://github.com/amitds1997/remote-nvim.nvim/wiki/Configuration-recipes + client_callback = function(port, _) + require("remote-nvim.ui").float_term(("nvim --server localhost:%s --remote-ui"):format(port), function(exit_code) + if exit_code ~= 0 then + vim.notify(("Local client failed with exit code %s"):format(exit_code), vim.log.levels.ERROR) + end + end) + end, + + -- Plugin log related configuration [PREFER NOT TO CHANGE THIS] + log = { + -- Where is the log file + -- filepath = utils.path_join(utils.is_windows, vim.fn.stdpath("state"), ("%s.log"):format(constants.PLUGIN_NAME)), + -- Level of logging + level = "info", + -- At what size, should we truncate the logs + max_size = 1024 * 1024 * 2, -- 2MB + }, })