From a61afa3889ef987332ba22b3adc322e37703dacd Mon Sep 17 00:00:00 2001 From: vogonwann Date: Fri, 6 Feb 2026 09:15:12 +0100 Subject: [PATCH] add neovim config --- dot_config/nvim/after/plugin/animate.lua | 11 + dot_config/nvim/after/plugin/bufferline.lua | 21 ++ dot_config/nvim/after/plugin/chatgpt.lua | 51 ++++ dot_config/nvim/after/plugin/cmp.lua | 50 ++++ dot_config/nvim/after/plugin/dap.lua | 80 ++++++ dot_config/nvim/after/plugin/dashboard.lua | 19 ++ dot_config/nvim/after/plugin/dressing.lua | 9 + dot_config/nvim/after/plugin/git-colors.lua | 43 +++ dot_config/nvim/after/plugin/gitsigns.lua | 10 + dot_config/nvim/after/plugin/indent.lua | 9 + dot_config/nvim/after/plugin/lualine.lua | 14 + dot_config/nvim/after/plugin/neoscroll.lua | 11 + dot_config/nvim/after/plugin/noice.lua | 53 ++++ dot_config/nvim/after/plugin/nvim-tree.lua | 59 ++++ dot_config/nvim/after/plugin/theme.lua | 18 ++ dot_config/nvim/after/plugin/toggleterm.lua | 51 ++++ dot_config/nvim/after/plugin/treesitter.lua | 12 + dot_config/nvim/after/plugin/whichkey.lua | 9 + dot_config/nvim/init.lua | 39 +++ dot_config/nvim/lua/core/keymaps.lua | 66 +++++ dot_config/nvim/lua/core/lsp.lua | 67 +++++ dot_config/nvim/lua/core/options.lua | 45 +++ dot_config/nvim/lua/lang/rust.lua | 101 +++++++ dot_config/nvim/lua/plugins.lua | 129 +++++++++ dot_config/nvim/plugin/packer_compiled.lua | 292 ++++++++++++++++++++ 25 files changed, 1269 insertions(+) create mode 100644 dot_config/nvim/after/plugin/animate.lua create mode 100644 dot_config/nvim/after/plugin/bufferline.lua create mode 100644 dot_config/nvim/after/plugin/chatgpt.lua create mode 100644 dot_config/nvim/after/plugin/cmp.lua create mode 100644 dot_config/nvim/after/plugin/dap.lua create mode 100644 dot_config/nvim/after/plugin/dashboard.lua create mode 100644 dot_config/nvim/after/plugin/dressing.lua create mode 100644 dot_config/nvim/after/plugin/git-colors.lua create mode 100644 dot_config/nvim/after/plugin/gitsigns.lua create mode 100644 dot_config/nvim/after/plugin/indent.lua create mode 100644 dot_config/nvim/after/plugin/lualine.lua create mode 100644 dot_config/nvim/after/plugin/neoscroll.lua create mode 100644 dot_config/nvim/after/plugin/noice.lua create mode 100644 dot_config/nvim/after/plugin/nvim-tree.lua create mode 100644 dot_config/nvim/after/plugin/theme.lua create mode 100644 dot_config/nvim/after/plugin/toggleterm.lua create mode 100644 dot_config/nvim/after/plugin/treesitter.lua create mode 100644 dot_config/nvim/after/plugin/whichkey.lua create mode 100644 dot_config/nvim/init.lua create mode 100644 dot_config/nvim/lua/core/keymaps.lua create mode 100644 dot_config/nvim/lua/core/lsp.lua create mode 100644 dot_config/nvim/lua/core/options.lua create mode 100644 dot_config/nvim/lua/lang/rust.lua create mode 100644 dot_config/nvim/lua/plugins.lua create mode 100644 dot_config/nvim/plugin/packer_compiled.lua diff --git a/dot_config/nvim/after/plugin/animate.lua b/dot_config/nvim/after/plugin/animate.lua new file mode 100644 index 0000000..fae35b5 --- /dev/null +++ b/dot_config/nvim/after/plugin/animate.lua @@ -0,0 +1,11 @@ +-- English comments only. + +local ok, animate = pcall(require, "mini.animate") +if not ok then return end + +animate.setup({ + -- Keep it subtle: enable cursor + scroll, disable resize/open/close if you want less motion + resize = { enable = false }, + open = { enable = false }, + close = { enable = false }, +}) diff --git a/dot_config/nvim/after/plugin/bufferline.lua b/dot_config/nvim/after/plugin/bufferline.lua new file mode 100644 index 0000000..b8144b5 --- /dev/null +++ b/dot_config/nvim/after/plugin/bufferline.lua @@ -0,0 +1,21 @@ +-- English comments only. + +local ok, bufferline = pcall(require, "bufferline") +if not ok then return end + +bufferline.setup({ + options = { + diagnostics = "nvim_lsp", + show_buffer_close_icons = true, + show_close_icon = false, + separator_style = "slant", + offsets = { + { + filetype = "NvimTree", + text = "File Explorer", + text_align = "left", + separator = true, + }, + }, + }, +}) diff --git a/dot_config/nvim/after/plugin/chatgpt.lua b/dot_config/nvim/after/plugin/chatgpt.lua new file mode 100644 index 0000000..bb3f49b --- /dev/null +++ b/dot_config/nvim/after/plugin/chatgpt.lua @@ -0,0 +1,51 @@ +-- English comments only. + +local ok, chatgpt = pcall(require, "chatgpt") +if not ok then return end + +chatgpt.setup({ + -- Personality + language + system_prompt = [[ +You are Burke, a senior software engineer and pragmatic coding assistant. +Always respond in Serbian (Cyrillic). +Be concise, direct, and practical. +If the user is casual or jokes, respond casually. +If the user asks about code, focus on actionable solutions, not theory. +When unsure, ask a short clarifying question. +]], + + -- Model choice: smart but not insane on cost + openai_params = { + model = "gpt-4.1", + max_tokens = 4096, + temperature = 0.4, + top_p = 1, + frequency_penalty = 0, + presence_penalty = 0, + }, + + -- UI / UX + popup_layout = { + default = "center", + center = { + width = "82%", + height = "82%", + }, + }, + + -- Terminal-safe keymaps + keymaps = { + close = { "" }, + submit = "", + }, + + -- Small quality-of-life tweaks + yank_register = "+", + edit_with_instructions = { + diff = true, -- show diff when modifying code + keymaps = { + accept = "", + reject = "", + }, + }, +}) diff --git a/dot_config/nvim/after/plugin/cmp.lua b/dot_config/nvim/after/plugin/cmp.lua new file mode 100644 index 0000000..507c01b --- /dev/null +++ b/dot_config/nvim/after/plugin/cmp.lua @@ -0,0 +1,50 @@ +-- English comments only. + +local ok_cmp, cmp = pcall(require, "cmp") +if not ok_cmp then + return +end + +local ok_snip, luasnip = pcall(require, "luasnip") +if not ok_snip then + return +end + +cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.confirm({ select = true }), + + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { "i", "s" }), + + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }), + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + }), +}) diff --git a/dot_config/nvim/after/plugin/dap.lua b/dot_config/nvim/after/plugin/dap.lua new file mode 100644 index 0000000..44c16f9 --- /dev/null +++ b/dot_config/nvim/after/plugin/dap.lua @@ -0,0 +1,80 @@ +-- English comments only. + +local ok_dap, dap = pcall(require, "dap") +if not ok_dap then return end + +local ok_dapui, dapui = pcall(require, "dapui") +if not ok_dapui then return end + +dapui.setup({ + layouts = { + { + elements = { + { id = "scopes", size = 0.35 }, + { id = "breakpoints", size = 0.20 }, + { id = "stacks", size = 0.25 }, + { id = "watches", size = 0.20 }, + }, + position = "left", + size = 45, + }, + { + elements = { + { id = "repl", size = 0.50 }, + { id = "console", size = 0.50 }, + }, + position = "bottom", + size = 12, + }, + }, +}) + +-- Auto open/close dapui +dap.listeners.after.event_initialized["dapui_config"] = function() + dapui.open() +end +dap.listeners.before.event_terminated["dapui_config"] = function() + dapui.close() +end +dap.listeners.before.event_exited["dapui_config"] = function() + dapui.close() +end + +-- Visible signs in gutter +vim.fn.sign_define("DapBreakpoint", { text = "●", texthl = "DiagnosticError" }) +vim.fn.sign_define("DapBreakpointCondition", { text = "◆", texthl = "DiagnosticWarn" }) +vim.fn.sign_define("DapLogPoint", { text = "◆", texthl = "DiagnosticInfo" }) +vim.fn.sign_define("DapStopped", { text = "▶", texthl = "DiagnosticOk" }) + +-- Keymaps +vim.keymap.set("n", "", dap.continue, { desc = "DAP continue" }) +vim.keymap.set("n", "", dap.step_over, { desc = "DAP step over" }) +vim.keymap.set("n", "", dap.step_into, { desc = "DAP step into" }) +vim.keymap.set("n", "", dap.step_out, { desc = "DAP step out" }) + +vim.keymap.set("n", "db", dap.toggle_breakpoint, { desc = "DAP toggle breakpoint" }) +vim.keymap.set("n", "dB", function() + dap.set_breakpoint(vim.fn.input("Breakpoint condition: ")) +end, { desc = "DAP conditional breakpoint" }) + +vim.keymap.set("n", "dc", dap.clear_breakpoints, { desc = "DAP clear breakpoints" }) +vim.keymap.set("n", "dl", function() + dap.run_last() +end, { desc = "DAP run last" }) + +vim.keymap.set("n", "dr", dap.repl.open, { desc = "DAP REPL" }) +vim.keymap.set("n", "du", dapui.toggle, { desc = "DAP UI toggle" }) + +-- Evaluate helpers +vim.keymap.set("n", "de", function() + dapui.eval() +end, { desc = "DAP eval under cursor" }) + +vim.keymap.set("v", "de", function() + dapui.eval() +end, { desc = "DAP eval selection" }) + +-- Optional: hover to eval during debug (nice IDE behavior) +vim.keymap.set("n", "dh", function() + dapui.eval() +end, { desc = "DAP hover eval" }) diff --git a/dot_config/nvim/after/plugin/dashboard.lua b/dot_config/nvim/after/plugin/dashboard.lua new file mode 100644 index 0000000..a8bef41 --- /dev/null +++ b/dot_config/nvim/after/plugin/dashboard.lua @@ -0,0 +1,19 @@ +-- English comments only. + +local ok, db = pcall(require, "dashboard") +if not ok then return end + +db.setup({ + theme = "hyper", + config = { + week_header = { enable = true }, + shortcut = { + { desc = "Files", group = "Label", key = "f", action = "Telescope find_files" }, + { desc = "Grep", group = "Label", key = "g", action = "Telescope live_grep" }, + { desc = "Config", group = "Label", key = "c", action = "edit ~/.config/nvim/init.lua" }, + { desc = "Quit", group = "Label", key = "q", action = "qa" }, + }, + project = { enable = true, limit = 8 }, + mru = { limit = 10 }, + }, +}) diff --git a/dot_config/nvim/after/plugin/dressing.lua b/dot_config/nvim/after/plugin/dressing.lua new file mode 100644 index 0000000..f007558 --- /dev/null +++ b/dot_config/nvim/after/plugin/dressing.lua @@ -0,0 +1,9 @@ +-- English comments only. + +local ok, dressing = pcall(require, "dressing") +if not ok then return end + +dressing.setup({ + input = { border = "rounded" }, + select = { backend = { "telescope", "builtin" } }, +}) diff --git a/dot_config/nvim/after/plugin/git-colors.lua b/dot_config/nvim/after/plugin/git-colors.lua new file mode 100644 index 0000000..dd50c2d --- /dev/null +++ b/dot_config/nvim/after/plugin/git-colors.lua @@ -0,0 +1,43 @@ +-- English comments only. + +local function set_hl(group, opts) + vim.api.nvim_set_hl(0, group, opts) +end + +local ok, tn = pcall(require, "tokyonight.colors") +if not ok then + -- Fallback links + set_hl("NvimTreeGitDirty", { link = "DiagnosticWarn" }) + set_hl("NvimTreeGitNew", { link = "DiagnosticHint" }) + set_hl("NvimTreeGitStaged", { link = "DiagnosticOk" }) + set_hl("NvimTreeGitDeleted", { link = "DiagnosticError" }) + set_hl("NvimTreeGitRenamed", { link = "DiagnosticInfo" }) + set_hl("NvimTreeGitIgnored", { link = "Comment" }) + + set_hl("GitSignsAdd", { link = "DiagnosticOk" }) + set_hl("GitSignsChange", { link = "DiagnosticWarn" }) + set_hl("GitSignsDelete", { link = "DiagnosticError" }) + return +end + +local c = tn.setup() + +-- Nvim-tree git highlights (strong + readable) +set_hl("NvimTreeGitDirty", { fg = c.yellow, bold = true }) -- modified +set_hl("NvimTreeGitNew", { fg = c.green, bold = true }) -- untracked/new +set_hl("NvimTreeGitStaged", { fg = c.green, bold = true }) -- staged +set_hl("NvimTreeGitDeleted", { fg = c.red, bold = true }) -- deleted +set_hl("NvimTreeGitRenamed", { fg = c.blue, bold = true, italic = true }) -- renamed +set_hl("NvimTreeGitMerged", { fg = c.magenta, bold = true, italic = true }) -- merged/unmerged flavor + +-- Ignored: dim / almost invisible +-- blend makes it translucent (works best in GUIs/truecolor terminals) +set_hl("NvimTreeGitIgnored", { fg = c.comment, italic = true, blend = 70 }) + +-- GitSigns gutter to match (clean VS vibe) +set_hl("GitSignsAdd", { fg = c.green, bold = true }) +set_hl("GitSignsChange", { fg = c.yellow, bold = true }) +set_hl("GitSignsDelete", { fg = c.red, bold = true }) + +-- Also make blame text subtle if you enabled it +set_hl("GitSignsCurrentLineBlame", { fg = c.comment, italic = true }) diff --git a/dot_config/nvim/after/plugin/gitsigns.lua b/dot_config/nvim/after/plugin/gitsigns.lua new file mode 100644 index 0000000..bb292b5 --- /dev/null +++ b/dot_config/nvim/after/plugin/gitsigns.lua @@ -0,0 +1,10 @@ +-- English comments only. + +local ok, gitsigns = pcall(require, "gitsigns") +if not ok then return end + +gitsigns.setup({ + signcolumn = true, + current_line_blame = true, + current_line_blame_opts = { delay = 500 }, +}) diff --git a/dot_config/nvim/after/plugin/indent.lua b/dot_config/nvim/after/plugin/indent.lua new file mode 100644 index 0000000..1c45ce0 --- /dev/null +++ b/dot_config/nvim/after/plugin/indent.lua @@ -0,0 +1,9 @@ +-- English comments only. + +local ok, ibl = pcall(require, "ibl") +if not ok then return end + +ibl.setup({ + indent = { char = "▏" }, + scope = { enabled = true }, +}) diff --git a/dot_config/nvim/after/plugin/lualine.lua b/dot_config/nvim/after/plugin/lualine.lua new file mode 100644 index 0000000..4d3bb87 --- /dev/null +++ b/dot_config/nvim/after/plugin/lualine.lua @@ -0,0 +1,14 @@ +-- English comments only. + +local ok, lualine = pcall(require, "lualine") +if not ok then return end + +lualine.setup({ + options = { + theme = "tokyonight", + icons_enabled = true, + section_separators = { left = "", right = "" }, + component_separators = { left = "", right = "" }, + globalstatus = true, + }, +}) diff --git a/dot_config/nvim/after/plugin/neoscroll.lua b/dot_config/nvim/after/plugin/neoscroll.lua new file mode 100644 index 0000000..fd70a9b --- /dev/null +++ b/dot_config/nvim/after/plugin/neoscroll.lua @@ -0,0 +1,11 @@ +-- English comments only. + +local ok, neoscroll = pcall(require, "neoscroll") +if not ok then return end + +neoscroll.setup({ + mappings = { "", "", "", "", "zt", "zz", "zb" }, + hide_cursor = true, + stop_eof = true, + respect_scrolloff = true, +}) diff --git a/dot_config/nvim/after/plugin/noice.lua b/dot_config/nvim/after/plugin/noice.lua new file mode 100644 index 0000000..557509a --- /dev/null +++ b/dot_config/nvim/after/plugin/noice.lua @@ -0,0 +1,53 @@ +-- English comments only. + +local ok_notify, notify = pcall(require, "notify") +if ok_notify then + notify.setup({ + stages = "fade_in_slide_out", + timeout = 2000, + render = "wrapped-compact", + }) + vim.notify = notify +end + +local ok_noice, noice = pcall(require, "noice") +if not ok_noice then return end + +noice.setup({ + presets = { + bottom_search = true, + command_palette = true, + long_message_to_split = true, + inc_rename = false, + lsp_doc_border = true, + }, + + cmdline = { + enabled = true, + view = "cmdline_popup", + format = { + -- Force / to use the popup view + search_down = { + kind = "search", + pattern = "^/", + icon = " ", + lang = "regex", + view = "cmdline_popup", + }, + -- Force ? to use the popup view as well + search_up = { + kind = "search", + pattern = "^%?", + icon = " ", + lang = "regex", + view = "cmdline_popup", + }, + }, + }, + + lsp = { + progress = { enabled = true }, + hover = { enabled = true }, + signature = { enabled = true }, + }, +}) diff --git a/dot_config/nvim/after/plugin/nvim-tree.lua b/dot_config/nvim/after/plugin/nvim-tree.lua new file mode 100644 index 0000000..86c5709 --- /dev/null +++ b/dot_config/nvim/after/plugin/nvim-tree.lua @@ -0,0 +1,59 @@ +-- English comments only. +local ok, nvimtree = pcall(require, "nvim-tree") +if not ok then + return +end + +nvimtree.setup({ + disable_netrw = true, + hijack_netrw = true, + + view = { + width = 32, + side = "left", + preserve_window_proportions = true + }, + + renderer = { + root_folder_label = false, + highlight_git = true, + highlight_opened_files = "name", + icons = { + show = { + file = true, + folder = true, + folder_arrow = true, + git = true + }, + glyphs = { + git = { + unstaged = "✗", -- modified + staged = "✓", + untracked = "★", + renamed = "➜", + deleted = "", + ignored = "◌", + unmerged = "" + } + } + } + }, + + git = { + enable = true, + ignore = false, + show_on_dirs = true, + show_on_open_dirs = true + }, + + filters = { + dotfiles = false + }, + + actions = { + open_file = { + quit_on_open = false, -- keep tree open like VS Code + resize_window = true + } + } +}) diff --git a/dot_config/nvim/after/plugin/theme.lua b/dot_config/nvim/after/plugin/theme.lua new file mode 100644 index 0000000..1cd3428 --- /dev/null +++ b/dot_config/nvim/after/plugin/theme.lua @@ -0,0 +1,18 @@ +-- English comments only. + +vim.opt.termguicolors = true + +-- TokyoNight config +require("tokyonight").setup({ + style = "night", + transparent = false, + terminal_colors = true, + styles = { + comments = { italic = true }, + keywords = { italic = false }, + functions = {}, + variables = {}, + }, +}) + +vim.cmd.colorscheme("tokyonight") diff --git a/dot_config/nvim/after/plugin/toggleterm.lua b/dot_config/nvim/after/plugin/toggleterm.lua new file mode 100644 index 0000000..0ab4e75 --- /dev/null +++ b/dot_config/nvim/after/plugin/toggleterm.lua @@ -0,0 +1,51 @@ +-- English comments only. + +local ok, toggleterm = pcall(require, "toggleterm") +if not ok then + return +end + +toggleterm.setup({ + open_mapping = [[]], -- Ctrl + \ + direction = "float", -- "horizontal" | "vertical" | "tab" | "float" + close_on_exit = true, + start_in_insert = true, + shade_terminals = true, + float_opts = { + border = "rounded", + }, +}) + +-- Terminal mode keymaps (quality of life) +function _G.set_terminal_keymaps() + local opts = { buffer = 0, silent = true } + -- Exit terminal insert mode + vim.keymap.set("t", "", [[]], opts) + -- Navigate windows from terminal + vim.keymap.set("t", "", [[h]], opts) + vim.keymap.set("t", "", [[j]], opts) + vim.keymap.set("t", "", [[k]], opts) + vim.keymap.set("t", "", [[l]], opts) +end + +vim.cmd([[autocmd! TermOpen term://* lua set_terminal_keymaps()]]) + +-- LazyGit terminal + +local ok_term, Term = pcall(require, "toggleterm.terminal") +if not ok_term then + return +end + +local lazygit = Term.Terminal:new({ + cmd = "lazygit", + hidden = true, + direction = "float", + float_opts = { border = "rounded" }, +}) + +function _G.LazygitToggle() + lazygit:toggle() +end + +vim.keymap.set("n", "gg", "lua LazygitToggle()", { silent = true, desc = "LazyGit" }) diff --git a/dot_config/nvim/after/plugin/treesitter.lua b/dot_config/nvim/after/plugin/treesitter.lua new file mode 100644 index 0000000..24b1969 --- /dev/null +++ b/dot_config/nvim/after/plugin/treesitter.lua @@ -0,0 +1,12 @@ +-- English comments only. + +local ok, configs = pcall(require, "nvim-treesitter.configs") +if not ok then + return +end + +configs.setup({ + ensure_installed = { "lua", "vim", "vimdoc", "rust", "toml", "json" }, + highlight = { enable = true }, + indent = { enable = true }, +}) diff --git a/dot_config/nvim/after/plugin/whichkey.lua b/dot_config/nvim/after/plugin/whichkey.lua new file mode 100644 index 0000000..beb021a --- /dev/null +++ b/dot_config/nvim/after/plugin/whichkey.lua @@ -0,0 +1,9 @@ +-- English comments only. + +local ok, wk = pcall(require, "which-key") +if not ok then return end + +wk.setup({ + plugins = { spelling = true }, + window = { border = "rounded" }, +}) diff --git a/dot_config/nvim/init.lua b/dot_config/nvim/init.lua new file mode 100644 index 0000000..ea73799 --- /dev/null +++ b/dot_config/nvim/init.lua @@ -0,0 +1,39 @@ +-- English comments only. + +-- Bootstrap packer.nvim if not installed +local ensure_packer = function() + local fn = vim.fn + local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" + + if fn.empty(fn.glob(install_path)) > 0 then + fn.system({ + "git", + "clone", + "--depth", + "1", + "https://github.com/wbthomason/packer.nvim", + install_path, + }) + vim.cmd("packadd packer.nvim") + return true + end + + return false +end + +local packer_bootstrap = ensure_packer() + +-- Load core config +require("core.options") +require("core.keymaps") +require("core.lsp") +require("lang.rust") + + +-- Load plugins (packer startup) +require("plugins") + +-- If packer was just installed, sync plugins once +if packer_bootstrap then + require("packer").sync() +end diff --git a/dot_config/nvim/lua/core/keymaps.lua b/dot_config/nvim/lua/core/keymaps.lua new file mode 100644 index 0000000..f554a46 --- /dev/null +++ b/dot_config/nvim/lua/core/keymaps.lua @@ -0,0 +1,66 @@ +-- English comments only. + +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +local keymap = vim.keymap.set +local opts = { silent = true } + +-- Basic +keymap("n", "w", ":w", opts) +keymap("n", "q", ":q", opts) + +-- Better window navigation +keymap("n", "", "h", opts) +keymap("n", "", "j", opts) +keymap("n", "", "k", opts) +keymap("n", "", "l", opts) + +-- Resize splits +keymap("n", "", ":resize -2", opts) +keymap("n", "", ":resize +2", opts) +keymap("n", "", ":vertical resize -2", opts) +keymap("n", "", ":vertical resize +2", opts) + +-- Clear search highlight +keymap("n", "h", ":nohlsearch", opts) + +-- Telescope +keymap("n", "ff", "Telescope find_files", opts) +keymap("n", "fg", "Telescope live_grep", opts) +keymap("n", "fb", "Telescope buffers", opts) +keymap("n", "fh", "Telescope help_tags", opts) + +-- Trouble +keymap("n", "xx", "TroubleToggle", opts) + +vim.keymap.set("n", "", ":BufferLineCycleNext", { silent = true, desc = "Next buffer" }) +vim.keymap.set("n", "", ":BufferLineCyclePrev", { silent = true, desc = "Prev buffer" }) +vim.keymap.set("n", "bd", ":bdelete", { silent = true, desc = "Delete buffer" }) + +-- English comments only. + +local tb = require("telescope.builtin") + +-- LSP via Telescope (IDE-like) +vim.keymap.set("n", "gd", tb.lsp_definitions, { silent = true, desc = "LSP definitions" }) +vim.keymap.set("n", "gr", tb.lsp_references, { silent = true, desc = "LSP references" }) +vim.keymap.set("n", "gi", tb.lsp_implementations, { silent = true, desc = "LSP implementations" }) +vim.keymap.set("n", "gt", tb.lsp_type_definitions, { silent = true, desc = "LSP type definitions" }) + +vim.keymap.set("n", "ss", tb.lsp_document_symbols, { silent = true, desc = "Document symbols" }) +vim.keymap.set("n", "sS", tb.lsp_workspace_symbols, { silent = true, desc = "Workspace symbols" }) + +vim.keymap.set("n", "sd", tb.diagnostics, { silent = true, desc = "Diagnostics (Telescope)" }) + +-- ChatGPT +vim.keymap.set("n", "cc", "ChatGPT", { desc = "ChatGPT" }) +vim.keymap.set("n", "ce", "ChatGPTExplain", { desc = "Explain code" }) +vim.keymap.set("n", "cf", "ChatGPTFix", { desc = "Fix code" }) +vim.keymap.set("n", "co", "ChatGPTOptimize", { desc = "Optimize code" }) +vim.keymap.set("n", "ct", "ChatGPTTests", { desc = "Generate tests" }) + +vim.keymap.set("v", "ce", "ChatGPTExplain", { desc = "Explain selection" }) +vim.keymap.set("v", "cf", "ChatGPTFix", { desc = "Fix selection" }) +vim.keymap.set("v", "co", "ChatGPTOptimize", { desc = "Optimize selection" }) + diff --git a/dot_config/nvim/lua/core/lsp.lua b/dot_config/nvim/lua/core/lsp.lua new file mode 100644 index 0000000..2001fec --- /dev/null +++ b/dot_config/nvim/lua/core/lsp.lua @@ -0,0 +1,67 @@ +-- English comments only. +-- LSP capabilities for completion +local capabilities = require("cmp_nvim_lsp").default_capabilities() + +-- Shared on_attach (LSP keymaps) +local on_attach = function(_, bufnr) + local opts = { + buffer = bufnr, + silent = true + } + + vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts) + vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts) + vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts) + vim.keymap.set("n", "gr", vim.lsp.buf.references, opts) + + vim.keymap.set("n", "K", vim.lsp.buf.hover, opts) + vim.keymap.set("n", "rn", vim.lsp.buf.rename, opts) + vim.keymap.set("n", "ca", vim.lsp.buf.code_action, opts) + + vim.keymap.set("n", "ds", vim.lsp.buf.document_symbol, opts) + vim.keymap.set("n", "ws", vim.lsp.buf.workspace_symbol, opts) + + vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) + vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts) + vim.keymap.set("n", "e", vim.diagnostic.open_float, opts) + vim.keymap.set("n", "dl", vim.diagnostic.setloclist, opts) + + vim.keymap.set("n", "f", function() + vim.lsp.buf.format({ + async = true + }) + end, opts) +end + +-- Better diagnostics UI defaults +vim.diagnostic.config({ + virtual_text = true, + signs = true, + underline = true, + update_in_insert = false, + severity_sort = true, + float = { + border = "rounded" + } +}) + +-- Neovim 0.11+ API: configure + enable +-- See :help lspconfig-nvim-0.11 +vim.lsp.config("rust_analyzer", { + capabilities = capabilities, + on_attach = on_attach, + settings = { + ["rust-analyzer"] = { + checkOnSave = true, + check = { + command = "clippy" + }, + cargo = { + allFeatures = true + } + } + + } +}) + +vim.lsp.enable({"rust_analyzer"}) diff --git a/dot_config/nvim/lua/core/options.lua b/dot_config/nvim/lua/core/options.lua new file mode 100644 index 0000000..b3e7615 --- /dev/null +++ b/dot_config/nvim/lua/core/options.lua @@ -0,0 +1,45 @@ +-- English comments only. + +local opt = vim.opt + +-- General +opt.encoding = "utf-8" +opt.mouse = "a" +opt.clipboard = "unnamedplus" +opt.swapfile = false +opt.backup = false +opt.undofile = true +opt.hidden = true + +-- UI +opt.number = true +opt.relativenumber = true +opt.cursorline = true +opt.termguicolors = true +opt.signcolumn = "yes" +opt.wrap = false +opt.scrolloff = 8 +opt.sidescrolloff = 8 + +-- Splits +opt.splitbelow = true +opt.splitright = true + +-- Tabs / Indent +opt.expandtab = true +opt.tabstop = 2 +opt.shiftwidth = 2 +opt.smartindent = true + +-- Search +opt.ignorecase = true +opt.smartcase = true +opt.incsearch = true +opt.hlsearch = false + +-- Performance +opt.updatetime = 300 +opt.timeoutlen = 500 + +-- Better completion menu +opt.completeopt = { "menu", "menuone", "noselect" } diff --git a/dot_config/nvim/lua/lang/rust.lua b/dot_config/nvim/lua/lang/rust.lua new file mode 100644 index 0000000..1062aa9 --- /dev/null +++ b/dot_config/nvim/lua/lang/rust.lua @@ -0,0 +1,101 @@ +-- English comments only. + +-- ========================= +-- Formatting (Conform) +-- ========================= +local ok_conform, conform = pcall(require, "conform") +if ok_conform then + conform.setup({ + formatters_by_ft = { + rust = { "rustfmt" }, + }, + format_on_save = function(_) + return { timeout_ms = 2000, lsp_fallback = true } + end, + }) +end + +vim.keymap.set("n", "rf", function() + if ok_conform then + conform.format({ timeout_ms = 2000, lsp_fallback = true }) + else + vim.lsp.buf.format({ async = true }) + end +end, { desc = "Rust format" }) + +-- ========================= +-- Cargo -> Quickfix +-- ========================= +local function cargo_to_quickfix(cmd) + local output = vim.fn.systemlist(cmd) + vim.fn.setqflist({}, " ", { title = cmd, lines = output }) + vim.cmd("copen") +end + +vim.keymap.set("n", "rr", function() cargo_to_quickfix("cargo run") end, { desc = "Cargo run (quickfix)" }) +vim.keymap.set("n", "rt", function() cargo_to_quickfix("cargo test") end, { desc = "Cargo test (quickfix)" }) +vim.keymap.set("n", "rc", function() cargo_to_quickfix("cargo check") end, { desc = "Cargo check (quickfix)" }) +vim.keymap.set("n", "rl", function() cargo_to_quickfix("cargo clippy") end, { desc = "Cargo clippy (quickfix)" }) +vim.keymap.set("n", "rb", function() cargo_to_quickfix("cargo build") end, { desc = "Cargo build (quickfix)" }) + +-- ========================= +-- DAP (Rust adapter + configurations) +-- ========================= +local ok_dap, dap = pcall(require, "dap") +if not ok_dap then + return +end + +local function rust_default_binary() + -- Try to read package name from Cargo.toml (common single-crate case). + local cargo_toml = vim.fn.getcwd() .. "/Cargo.toml" + if vim.fn.filereadable(cargo_toml) == 1 then + for _, line in ipairs(vim.fn.readfile(cargo_toml)) do + local name = line:match('^name%s*=%s*"(.-)"') + if name then + return vim.fn.getcwd() .. "/target/debug/" .. name + end + end + end + return vim.fn.getcwd() .. "/target/debug/" +end + +-- codelldb adapter (installed via Mason) +local mason_path = vim.fn.stdpath("data") .. "/mason" +local codelldb_path = mason_path .. "/packages/codelldb/extension/adapter/codelldb" + +dap.adapters.codelldb = { + type = "server", + port = "${port}", + executable = { + command = codelldb_path, + args = { "--port", "${port}" }, + }, +} + +dap.configurations.rust = { + { + name = "Debug (default binary)", + type = "codelldb", + request = "launch", + program = function() + local default_path = rust_default_binary() + return vim.fn.input("Path to executable: ", default_path, "file") + end, + cwd = "${workspaceFolder}", + stopOnEntry = false, + }, + { + name = "Debug tests (cargo test)", + type = "codelldb", + request = "launch", + -- This runs the test binary; you'll pick it once, then you can use dl (run last). + program = function() + -- Tip: run `cargo test --no-run` once, then pick the produced test binary. + local default_path = vim.fn.getcwd() .. "/target/debug/deps/" + return vim.fn.input("Path to test executable: ", default_path, "file") + end, + cwd = "${workspaceFolder}", + stopOnEntry = false, + }, +} diff --git a/dot_config/nvim/lua/plugins.lua b/dot_config/nvim/lua/plugins.lua new file mode 100644 index 0000000..f4a2208 --- /dev/null +++ b/dot_config/nvim/lua/plugins.lua @@ -0,0 +1,129 @@ +-- English comments only. +vim.cmd([[packadd packer.nvim]]) + +return require("packer").startup(function(use) + -- Packer can manage itself + use("wbthomason/packer.nvim") + + -- LSP + use("neovim/nvim-lspconfig") + + -- Mason (LSP/DAP/formatters installer) + use({ + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end + }) + + use({ + "williamboman/mason-lspconfig.nvim", + after = "mason.nvim", + config = function() + require("mason-lspconfig").setup({ + ensure_installed = {"rust_analyzer" -- Add more later: "ts_ls", "gopls", "pyright", ... + }, + automatic_installation = true + }) + end + }) + + -- Autocomplete + use("hrsh7th/nvim-cmp") + use("hrsh7th/cmp-nvim-lsp") + use("L3MON4D3/LuaSnip") + + -- Treesitter + use({ + "nvim-treesitter/nvim-treesitter", + run = function() + pcall(vim.cmd, "TSUpdate") + end + }) + + -- Telescope + use({ + "nvim-telescope/telescope.nvim", + requires = {"nvim-lua/plenary.nvim"}, + config = function() + require("telescope").setup({}) + end + }) + + -- Trouble (diagnostics list) + use({ + "folke/trouble.nvim", + requires = {"nvim-tree/nvim-web-devicons"}, + config = function() + require("trouble").setup({}) + end + }) + + -- Formatting (conform) + use({"stevearc/conform.nvim"}) + + -- Debugging + -- Debugging + use("mfussenegger/nvim-dap") + + use({ + "rcarriga/nvim-dap-ui", + requires = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" -- REQUIRED dependency + }, + config = function() + require("dapui").setup() + end + }) + + -- Optional icons (used by trouble/telescope) + use("nvim-tree/nvim-web-devicons") + + -- Eye candy + use("folke/tokyonight.nvim") + use("nvim-lualine/lualine.nvim") + use("lewis6991/gitsigns.nvim") + use("lukas-reineke/indent-blankline.nvim") + use("stevearc/dressing.nvim") + + use({ + "akinsho/bufferline.nvim", + tag = "*", + requires = {"nvim-tree/nvim-web-devicons"} + }) + + use("MunifTanjim/nui.nvim") + + use({"rcarriga/nvim-notify"}) + + use({ + "folke/noice.nvim", + requires = {"MunifTanjim/nui.nvim", "rcarriga/nvim-notify"} + }) + + use({ + "nvimdev/dashboard-nvim", + requires = {"nvim-tree/nvim-web-devicons"} + }) + + use("folke/which-key.nvim") + + use("karb94/neoscroll.nvim") + use("echasnovski/mini.animate") + + use({ + "nvim-tree/nvim-tree.lua", + requires = {"nvim-tree/nvim-web-devicons"} + }) + + use({ + "akinsho/toggleterm.nvim", + tag = "*" + }) + + use({ + "jackMort/ChatGPT.nvim", + requires = {"MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim"} + }) + + use("github/copilot.vim") +end) diff --git a/dot_config/nvim/plugin/packer_compiled.lua b/dot_config/nvim/plugin/packer_compiled.lua new file mode 100644 index 0000000..071ea82 --- /dev/null +++ b/dot_config/nvim/plugin/packer_compiled.lua @@ -0,0 +1,292 @@ +-- Automatically generated packer.nvim plugin loader code + +if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then + vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') + return +end + +vim.api.nvim_command('packadd packer.nvim') + +local no_errors, error_msg = pcall(function() + +_G._packer = _G._packer or {} +_G._packer.inside_compile = true + +local time +local profile_info +local should_profile = false +if should_profile then + local hrtime = vim.loop.hrtime + profile_info = {} + time = function(chunk, start) + if start then + profile_info[chunk] = hrtime() + else + profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 + end + end +else + time = function(chunk, start) end +end + +local function save_profiles(threshold) + local sorted_times = {} + for chunk_name, time_taken in pairs(profile_info) do + sorted_times[#sorted_times + 1] = {chunk_name, time_taken} + end + table.sort(sorted_times, function(a, b) return a[2] > b[2] end) + local results = {} + for i, elem in ipairs(sorted_times) do + if not threshold or threshold and elem[2] > threshold then + results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' + end + end + if threshold then + table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') + end + + _G._packer.profile_output = results +end + +time([[Luarocks path setup]], true) +local package_path_str = "/home/wann/.cache/nvim/packer_hererocks/2.1.1767980792/share/lua/5.1/?.lua;/home/wann/.cache/nvim/packer_hererocks/2.1.1767980792/share/lua/5.1/?/init.lua;/home/wann/.cache/nvim/packer_hererocks/2.1.1767980792/lib/luarocks/rocks-5.1/?.lua;/home/wann/.cache/nvim/packer_hererocks/2.1.1767980792/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/wann/.cache/nvim/packer_hererocks/2.1.1767980792/lib/lua/5.1/?.so" +if not string.find(package.path, package_path_str, 1, true) then + package.path = package.path .. ';' .. package_path_str +end + +if not string.find(package.cpath, install_cpath_pattern, 1, true) then + package.cpath = package.cpath .. ';' .. install_cpath_pattern +end + +time([[Luarocks path setup]], false) +time([[try_loadstring definition]], true) +local function try_loadstring(s, component, name) + local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) + if not success then + vim.schedule(function() + vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) + end) + end + return result +end + +time([[try_loadstring definition]], false) +time([[Defining packer_plugins]], true) +_G.packer_plugins = { + ["ChatGPT.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/ChatGPT.nvim", + url = "https://github.com/jackMort/ChatGPT.nvim" + }, + LuaSnip = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/LuaSnip", + url = "https://github.com/L3MON4D3/LuaSnip" + }, + ["bufferline.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/bufferline.nvim", + url = "https://github.com/akinsho/bufferline.nvim" + }, + ["cmp-nvim-lsp"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", + url = "https://github.com/hrsh7th/cmp-nvim-lsp" + }, + ["conform.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/conform.nvim", + url = "https://github.com/stevearc/conform.nvim" + }, + ["copilot.vim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/copilot.vim", + url = "https://github.com/github/copilot.vim" + }, + ["dashboard-nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/dashboard-nvim", + url = "https://github.com/nvimdev/dashboard-nvim" + }, + ["dressing.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/dressing.nvim", + url = "https://github.com/stevearc/dressing.nvim" + }, + ["gitsigns.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", + url = "https://github.com/lewis6991/gitsigns.nvim" + }, + ["indent-blankline.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/indent-blankline.nvim", + url = "https://github.com/lukas-reineke/indent-blankline.nvim" + }, + ["lualine.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/lualine.nvim", + url = "https://github.com/nvim-lualine/lualine.nvim" + }, + ["mason-lspconfig.nvim"] = { + config = { "\27LJ\2\n\1\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0005\3\3\0=\3\5\2B\0\2\1K\0\1\0\21ensure_installed\1\0\2\27automatic_installation\2\21ensure_installed\0\1\2\0\0\18rust_analyzer\nsetup\20mason-lspconfig\frequire\0" }, + load_after = {}, + loaded = true, + needs_bufread = false, + path = "/home/wann/.local/share/nvim/site/pack/packer/opt/mason-lspconfig.nvim", + url = "https://github.com/williamboman/mason-lspconfig.nvim" + }, + ["mason.nvim"] = { + after = { "mason-lspconfig.nvim" }, + config = { "\27LJ\2\n3\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\nmason\frequire\0" }, + loaded = true, + only_config = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/mason.nvim", + url = "https://github.com/williamboman/mason.nvim" + }, + ["mini.animate"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/mini.animate", + url = "https://github.com/echasnovski/mini.animate" + }, + ["neoscroll.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/neoscroll.nvim", + url = "https://github.com/karb94/neoscroll.nvim" + }, + ["noice.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/noice.nvim", + url = "https://github.com/folke/noice.nvim" + }, + ["nui.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/nui.nvim", + url = "https://github.com/MunifTanjim/nui.nvim" + }, + ["nvim-cmp"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/nvim-cmp", + url = "https://github.com/hrsh7th/nvim-cmp" + }, + ["nvim-dap"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/nvim-dap", + url = "https://github.com/mfussenegger/nvim-dap" + }, + ["nvim-dap-ui"] = { + config = { "\27LJ\2\n3\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\ndapui\frequire\0" }, + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/nvim-dap-ui", + url = "https://github.com/rcarriga/nvim-dap-ui" + }, + ["nvim-lspconfig"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", + url = "https://github.com/neovim/nvim-lspconfig" + }, + ["nvim-nio"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/nvim-nio", + url = "https://github.com/nvim-neotest/nvim-nio" + }, + ["nvim-notify"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/nvim-notify", + url = "https://github.com/rcarriga/nvim-notify" + }, + ["nvim-tree.lua"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", + url = "https://github.com/nvim-tree/nvim-tree.lua" + }, + ["nvim-treesitter"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/nvim-treesitter", + url = "https://github.com/nvim-treesitter/nvim-treesitter" + }, + ["nvim-web-devicons"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", + url = "https://github.com/nvim-tree/nvim-web-devicons" + }, + ["packer.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/packer.nvim", + url = "https://github.com/wbthomason/packer.nvim" + }, + ["plenary.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/plenary.nvim", + url = "https://github.com/nvim-lua/plenary.nvim" + }, + ["telescope.nvim"] = { + config = { "\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14telescope\frequire\0" }, + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/telescope.nvim", + url = "https://github.com/nvim-telescope/telescope.nvim" + }, + ["toggleterm.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/toggleterm.nvim", + url = "https://github.com/akinsho/toggleterm.nvim" + }, + ["tokyonight.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/tokyonight.nvim", + url = "https://github.com/folke/tokyonight.nvim" + }, + ["trouble.nvim"] = { + config = { "\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\ftrouble\frequire\0" }, + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/trouble.nvim", + url = "https://github.com/folke/trouble.nvim" + }, + ["which-key.nvim"] = { + loaded = true, + path = "/home/wann/.local/share/nvim/site/pack/packer/start/which-key.nvim", + url = "https://github.com/folke/which-key.nvim" + } +} + +time([[Defining packer_plugins]], false) +-- Config for: telescope.nvim +time([[Config for telescope.nvim]], true) +try_loadstring("\27LJ\2\n;\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\14telescope\frequire\0", "config", "telescope.nvim") +time([[Config for telescope.nvim]], false) +-- Config for: nvim-dap-ui +time([[Config for nvim-dap-ui]], true) +try_loadstring("\27LJ\2\n3\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\ndapui\frequire\0", "config", "nvim-dap-ui") +time([[Config for nvim-dap-ui]], false) +-- Config for: mason.nvim +time([[Config for mason.nvim]], true) +try_loadstring("\27LJ\2\n3\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\nmason\frequire\0", "config", "mason.nvim") +time([[Config for mason.nvim]], false) +-- Config for: trouble.nvim +time([[Config for trouble.nvim]], true) +try_loadstring("\27LJ\2\n9\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\ftrouble\frequire\0", "config", "trouble.nvim") +time([[Config for trouble.nvim]], false) +-- Load plugins in order defined by `after` +time([[Sequenced loading]], true) +vim.cmd [[ packadd mason-lspconfig.nvim ]] + +-- Config for: mason-lspconfig.nvim +try_loadstring("\27LJ\2\n\1\0\0\4\0\6\0\t6\0\0\0'\2\1\0B\0\2\0029\0\2\0005\2\4\0005\3\3\0=\3\5\2B\0\2\1K\0\1\0\21ensure_installed\1\0\2\27automatic_installation\2\21ensure_installed\0\1\2\0\0\18rust_analyzer\nsetup\20mason-lspconfig\frequire\0", "config", "mason-lspconfig.nvim") + +time([[Sequenced loading]], false) + +_G._packer.inside_compile = false +if _G._packer.needs_bufread == true then + vim.cmd("doautocmd BufRead") +end +_G._packer.needs_bufread = false + +if should_profile then save_profiles() end + +end) + +if not no_errors then + error_msg = error_msg:gsub('"', '\\"') + vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') +end