Not for normies
happy with formatting
12 files changed, +169 -15
+3-3alacritty/alacritty.toml
| @@ -1,11 +1,11 @@ | ||
| 1 | 1 | [window] |
| 2 | 2 | opacity = 0.9 |
| 3 | 3 | blur = true |
| 4 | -option_as_alt = "Both" | |
| 4 | +# option_as_alt = "Both" | |
| 5 | 5 | |
| 6 | 6 | [font] |
| 7 | 7 | size = 10 |
| 8 | -normal.family = "Iosevka Nerd Font" | |
| 8 | +# normal.family = "Iosevka Nerd Font" | |
| 9 | 9 | |
| 10 | 10 | [keyboard] |
| 11 | -option_as_alt = "Both" | |
| 11 | +# option_as_alt = "Both" |
+6-4nvim/lazy-lock.json
| @@ -1,14 +1,17 @@ | ||
| 1 | 1 | { |
| 2 | + "LuaSnip": { "branch": "master", "commit": "21f74f7ba8c49f95f9d7c8293b147c2901dd2d3a" }, | |
| 2 | 3 | "alpha-nvim": { "branch": "main", "commit": "2b3cbcdd980cae1e022409289245053f62fb50f6" }, |
| 4 | + "blink.cmp": { "branch": "main", "commit": "fa9e5fa324f8a721a562a7baeba35a0da44ec651" }, | |
| 3 | 5 | "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, |
| 4 | 6 | "cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" }, |
| 5 | 7 | "cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" }, |
| 6 | 8 | "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, |
| 7 | - "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, | |
| 8 | 9 | "conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" }, |
| 9 | 10 | "crates.nvim": { "branch": "main", "commit": "afcd1cc3eeceb5783676fc8464389b9216a29d05" }, |
| 10 | - "gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" }, | |
| 11 | + "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, | |
| 12 | + "gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" }, | |
| 11 | 13 | "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, |
| 14 | + "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, | |
| 12 | 15 | "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, |
| 13 | 16 | "mini.icons": { "branch": "main", "commit": "f9a177c11daa7829389b7b6eaaec8b8a5c47052d" }, |
| 14 | 17 | "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, |
| @@ -16,7 +19,7 @@ | ||
| 16 | 19 | "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, |
| 17 | 20 | "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, |
| 18 | 21 | "nvim-compe": { "branch": "master", "commit": "d186d739c54823e0b010feb205c6f97792322c08" }, |
| 19 | - "nvim-lspconfig": { "branch": "master", "commit": "bc09aa236d7d2af66f56a5a35d0577588eca7800" }, | |
| 22 | + "nvim-lspconfig": { "branch": "master", "commit": "d89f4891f0720cd2598e4bdd60010d8784b2ac8a" }, | |
| 20 | 23 | "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, |
| 21 | 24 | "nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" }, |
| 22 | 25 | "oil-git-status.nvim": { "branch": "main", "commit": "4b5cf53842c17a09420919e655a6a559da3112d7" }, |
| @@ -32,6 +35,5 @@ | ||
| 32 | 35 | "vim-airline-themes": { "branch": "master", "commit": "0e976956eb674db8a6f72fae4dda6d1277433660" }, |
| 33 | 36 | "vim-devicons": { "branch": "master", "commit": "71f239af28b7214eebb60d4ea5bd040291fb7e33" }, |
| 34 | 37 | "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, |
| 35 | - "vim-vsnip": { "branch": "master", "commit": "0a4b8419e44f47c57eec4c90df17567ad4b1b36e" }, | |
| 36 | 38 | "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } |
| 37 | 39 | } |
+3-0nvim/lua/autocmds.lua
| @@ -8,6 +8,9 @@ vim.api.nvim_create_autocmd({ "FocusLost", "WinLeave" }, { | ||
| 8 | 8 | callback = autosave.save, |
| 9 | 9 | }) |
| 10 | 10 | |
| 11 | +local qfiletypes = { | |
| 12 | + [""] = true, | |
| 13 | +} | |
| 11 | 14 | vim.api.nvim_create_autocmd("BufEnter", { |
| 12 | 15 | callback = function(args) |
| 13 | 16 | if vim.bo[args.buf].readonly then |
+67-0nvim/lua/configs/cmp/vscode.lua
| @@ -0,0 +1,67 @@ | ||
| 1 | +local M = {} | |
| 2 | + | |
| 3 | +M.set_colors = function() | |
| 4 | + -- gray | |
| 5 | + vim.api.nvim_set_hl(0, "CmpItemAbbrDeprecated", { bg = "NONE", strikethrough = true, fg = "#808080" }) | |
| 6 | + -- blue | |
| 7 | + vim.api.nvim_set_hl(0, "CmpItemAbbrMatch", { bg = "NONE", fg = "#569CD6" }) | |
| 8 | + vim.api.nvim_set_hl(0, "CmpItemAbbrMatchFuzzy", { link = "CmpIntemAbbrMatch" }) | |
| 9 | + -- light blue | |
| 10 | + vim.api.nvim_set_hl(0, "CmpItemKindVariable", { bg = "NONE", fg = "#9CDCFE" }) | |
| 11 | + vim.api.nvim_set_hl(0, "CmpItemKindInterface", { link = "CmpItemKindVariable" }) | |
| 12 | + vim.api.nvim_set_hl(0, "CmpItemKindText", { link = "CmpItemKindVariable" }) | |
| 13 | + -- pink | |
| 14 | + vim.api.nvim_set_hl(0, "CmpItemKindFunction", { bg = "NONE", fg = "#C586C0" }) | |
| 15 | + vim.api.nvim_set_hl(0, "CmpItemKindMethod", { link = "CmpItemKindFunction" }) | |
| 16 | + -- front | |
| 17 | + vim.api.nvim_set_hl(0, "CmpItemKindKeyword", { bg = "NONE", fg = "#D4D4D4" }) | |
| 18 | + vim.api.nvim_set_hl(0, "CmpItemKindProperty", { link = "CmpItemKindKeyword" }) | |
| 19 | + vim.api.nvim_set_hl(0, "CmpItemKindUnit", { link = "CmpItemKindKeyword" }) | |
| 20 | +end | |
| 21 | + | |
| 22 | +M.icons = { | |
| 23 | + Text = "", | |
| 24 | + Method = "", | |
| 25 | + Function = "", | |
| 26 | + Constructor = "", | |
| 27 | + Field = "", | |
| 28 | + Variable = "", | |
| 29 | + Class = "", | |
| 30 | + Interface = "", | |
| 31 | + Module = "", | |
| 32 | + Property = "", | |
| 33 | + Unit = "", | |
| 34 | + Value = "", | |
| 35 | + Enum = "", | |
| 36 | + Keyword = "", | |
| 37 | + Snippet = "", | |
| 38 | + Color = "", | |
| 39 | + File = "", | |
| 40 | + Reference = "", | |
| 41 | + Folder = "", | |
| 42 | + EnumMember = "", | |
| 43 | + Constant = "", | |
| 44 | + Struct = "", | |
| 45 | + Event = "", | |
| 46 | + Operator = "", | |
| 47 | + TypeParameter = "", | |
| 48 | +} | |
| 49 | + | |
| 50 | +---@type cmp.FormattingConfig | |
| 51 | +M.formatting = { | |
| 52 | + format = function(entry, vim_item) | |
| 53 | + local icon = M.icons[vim_item.kind] or "" | |
| 54 | + local src = ({ | |
| 55 | + buffer = "", | |
| 56 | + nvim_lsp = "", | |
| 57 | + luasnip = "", | |
| 58 | + nvim_lua = "", | |
| 59 | + latex_symbols = "", | |
| 60 | + })[entry.source.name] or "" | |
| 61 | + local text = string.upper(vim_item.kind) | |
| 62 | + vim_item.kind = string.format("%s %-8s %s", icon, text, src) | |
| 63 | + return vim_item | |
| 64 | + end, | |
| 65 | +} | |
| 66 | + | |
| 67 | +return M |
+1-1nvim/lua/ftconfig/python.lua
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | vim.lsp.config("pyright", {}) |
| 2 | -vim.lsp.setup("pyright") | |
| 2 | +vim.lsp.enable("pyright") | |
| 3 | 3 | |
| 4 | 4 | ---@type FTSpec |
| 5 | 5 | return { |
+1-1nvim/lua/ftconfig/rust.lua
| @@ -4,7 +4,7 @@ vim.lsp.enable("rust_analyzer") | ||
| 4 | 4 | ---@type FTSpec |
| 5 | 5 | return { |
| 6 | 6 | conform = { |
| 7 | - use = { "rust-analyzer" }, | |
| 7 | + use = { "rustfmt" }, | |
| 8 | 8 | -- formatters = { |
| 9 | 9 | -- cargo_fix = { |
| 10 | 10 | -- command = "cargo", |
+2-0nvim/lua/keymaps.lua
| @@ -28,6 +28,7 @@ vim.keymap.set("n", "<leader>ba", ":Alpha | BufUtils focus<cr>", { desc = "Alpha | ||
| 28 | 28 | |
| 29 | 29 | -- code bindings |
| 30 | 30 | vim.keymap.set("n", "<leader>c", "", { desc = "Code" }) |
| 31 | +vim.keymap.set("n", "<leader>cc", ":FT<cr>", { desc = "Config" }) | |
| 31 | 32 | vim.keymap.set("n", "<leader>cd", require("plugins.lspconfig").open_float, { desc = "Open Diagnostic" }) |
| 32 | 33 | |
| 33 | 34 | -- executable bindings |
| @@ -45,6 +46,7 @@ vim.keymap.set("n", "<leader>te", telescope.extensions.emoji.emoji, { desc = "Em | ||
| 45 | 46 | vim.keymap.set("n", "<leader>ta", builtin.autocommands, { desc = "Autocommands" }) |
| 46 | 47 | vim.keymap.set("n", "<leader>to", ":Telescope oil<cr>", { desc = "Oil" }) |
| 47 | 48 | vim.keymap.set("n", "<leader>tn", ":Telescope nerdy<cr>", { desc = "Nerd Fonts" }) |
| 49 | +vim.keymap.set("n", "<leader>tc", ":Telescope ftconfig<cr>", { desc = "Filetype Config" }) | |
| 48 | 50 | |
| 49 | 51 | -- control bindings |
| 50 | 52 | vim.keymap.set({ "i", "n" }, "<C-h>", "<C-w>h", { desc = "Window Left" }) |
+56-0nvim/lua/plugins/blink.lua
| @@ -0,0 +1,56 @@ | ||
| 1 | +return { | |
| 2 | + { | |
| 3 | + "saghen/blink.cmp", | |
| 4 | + enabled = false, | |
| 5 | + -- optional: provides snippets for the snippet source | |
| 6 | + dependencies = { "rafamadriz/friendly-snippets" }, | |
| 7 | + | |
| 8 | + -- use a release tag to download pre-built binaries | |
| 9 | + version = "1.*", | |
| 10 | + -- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust | |
| 11 | + build = "cargo build --release", | |
| 12 | + -- If you use nix, you can build from source using latest nightly rust with: | |
| 13 | + -- build = 'nix run .#build-plugin', | |
| 14 | + | |
| 15 | + ---@module 'blink.cmp' | |
| 16 | + ---@type blink.cmp.Config | |
| 17 | + opts = { | |
| 18 | + -- 'default' (recommended) for mappings similar to built-in completions (C-y to accept) | |
| 19 | + -- 'super-tab' for mappings similar to vscode (tab to accept) | |
| 20 | + -- 'enter' for enter to accept | |
| 21 | + -- 'none' for no mappings | |
| 22 | + -- | |
| 23 | + -- All presets have the following mappings: | |
| 24 | + -- C-space: Open menu or open docs if already open | |
| 25 | + -- C-n/C-p or Up/Down: Select next/previous item | |
| 26 | + -- C-e: Hide menu | |
| 27 | + -- C-k: Toggle signature help (if signature.enabled = true) | |
| 28 | + -- | |
| 29 | + -- See :h blink-cmp-config-keymap for defining your own keymap | |
| 30 | + keymap = { preset = "enter" }, | |
| 31 | + | |
| 32 | + appearance = { | |
| 33 | + -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' | |
| 34 | + -- Adjusts spacing to ensure icons are aligned | |
| 35 | + nerd_font_variant = "mono", | |
| 36 | + }, | |
| 37 | + | |
| 38 | + -- (Default) Only show the documentation popup when manually triggered | |
| 39 | + completion = { documentation = { auto_show = false } }, | |
| 40 | + | |
| 41 | + -- Default list of enabled providers defined so that you can extend it | |
| 42 | + -- elsewhere in your config, without redefining it, due to `opts_extend` | |
| 43 | + sources = { | |
| 44 | + default = { "lsp", "path", "snippets", "buffer" }, | |
| 45 | + }, | |
| 46 | + | |
| 47 | + -- (Default) Rust fuzzy matcher for typo resistance and significantly better performance | |
| 48 | + -- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation, | |
| 49 | + -- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"` | |
| 50 | + -- | |
| 51 | + -- See the fuzzy documentation for more information | |
| 52 | + -- fuzzy = { implementation = "prefer_rust_with_warning" }, | |
| 53 | + }, | |
| 54 | + opts_extend = { "sources.default" }, | |
| 55 | + }, | |
| 56 | +} |
+24-4nvim/lua/plugins/nvim-cmp.lua
| @@ -1,6 +1,7 @@ | ||
| 1 | 1 | ---@type LazySpec |
| 2 | 2 | return { |
| 3 | 3 | "hrsh7th/nvim-cmp", |
| 4 | + enabled = true, | |
| 4 | 5 | dependencies = { |
| 5 | 6 | "neovim/nvim-lspconfig", |
| 6 | 7 | "hrsh7th/nvim-compe", |
| @@ -8,18 +9,37 @@ return { | ||
| 8 | 9 | "hrsh7th/cmp-buffer", |
| 9 | 10 | "hrsh7th/cmp-path", |
| 10 | 11 | "hrsh7th/cmp-cmdline", |
| 11 | - "hrsh7th/cmp-vsnip", | |
| 12 | - "hrsh7th/vim-vsnip", | |
| 12 | + "L3MON4D3/LuaSnip", | |
| 13 | + "rafamadriz/friendly-snippets", | |
| 14 | + "onsails/lspkind.nvim", | |
| 15 | + -- "hrsh7th/cmp-vsnip", | |
| 16 | + -- "hrsh7th/vim-vsnip", | |
| 13 | 17 | }, |
| 14 | 18 | config = function() |
| 15 | 19 | local cmp = require("cmp") |
| 20 | + local vscode = require("configs.cmp.vscode") | |
| 21 | + vscode.set_colors() | |
| 16 | 22 | |
| 17 | 23 | cmp.setup.cmdline("/", { |
| 18 | 24 | mapping = cmp.mapping.preset.cmdline(), |
| 19 | 25 | sources = { { name = "buffer" } }, |
| 20 | 26 | }) |
| 27 | + cmp.setup.cmdline(":", { | |
| 28 | + mapping = cmp.mapping.preset.cmdline(), | |
| 29 | + sources = cmp.config.sources({ | |
| 30 | + { name = "path" }, | |
| 31 | + }, { | |
| 32 | + { | |
| 33 | + name = "cmdline", | |
| 34 | + option = { | |
| 35 | + ignore_cmds = { "Man", "!" }, | |
| 36 | + }, | |
| 37 | + }, | |
| 38 | + }), | |
| 39 | + }) | |
| 21 | 40 | |
| 22 | 41 | cmp.setup({ |
| 42 | + formatting = vscode.formatting, | |
| 23 | 43 | window = { |
| 24 | 44 | -- completion = cmp.config.window.bordered(), |
| 25 | 45 | -- documentation = cmp.config.window.bordered(), |
| @@ -34,8 +54,8 @@ return { | ||
| 34 | 54 | sources = cmp.config.sources({ |
| 35 | 55 | { name = "path" }, |
| 36 | 56 | { name = "nvim_lsp" }, |
| 37 | - { name = "vsnip" }, -- For vsnip users. | |
| 38 | - -- { name = 'luasnip' }, -- For luasnip users. | |
| 57 | + -- { name = "vsnip" }, -- For vsnip users. | |
| 58 | + { name = "luasnip" }, -- For luasnip users. | |
| 39 | 59 | -- { name = 'ultisnips' }, -- For ultisnips users. |
| 40 | 60 | -- { name = 'snippy' }, -- For snippy users. |
| 41 | 61 | }, { |
+1-0nvim/lua/setup.lua
| @@ -31,6 +31,7 @@ require("lazy").setup({ | ||
| 31 | 31 | spec = plugins, |
| 32 | 32 | }) |
| 33 | 33 | |
| 34 | +vim.opt.swapfile = false | |
| 34 | 35 | require("clipboard") |
| 35 | 36 | require("autocmds") |
| 36 | 37 | require("keymaps") |
+1-1nvim/sample_files/rust_sample/target/.rustc_info.json
| @@ -1 +1 @@ | ||
| 1 | -{"rustc_fingerprint":10790545351301117111,"outputs":{"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.87.0 (17067e9ac 2025-05-09)\nbinary: rustc\ncommit-hash: 17067e9ac6d7ecb70e50f92c1944e545188d2359\ncommit-date: 2025-05-09\nhost: x86_64-unknown-linux-gnu\nrelease: 1.87.0\nLLVM version: 20.1.1\n","stderr":""},"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/huncho/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}} | |
| 1 | +{"rustc_fingerprint":10790545351301117111,"outputs":{"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/huncho/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"17747080675513052775":{"success":true,"status":"","code":0,"stdout":"rustc 1.87.0 (17067e9ac 2025-05-09)\nbinary: rustc\ncommit-hash: 17067e9ac6d7ecb70e50f92c1944e545188d2359\ncommit-date: 2025-05-09\nhost: x86_64-unknown-linux-gnu\nrelease: 1.87.0\nLLVM version: 20.1.1\n","stderr":""}},"successes":{}} |
+4-1nvim/sample_files/sample.py
| @@ -1,6 +1,9 @@ | ||
| 1 | +import os | |
| 2 | + | |
| 3 | + | |
| 1 | 4 | def hello(name: str): |
| 2 | 5 | """says hello to the name""" |
| 3 | - print(f"Hello {name}") | |
| 6 | + print(f"Hello {name}", os.curdir) | |
| 4 | 7 | |
| 5 | 8 | |
| 6 | 9 | hello("Huncho from") |