diff --git a/fastfetch/ascii/cat.txt b/fastfetch/ascii/cat.txt new file mode 100644 index 0000000..8f59de4 --- /dev/null +++ b/fastfetch/ascii/cat.txt @@ -0,0 +1,14 @@ + /\___/\ + ) ( + =\ /= + ) ( + / \ + ) ( + / \ + \ / + \__ __/ + )) + // + (( + \) + diff --git a/fastfetch/config.jsonc b/fastfetch/config.jsonc new file mode 100644 index 0000000..cd28579 --- /dev/null +++ b/fastfetch/config.jsonc @@ -0,0 +1,75 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/master/doc/json_schema.json", + "logo": { + "source": "~/.config/fastfetch/image/cam.png", + "type": "kitty", + "height": 12, + "padding": { + "top": 1 + } + }, + "display": { + "separator": " \t " + }, + "modules": [ + "break", + { + "type": "os", + "key": "OS ", + "keyColor": "36", // = color1 + }, + { + "type": "kernel", + "key": " ├  ", + "keyColor": "36", + }, + { + "type": "packages", + "format": "{} (pacman)", + "key": " ├ 󰏖 ", + "keyColor": "36", + }, + { + "type": "shell", + "key": " ├  ", + "keyColor": "34", + }, + { + "type": "wm", + "key": " ├ 󰉼 ", + "keyColor": "34", + }, + { + "type": "terminal", + "key": " ├  ", + "keyColor": "34", + }, + { + "type": "cpu", + "format": "{1} ({3})", + "key": " ├  ", + "keyColor": "35", + }, + { + "type": "gpu", + "format": "{1} {2}", + "key": " ├ 󰢮 ", + "keyColor": "35", + }, + { + "type": "memory", + "key": " ├  ", + "keyColor": "35", + }, + { + "type": "disk", + "key": " ├ 󰋊 ", + "keyColor": "35", + }, + "break", + { + "type": "custom", + "format": "\u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m " + }, + ] +} diff --git a/fastfetch/image/cam.png b/fastfetch/image/cam.png new file mode 100644 index 0000000..3e2517d Binary files /dev/null and b/fastfetch/image/cam.png differ diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index db82b21..3ad8961 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -26,7 +26,7 @@ workspace = 10, monitor:HDMI-A-1 # See https://wiki.hypr.land/Configuring/Keywords/ # Set programs that you use -$terminal = alacritty +$terminal = kitty $fileManager = thunar $menu = wofi --show=drun @@ -323,7 +323,7 @@ exec-once = spotify exec-once = [workspace 1 silent] firefox exec-once = [workspace 2 silent] code -exec-once = [workspace 3 silent] alacritty +exec-once = [workspace 3 silent] kitty exec-once = discord exec-once = spotify diff --git a/kitty/Aquarium Dark.conf b/kitty/Aquarium Dark.conf new file mode 100644 index 0000000..b0907c6 --- /dev/null +++ b/kitty/Aquarium Dark.conf @@ -0,0 +1,56 @@ +# vim:ft=kitty + +## name: Aquarium Dark +## license: MIT +## author: Detective Pikachu +## upstream: https://github.com/FrenzyExists/aquarium-vim/raw/develop/extras/kitty_aquarium_dark.conf +## blurb: A simple vibrant dark theme Kitty terminal. + +foreground #C6D0E9 +background #20202A +selection_foreground #2E3440 +selection_background #A8B6D0 +url_color #cddbf9 + +# black +color0 #3b3b4d +color8 #1b1b23 + +# red +color1 #ebb9b9 +color9 #d95e59 + +# green +color2 #caf6bb +color10 #8fc587 + +# yellow +color3 #E6DFB8 +color11 #ffcf85 + +# blue +color4 #cddbf9 +color12 #4a83c3 + +# magenta +color5 #f6bbe7 +color13 #bf83b5 + +# cyan +color6 #b8dceb +color14 #4eb3cd + +# white +color7 #c8cedc +color15 #abb2c2 + +# Cursor +cursor #b8dceb + +# START_AUTOGENERATED_TAB_STYLE +# Feel free to update these colors manually and remove these comments. +active_tab_foreground #444444 +active_tab_background #A8B6D0 +inactive_tab_foreground #C6D0E9 +inactive_tab_background #1a1a22 +# END_AUTOGENERATED_TAB_STYLE diff --git a/kitty/current-theme.conf b/kitty/current-theme.conf new file mode 100644 index 0000000..627ba40 --- /dev/null +++ b/kitty/current-theme.conf @@ -0,0 +1,35 @@ +# vim:ft=kitty +## name: Dracula +## author: Keegan Carruthers-Smith +## license: MIT +## upstream: https://raw.githubusercontent.com/dracula/kitty/master/dracula.conf + +foreground #f8f8f2 +background #282a36 +selection_foreground #ffffff +selection_background #44475a +url_color #8be9fd +color0 #21222c +color8 #6272a4 +color1 #ff5555 +color9 #ff6e6e +color2 #50fa7b +color10 #69ff94 +color3 #f1fa8c +color11 #ffffa5 +color4 #bd93f9 +color12 #d6acff +color5 #ff79c6 +color13 #ff92df +color6 #8be9fd +color14 #a4ffff +color7 #f8f8f2 +color15 #ffffff +cursor #f8f8f2 +cursor_text_color background +active_tab_foreground #282a36 +active_tab_background #f8f8f2 +inactive_tab_foreground #282a36 +inactive_tab_background #6272a4 +mark1_foreground #282a36 +mark1_background #ff5555 diff --git a/kitty/dark-theme.auto.conf b/kitty/dark-theme.auto.conf new file mode 100644 index 0000000..627ba40 --- /dev/null +++ b/kitty/dark-theme.auto.conf @@ -0,0 +1,35 @@ +# vim:ft=kitty +## name: Dracula +## author: Keegan Carruthers-Smith +## license: MIT +## upstream: https://raw.githubusercontent.com/dracula/kitty/master/dracula.conf + +foreground #f8f8f2 +background #282a36 +selection_foreground #ffffff +selection_background #44475a +url_color #8be9fd +color0 #21222c +color8 #6272a4 +color1 #ff5555 +color9 #ff6e6e +color2 #50fa7b +color10 #69ff94 +color3 #f1fa8c +color11 #ffffa5 +color4 #bd93f9 +color12 #d6acff +color5 #ff79c6 +color13 #ff92df +color6 #8be9fd +color14 #a4ffff +color7 #f8f8f2 +color15 #ffffff +cursor #f8f8f2 +cursor_text_color background +active_tab_foreground #282a36 +active_tab_background #f8f8f2 +inactive_tab_foreground #282a36 +inactive_tab_background #6272a4 +mark1_foreground #282a36 +mark1_background #ff5555 diff --git a/kitty/diff.conf b/kitty/diff.conf new file mode 100644 index 0000000..5fec447 --- /dev/null +++ b/kitty/diff.conf @@ -0,0 +1,19 @@ +foreground #f8f8f2 +background #282a36 +title_fg #f8f8f2 +title_bg #282a36 +margin_bg #6272a4 +margin_fg #44475a +removed_bg #ff5555 +highlight_removed_bg #ff5555 +removed_margin_bg #ff5555 +added_bg #50fa7b +highlight_added_bg #50fa7b +added_margin_bg #50fa7b +filler_bg #44475a +hunk_margin_bg #44475a +hunk_bg #bd93f9 +search_bg #8be9fd +search_fg #282a36 +select_bg #f1fa8c +select_fg #282a36 diff --git a/kitty/dracula.conf b/kitty/dracula.conf new file mode 100644 index 0000000..8f05c52 --- /dev/null +++ b/kitty/dracula.conf @@ -0,0 +1,66 @@ +# https://draculatheme.com/kitty +# +# Installation instructions: +# +# cp dracula.conf ~/.config/kitty/ +# echo "include dracula.conf" >> ~/.config/kitty/kitty.conf +# +# Then reload kitty for the config to take affect. +# Alternatively copy paste below directly into kitty.conf + +foreground #f8f8f2 +background #282a36 +selection_foreground #ffffff +selection_background #44475a + +url_color #8be9fd + +# black +color0 #21222c +color8 #6272a4 + +# red +color1 #ff5555 +color9 #ff6e6e + +# green +color2 #50fa7b +color10 #69ff94 + +# yellow +color3 #f1fa8c +color11 #ffffa5 + +# blue +color4 #bd93f9 +color12 #d6acff + +# magenta +color5 #ff79c6 +color13 #ff92df + +# cyan +color6 #8be9fd +color14 #a4ffff + +# white +color7 #f8f8f2 +color15 #ffffff + +# Cursor colors +cursor #f8f8f2 +cursor_text_color background + +# Tab bar colors +active_tab_foreground #282a36 +active_tab_background #f8f8f2 +inactive_tab_foreground #282a36 +inactive_tab_background #6272a4 + +# Marks +mark1_foreground #282a36 +mark1_background #ff5555 + +# Splits/Windows +active_border_color #f8f8f2 +inactive_border_color #6272a4 diff --git a/kitty/kitty.conf b/kitty/kitty.conf new file mode 100644 index 0000000..71a019c --- /dev/null +++ b/kitty/kitty.conf @@ -0,0 +1,4 @@ +# BEGIN_KITTY_THEME +# Dracula +include current-theme.conf +# END_KITTY_THEME \ No newline at end of file diff --git a/kitty/kitty.conf.bak b/kitty/kitty.conf.bak new file mode 100644 index 0000000..a405eac --- /dev/null +++ b/kitty/kitty.conf.bak @@ -0,0 +1,4 @@ +# BEGIN_KITTY_THEME +# 1984 Dark +include current-theme.conf +# END_KITTY_THEME \ No newline at end of file diff --git a/nvim/init.lua b/nvim/init.lua new file mode 100644 index 0000000..5b63eaa --- /dev/null +++ b/nvim/init.lua @@ -0,0 +1,557 @@ +-- ============================================================================= +-- init.lua — Full IDE Neovim Config (Rust, Go, C++, Python, Writing) +-- Bootstrap: place at ~/.config/nvim/init.lua +-- ============================================================================= + +-- ----------------------------------------------------------------------------- +-- BOOTSTRAP lazy.nvim +-- ----------------------------------------------------------------------------- +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", lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +-- ----------------------------------------------------------------------------- +-- CORE OPTIONS +-- ----------------------------------------------------------------------------- +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +local opt = vim.opt +opt.number = true +opt.relativenumber = true +opt.cursorline = true +opt.signcolumn = "yes" +opt.scrolloff = 8 +opt.sidescrolloff = 8 + +opt.tabstop = 4 +opt.shiftwidth = 4 +opt.expandtab = true +opt.smartindent = true + +opt.wrap = false +opt.linebreak = true -- soft-wrap for prose (toggled per filetype) + +opt.ignorecase = true +opt.smartcase = true +opt.hlsearch = false +opt.incsearch = true + +opt.splitright = true +opt.splitbelow = true + +opt.termguicolors = true +opt.pumheight = 10 +opt.updatetime = 200 +opt.timeoutlen = 300 + +opt.undofile = true -- persistent undo +opt.swapfile = false +opt.backup = false + +opt.completeopt = { "menu", "menuone", "noselect" } +opt.fileencoding = "utf-8" +opt.clipboard = "unnamedplus" + +-- Highlight yanked text briefly +vim.api.nvim_create_autocmd("TextYankPost", { + callback = function() vim.highlight.on_yank({ timeout = 200 }) end, +}) + +-- Prose mode for markdown/text files +vim.api.nvim_create_autocmd("FileType", { + pattern = { "markdown", "text", "gitcommit" }, + callback = function() + opt.wrap = true + opt.spell = true + opt.spelllang = "en_us" + end, +}) + +-- ----------------------------------------------------------------------------- +-- PLUGINS via lazy.nvim +-- ----------------------------------------------------------------------------- +require("lazy").setup({ + + -- ── Colorscheme ───────────────────────────────────────────────────────────── + { + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, + config = function() + require("catppuccin").setup({ flavour = "mocha", integrations = { + nvimtree = true, telescope = true, cmp = true, gitsigns = true, + }}) + vim.cmd.colorscheme("catppuccin") + end, + }, + + -- ── Icons ──────────────────────────────────────────────────────────────────── + { "nvim-tree/nvim-web-devicons", lazy = true }, + + -- ── Status Line ───────────────────────────────────────────────────────────── + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + config = function() + require("lualine").setup({ + options = { theme = "catppuccin", globalstatus = true }, + sections = { + lualine_c = { { "filename", path = 1 } }, + lualine_x = { "diagnostics", "encoding", "filetype" }, + }, + }) + end, + }, + + -- ── File Tree ─────────────────────────────────────────────────────────────── + { + "nvim-tree/nvim-tree.lua", + keys = { { "e", "NvimTreeToggle", desc = "File Tree" } }, + config = function() + require("nvim-tree").setup({ + view = { width = 35 }, + renderer = { group_empty = true }, + filters = { dotfiles = false }, + git = { enable = true }, + actions = { open_file = { quit_on_open = true } }, + }) + end, + }, + + -- ── Fuzzy Finder ──────────────────────────────────────────────────────────── + { + "nvim-telescope/telescope.nvim", + branch = "0.1.x", + dependencies = { + "nvim-lua/plenary.nvim", + { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, + }, + keys = { + { "ff", "Telescope find_files", desc = "Find Files" }, + { "fg", "Telescope live_grep", desc = "Live Grep" }, + { "fb", "Telescope buffers", desc = "Buffers" }, + { "fh", "Telescope help_tags", desc = "Help" }, + { "fd", "Telescope diagnostics", desc = "Diagnostics" }, + { "fr", "Telescope lsp_references", desc = "References" }, + }, + config = function() + local ts = require("telescope") + ts.setup({ defaults = { path_display = { "smart" }, layout_strategy = "horizontal" } }) + ts.load_extension("fzf") + end, + }, + + -- ── Treesitter ─────────────────────────────────────────────────────────────── + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + event = { "BufReadPost", "BufNewFile" }, + dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" }, + config = function() + require("nvim-treesitter.configs").setup({ + ensure_installed = { + "lua", "vim", "vimdoc", + "rust", "go", "cpp", "c", "python", + "markdown", "markdown_inline", "json", "yaml", "toml", "bash", + }, + highlight = { enable = true }, + indent = { enable = true }, + textobjects = { + select = { + enable = true, + lookahead = true, + keymaps = { + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + }, + }, + move = { + enable = true, + goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" }, + goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" }, + }, + }, + }) + end, + }, + + -- ── LSP ────────────────────────────────────────────────────────────────────── + { + "neovim/nvim-lspconfig", + dependencies = { + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + "hrsh7th/cmp-nvim-lsp", + { "j-hui/fidget.nvim", opts = {} }, -- LSP progress UI + }, + event = { "BufReadPre", "BufNewFile" }, + config = function() + -- Mason: auto-install LSP servers + require("mason").setup({ ui = { border = "rounded" } }) + require("mason-lspconfig").setup({ + ensure_installed = { + "rust_analyzer", "gopls", "clangd", "pyright", "lua_ls", + }, + automatic_installation = true, + }) + + local lspconfig = require("lspconfig") + local caps = require("cmp_nvim_lsp").default_capabilities() + + -- Shared on_attach: keymaps available once LSP attaches + local on_attach = function(_, buf) + local map = function(k, f, d) + vim.keymap.set("n", k, f, { buffer = buf, desc = d }) + end + map("gd", vim.lsp.buf.definition, "Go to Definition") + map("gD", vim.lsp.buf.declaration, "Go to Declaration") + map("gi", vim.lsp.buf.implementation, "Go to Implementation") + map("gt", vim.lsp.buf.type_definition, "Type Definition") + map("K", vim.lsp.buf.hover, "Hover Docs") + map("rn", vim.lsp.buf.rename, "Rename Symbol") + map("ca", vim.lsp.buf.code_action, "Code Action") + map("cf", function() vim.lsp.buf.format({ async = true }) end, "Format") + map("[d", vim.diagnostic.goto_prev, "Prev Diagnostic") + map("]d", vim.diagnostic.goto_next, "Next Diagnostic") + map("dl", vim.diagnostic.open_float, "Line Diagnostics") + end + + -- Per-server setup + local servers = { + rust_analyzer = { + settings = { ["rust-analyzer"] = { + checkOnSave = { command = "clippy" }, + inlayHints = { enable = true }, + }}, + }, + gopls = { + settings = { gopls = { + analyses = { unusedparams = true }, + staticcheck = true, + gofumpt = true, + }}, + }, + clangd = { + cmd = { "clangd", "--background-index", "--clang-tidy", + "--header-insertion=iwyu", "--completion-style=detailed" }, + }, + pyright = { + settings = { python = { analysis = { + typeCheckingMode = "basic", + autoImportCompletions = true, + }}}, + }, + lua_ls = { + settings = { Lua = { + runtime = { version = "LuaJIT" }, + workspace = { checkThirdParty = false }, + diagnostics = { globals = { "vim" } }, + telemetry = { enable = false }, + }}, + }, + } + + for server, cfg in pairs(servers) do + cfg.on_attach = on_attach + cfg.capabilities = caps + lspconfig[server].setup(cfg) + end + + -- Diagnostic signs + local signs = { Error = " ", Warn = " ", Hint = "󰠠 ", Info = " " } + for type, icon in pairs(signs) do + local hl = "DiagnosticSign" .. type + vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) + end + vim.diagnostic.config({ + virtual_text = { prefix = "●" }, + update_in_insert = false, + severity_sort = true, + float = { border = "rounded" }, + }) + end, + }, + + -- ── Autocompletion ─────────────────────────────────────────────────────────── + { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", + "rafamadriz/friendly-snippets", + }, + config = function() + local cmp = require("cmp") + local luasnip = require("luasnip") + require("luasnip.loaders.from_vscode").lazy_load() + + 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.select_prev_item(), + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.abort(), + [""] = cmp.mapping.confirm({ select = false }), + [""] = 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", priority = 1000 }, + { name = "luasnip", priority = 750 }, + { name = "buffer", priority = 500 }, + { name = "path", priority = 250 }, + }), + formatting = { + format = function(entry, item) + local icons = { + Text = "󰉿", Method = "󰆧", Function = "󰊕", Constructor = "", + Field = "󰜢", Variable = "󰀫", Class = "󰠱", Interface = "", + Module = "", Property = "󰜢", Unit = "󰑭", Value = "󰎠", + Enum = "", Keyword = "󰌋", Snippet = "", Color = "󰏘", + File = "󰈙", Reference = "󰈇", Folder = "󰉋", EnumMember = "", + Constant = "󰏿", Struct = "󰙅", Event = "", Operator = "󰆕", + TypeParameter = "", + } + item.kind = string.format("%s %s", icons[item.kind] or "", item.kind) + item.menu = ({ nvim_lsp = "[LSP]", luasnip = "[Snip]", + buffer = "[Buf]", path = "[Path]" })[entry.source.name] + return item + end, + }, + }) + end, + }, + + -- ── Formatting ─────────────────────────────────────────────────────────────── + { + "stevearc/conform.nvim", + event = "BufWritePre", + keys = { + { "cf", function() require("conform").format({ async = true }) end, desc = "Format" }, + }, + opts = { + formatters_by_ft = { + rust = { "rustfmt" }, + go = { "gofmt", "goimports" }, + cpp = { "clang_format" }, + c = { "clang_format" }, + python = { "black", "isort" }, + lua = { "stylua" }, + }, + format_on_save = { timeout_ms = 500, lsp_fallback = true }, + }, + }, + + -- ── Git ────────────────────────────────────────────────────────────────────── + { + "lewis6991/gitsigns.nvim", + event = { "BufReadPre", "BufNewFile" }, + opts = { + signs = { + add = { text = "▎" }, + change = { text = "▎" }, + delete = { text = "" }, + topdelete = { text = "" }, + changedelete = { text = "▎" }, + }, + on_attach = function(buf) + local gs = require("gitsigns") + local map = function(k, f, d) + vim.keymap.set("n", k, f, { buffer = buf, desc = d }) + end + map("]h", gs.next_hunk, "Next Hunk") + map("[h", gs.prev_hunk, "Prev Hunk") + map("hs", gs.stage_hunk, "Stage Hunk") + map("hr", gs.reset_hunk, "Reset Hunk") + map("hb", gs.blame_line, "Blame Line") + map("hd", gs.diffthis, "Diff This") + map("hp", gs.preview_hunk, "Preview Hunk") + end, + }, + }, + + -- ── Buffers / Tabs ─────────────────────────────────────────────────────────── + { + "akinsho/bufferline.nvim", + event = "VeryLazy", + keys = { + { "", "BufferLineCyclePrev", desc = "Prev Buffer" }, + { "", "BufferLineCycleNext", desc = "Next Buffer" }, + { "bd", "bdelete", desc = "Delete Buffer" }, + }, + opts = { + options = { + diagnostics = "nvim_lsp", + offsets = {{ filetype = "NvimTree", text = "Files", padding = 1 }}, + show_buffer_close_icons = true, + }, + }, + }, + + -- ── Terminal ───────────────────────────────────────────────────────────────── + { + "akinsho/toggleterm.nvim", + keys = { { "", "ToggleTerm", desc = "Toggle Terminal" } }, + opts = { direction = "horizontal", size = 15, shade_terminals = true }, + }, + + -- ── Pairs & Surround ───────────────────────────────────────────────────────── + { + "windwp/nvim-autopairs", + event = "InsertEnter", + config = function() + local ap = require("nvim-autopairs") + local cmp = require("cmp") + ap.setup({ check_ts = true }) + cmp.event:on("confirm_done", + require("nvim-autopairs.completion.cmp").on_confirm_done()) + end, + }, + { + "kylechui/nvim-surround", + event = "VeryLazy", + version = "*", + opts = {}, + }, + + -- ── Comments ───────────────────────────────────────────────────────────────── + { + "numToStr/Comment.nvim", + event = "VeryLazy", + opts = {}, + }, + + -- ── Which-key (keymap helper) ───────────────────────────────────────────────── + { + "folke/which-key.nvim", + event = "VeryLazy", + config = function() + require("which-key").setup() + require("which-key").register({ + ["f"] = { name = "Find" }, + ["c"] = { name = "Code" }, + ["h"] = { name = "Git Hunks" }, + ["b"] = { name = "Buffer" }, + ["d"] = { name = "Diagnostics" }, + }) + end, + }, + + -- ── Indent guides ───────────────────────────────────────────────────────────── + { + "lukas-reineke/indent-blankline.nvim", + event = { "BufReadPost", "BufNewFile" }, + main = "ibl", + opts = { indent = { char = "│" }, scope = { enabled = true } }, + }, + + -- ── Rust extras ────────────────────────────────────────────────────────────── + { + "mrcjkb/rustaceanvim", + ft = "rust", + version = "^4", + }, + + -- ── Go extras ──────────────────────────────────────────────────────────────── + { + "ray-x/go.nvim", + dependencies = { "ray-x/guihua.lua", "neovim/nvim-lspconfig", "nvim-treesitter/nvim-treesitter" }, + ft = { "go", "gomod" }, + build = ":GoInstallBinaries", + opts = { lsp_inlay_hints = { enable = true } }, + }, + + -- ── Markdown preview ───────────────────────────────────────────────────────── + { + "MeanderingProgrammer/render-markdown.nvim", + ft = "markdown", + dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, + opts = {}, + }, + + -- ── Trouble (diagnostics panel) ────────────────────────────────────────────── + { + "folke/trouble.nvim", + keys = { + { "xx", "TroubleToggle", desc = "Toggle Trouble" }, + { "xw", "TroubleToggle workspace_diagnostics", desc = "Workspace Diagnostics" }, + { "xd", "TroubleToggle document_diagnostics", desc = "Document Diagnostics" }, + }, + opts = { use_diagnostic_signs = true }, + }, + +}, { + -- lazy.nvim UI options + ui = { border = "rounded" }, + checker = { enabled = true, notify = false }, +}) + +-- ----------------------------------------------------------------------------- +-- EXTRA KEYMAPS +-- ----------------------------------------------------------------------------- +local map = vim.keymap.set + +-- Better window navigation +map("n", "", "h") +map("n", "", "j") +map("n", "", "k") +map("n", "", "l") + +-- Resize windows +map("n", "", "resize +2") +map("n", "", "resize -2") +map("n", "", "vertical resize -2") +map("n", "", "vertical resize +2") + +-- Stay in visual mode after indent +map("v", "<", "", ">gv") + +-- Move lines up/down +map("v", "J", ":m '>+1gv=gv") +map("v", "K", ":m '<-2gv=gv") + +-- Keep cursor centered when jumping +map("n", "", "zz") +map("n", "", "zz") +map("n", "n", "nzzzv") +map("n", "N", "Nzzzv") + +-- Paste without losing register +map("x", "p", '"_dP', { desc = "Paste without losing register" }) + +-- Save & quit shortcuts +map("n", "w", "w", { desc = "Save" }) +map("n", "q", "q", { desc = "Quit" }) +map("n", "Q", "qa!", { desc = "Quit all" }) + +-- Clear search highlight +map("n", "", "nohlsearch") \ No newline at end of file diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json new file mode 100644 index 0000000..b9520cd --- /dev/null +++ b/nvim/lazy-lock.json @@ -0,0 +1,37 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, + "LuaSnip": { "branch": "master", "commit": "dae4f5aaa3574bd0c2b9dd20fb9542a02c10471c" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "catppuccin": { "branch": "main", "commit": "c4d475e4b5684747cde9b3f849186af7837d4397" }, + "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, + "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "conform.nvim": { "branch": "master", "commit": "40dcec5555f960b0a04340d76eabdf4efe78599d" }, + "fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" }, + "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, + "gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" }, + "go.nvim": { "branch": "master", "commit": "659b105cf7f97049f6fe76a554917642f27ecd16" }, + "guihua.lua": { "branch": "master", "commit": "5494320b04dd03f31267f0e0f961d74be6f105da" }, + "indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a324581a3c83fdacdb9804b79de1cbe00ce18550" }, + "mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" }, + "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, + "nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" }, + "nvim-lspconfig": { "branch": "master", "commit": "2163c54bb6cfec53e3e555665ada945b8c8331b9" }, + "nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" }, + "nvim-tree.lua": { "branch": "master", "commit": "4b30847c91d498446cb8440c03031359b045e050" }, + "nvim-treesitter": { "branch": "main", "commit": "ebe76eb800d4e8df754fc96f8a7b84f578224a97" }, + "nvim-treesitter-textobjects": { "branch": "main", "commit": "0bc4ef0a34d80fd6e67b59bd71fcbb0ef9ef4756" }, + "nvim-web-devicons": { "branch": "master", "commit": "737cf6c657898d0c697311d79d361288a1343d50" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "render-markdown.nvim": { "branch": "main", "commit": "907505549edc2f90c82fc429348af03ee8c3a825" }, + "rustaceanvim": { "branch": "master", "commit": "047f9c9d8cd2861745eb9de6c1570ee0875aa795" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" }, + "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } +}