My Neovim config
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Initial commit

SharpMars cb37a0d6

+478
+4
.luarc.jsonc
··· 1 + { 2 + "$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json", 3 + "workspace.library": ["C:/Program Files/Neovim/share/nvim/runtime"] 4 + }
+34
init.lua
··· 1 + vim.opt.termguicolors = true 2 + 3 + vim.g.mapleader = '"' 4 + vim.g.maplocalleader = "\\" 5 + 6 + vim.opt.clipboard = "unnamedplus" 7 + vim.opt.number = true 8 + vim.opt.relativenumber = true 9 + 10 + -- neovide 11 + if vim.g.neovide then 12 + vim.g.neovide_scale_factor = 0.8 13 + vim.o.guifont = "FiraCode Nerd Font Mono:h14" 14 + end 15 + 16 + vim.opt.tabstop = 8 17 + vim.opt.shiftwidth = 2 18 + vim.opt.expandtab = true 19 + vim.opt.softtabstop = 0 20 + vim.opt.autoindent = true 21 + vim.opt.smarttab = true 22 + 23 + vim.opt.foldenable = false 24 + vim.opt.foldlevel = 99 25 + vim.wo.foldmethod = 'expr' 26 + vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' 27 + 28 + -- netrw 29 + vim.g.netrw_keepdir = 0 30 + 31 + vim.diagnostic.config({ virtual_text = true }) 32 + 33 + vim.pack.add({ 'https://github.com/zuqini/zpack.nvim' }) 34 + require('zpack').setup()
+144
lua/plugins/editor.lua
··· 1 + return { 2 + { 3 + "catppuccin/nvim", 4 + name = "catppuccin", 5 + priority = 1000, 6 + config = function() 7 + require("catppuccin").setup({ 8 + flavour = "mocha" 9 + }) 10 + vim.cmd([[colorscheme catppuccin]]) 11 + end 12 + }, 13 + 14 + { 15 + "lukas-reineke/indent-blankline.nvim", 16 + main = "ibl", 17 + ---@module "ibl" 18 + ---@type ibl.config 19 + opts = { 20 + indent = { 21 + char = "│", 22 + } 23 + }, 24 + }, 25 + 26 + { 27 + "DrKJeff16/project.nvim", 28 + dependencies = { 29 + "nvim-lua/plenary.nvim", 30 + 'nvim-telescope/telescope.nvim', 31 + }, 32 + ---@module 'project' 33 + ---@type Project.Config.Options 34 + opts = { 35 + scope_chdir = "tab", 36 + enable_autochdir = true, 37 + telescope = { 38 + enabled = true, 39 + --prefer_file_browser = true, 40 + } 41 + }, 42 + config = function(_, opts) 43 + require("project").setup(opts); 44 + 45 + vim.api.nvim_create_user_command("Projects", function() 46 + vim.cmd("Telescope projects") 47 + end, {}) 48 + end 49 + }, 50 + 51 + { 52 + 'nvim-telescope/telescope.nvim', 53 + sem_version = '0.1.*', 54 + requires = { { 'nvim-lua/plenary.nvim' } }, 55 + config = function() 56 + require("telescope").setup({}) 57 + end 58 + }, 59 + 60 + { 61 + "nvim-telescope/telescope-file-browser.nvim", 62 + dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }, 63 + config = function() 64 + require("telescope").load_extension("file_browser") 65 + end 66 + }, 67 + 68 + { 69 + "stevearc/conform.nvim", 70 + opts = {}, 71 + config = function() 72 + require("conform").setup({ 73 + formatters = { 74 + prettier = { 75 + require_cwd = true, 76 + }, 77 + biome = { 78 + require_cwd = false, 79 + }, 80 + }, 81 + format_on_save = { 82 + timeout_ms = 500, 83 + lsp_format = "fallback", 84 + }, 85 + default_format_opts = { 86 + lsp_format = "fallback", 87 + }, 88 + formatters_by_ft = { 89 + astro = { "prettier", "biome", lsp_format = "fallback", stop_after_first = true }, 90 + css = { "prettier", "biome", lsp_format = "fallback" }, 91 + graphql = { "prettier", "biome", lsp_format = "fallback" }, 92 + html = { "prettier", "biome", lsp_format = "fallback" }, 93 + javascript = { "prettier", "biome", lsp_format = "fallback" }, 94 + javascriptreact = { "prettier", "biome", lsp_format = "fallback" }, 95 + svelte = { "prettier", "biome", lsp_format = "fallback" }, 96 + typescript = { "prettier", "biome", lsp_format = "fallback" }, 97 + typescriptreact = { "prettier", "biome", lsp_format = "fallback" }, 98 + ["typescript.tsx"] = { "prettier", "biome", lsp_format = "fallback" }, 99 + vue = { "prettier", "biome", lsp_format = "fallback" }, 100 + gleam = { lsp_format = "prefer" } 101 + } 102 + }) 103 + end 104 + }, 105 + 106 + { 107 + "folke/which-key.nvim", 108 + event = "VeryLazy", 109 + opts = { 110 + preset = "helix" 111 + }, 112 + keys = { 113 + { 114 + "<leader>?", 115 + function() 116 + require("which-key").show({ global = false }) 117 + end, 118 + desc = "Buffer Local Keymaps (which-key)", 119 + }, 120 + }, 121 + }, 122 + 123 + { 124 + "rcarriga/nvim-notify", 125 + config = function() 126 + vim.notify = require("notify") 127 + end 128 + }, 129 + 130 + { 131 + "OXY2DEV/foldtext.nvim", 132 + lazy = false 133 + }, 134 + 135 + { 136 + 'sairyy/zshow.nvim', 137 + lazy = false, 138 + init = function() 139 + vim.g.zshow_opts = { 140 + -- your config here 141 + } 142 + end 143 + } 144 + }
+193
lua/plugins/lsp.lua
··· 1 + return { 2 + { 3 + "mason-org/mason-lspconfig.nvim", 4 + opts = {}, 5 + dependencies = { 6 + { "mason-org/mason.nvim", opts = {} }, 7 + { "neovim/nvim-lspconfig" }, 8 + { "artemave/workspace-diagnostics.nvim" } 9 + }, 10 + config = function() 11 + require("mason-lspconfig").setup { 12 + automatic_enable = { 13 + exclude = {} 14 + } 15 + } 16 + 17 + vim.lsp.enable("gleam") 18 + vim.lsp.config("ts_ls", { 19 + on_attach = function(client, bufnr) 20 + require("workspace-diagnostics").populate_workspace_diagnostics(client, bufnr) 21 + client.server_capabilities.documentFormattingProvider = false 22 + end, 23 + }) 24 + end 25 + }, 26 + 27 + { 28 + "brenoprata10/nvim-highlight-colors", 29 + config = function() 30 + vim.opt.termguicolors = true 31 + 32 + require("nvim-highlight-colors").setup({}) 33 + end 34 + }, 35 + 36 + { 37 + "rachartier/tiny-code-action.nvim", 38 + dependencies = { 39 + { "nvim-lua/plenary.nvim" }, 40 + { "nvim-telescope/telescope.nvim" }, 41 + }, 42 + opts = { picker = "telescope", }, 43 + event = "LspAttach", 44 + keys = { 45 + { 46 + "<leader>ca", 47 + function() 48 + require("tiny-code-action").code_action({}) 49 + end, 50 + mode = { "n" }, 51 + desc = "Code Action", 52 + noremap = true, 53 + silent = true, 54 + } 55 + } 56 + }, 57 + 58 + { 59 + "saghen/blink.cmp", 60 + dependencies = { "rafamadriz/friendly-snippets", "brenoprata10/nvim-highlight-colors" }, 61 + 62 + sem_version = "1.*", 63 + 64 + ---@module 'blink.cmp' 65 + ---@type blink.cmp.config 66 + opts = { 67 + keymap = { 68 + preset = "super-tab", 69 + ["<Tab>"] = { 70 + function(cmp) 71 + if cmp.is_ghost_text_visible() then 72 + if cmp.snippet_active() then 73 + return cmp.accept() 74 + else 75 + return cmp.select_and_accept() 76 + end 77 + end 78 + end, 79 + "snippet_forward", 80 + "fallback" 81 + }, 82 + ["<CR>"] = { 83 + function(cmp) 84 + if cmp.is_menu_visible() then 85 + return cmp.accept() 86 + end 87 + end, 88 + "fallback" 89 + }, 90 + }, 91 + completion = { 92 + documentation = { 93 + auto_show = true, 94 + auto_show_delay_ms = 500 95 + }, 96 + menu = { 97 + enabled = true, 98 + auto_show = false, 99 + draw = { 100 + components = { 101 + -- customize the drawing of kind icons 102 + kind_icon = { 103 + text = function(ctx) 104 + -- default kind icon 105 + local icon = ctx.kind_icon 106 + -- if LSP source, check for color derived from documentation 107 + if ctx.item.source_name == "LSP" then 108 + local color_item = require("nvim-highlight-colors").format(ctx.item.documentation, 109 + { kind = ctx.kind }) 110 + if color_item and color_item.abbr ~= "" then 111 + icon = color_item.abbr 112 + end 113 + end 114 + return icon .. ctx.icon_gap 115 + end, 116 + highlight = function(ctx) 117 + -- default highlight group 118 + local highlight = "BlinkCmpKind" .. ctx.kind 119 + -- if LSP source, check for color derived from documentation 120 + if ctx.item.source_name == "LSP" then 121 + local color_item = require("nvim-highlight-colors").format(ctx.item.documentation, 122 + { kind = ctx.kind }) 123 + if color_item and color_item.abbr_hl_group then 124 + highlight = color_item.abbr_hl_group 125 + end 126 + end 127 + return highlight 128 + end, 129 + }, 130 + }, 131 + }, 132 + }, 133 + ghost_text = { 134 + enabled = true, 135 + show_with_menu = false 136 + } 137 + }, 138 + signature = { 139 + enabled = true, 140 + window = { 141 + show_documentation = false, 142 + } 143 + } 144 + }, 145 + opts_extend = { "sources.default" }, 146 + }, 147 + 148 + { 149 + "folke/trouble.nvim", 150 + opts = { 151 + win = { 152 + wo = { 153 + wrap = true, 154 + }, 155 + } 156 + }, -- for default options, refer to the configuration section for custom setup. 157 + cmd = "Trouble", 158 + keys = { 159 + { 160 + "<leader>xx", 161 + "<cmd>Trouble diagnostics toggle<cr>", 162 + desc = "Diagnostics (Trouble)", 163 + }, 164 + { 165 + "<leader>xX", 166 + "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", 167 + desc = "Buffer Diagnostics (Trouble)", 168 + }, 169 + { 170 + "<leader>cs", 171 + "<cmd>Trouble symbols toggle focus=false<cr>", 172 + desc = "Symbols (Trouble)", 173 + }, 174 + { 175 + "<leader>cl", 176 + "<cmd>Trouble lsp toggle focus=false win.position=right<cr>", 177 + desc = "LSP Definitions / references / ... (Trouble)", 178 + }, 179 + { 180 + "<leader>xL", 181 + "<cmd>Trouble loclist toggle<cr>", 182 + desc = "Location List (Trouble)", 183 + }, 184 + { 185 + "<leader>xQ", 186 + "<cmd>Trouble qflist toggle<cr>", 187 + desc = "Quickfix List (Trouble)", 188 + }, 189 + }, 190 + }, 191 + 192 + { "artemave/workspace-diagnostics.nvim" } 193 + }
+9
lua/plugins/treesitter.lua
··· 1 + return { 2 + { 3 + "romus204/tree-sitter-manager.nvim", 4 + dependencies = {}, -- tree-sitter CLI must be installed system-wide 5 + config = function() 6 + require("tree-sitter-manager").setup({}) 7 + end 8 + } 9 + }
+94
nvim-pack-lock.json
··· 1 + { 2 + "plugins": { 3 + "blink.cmp": { 4 + "rev": "78336bc89ee5365633bcf754d93df01678b5c08f", 5 + "src": "https://github.com/saghen/blink.cmp", 6 + "version": "1.0.0 - 2.0.0" 7 + }, 8 + "catppuccin": { 9 + "rev": "426dbebe06b5c69fd846ceb17b42e12f890aedf1", 10 + "src": "https://github.com/catppuccin/nvim" 11 + }, 12 + "conform.nvim": { 13 + "rev": "dca1a190aa85f9065979ef35802fb77131911106", 14 + "src": "https://github.com/stevearc/conform.nvim" 15 + }, 16 + "foldtext.nvim": { 17 + "rev": "97c3fbdfca2ee37d4a8254e1d088c7f6b9d13578", 18 + "src": "https://github.com/OXY2DEV/foldtext.nvim" 19 + }, 20 + "friendly-snippets": { 21 + "rev": "6cd7280adead7f586db6fccbd15d2cac7e2188b9", 22 + "src": "https://github.com/rafamadriz/friendly-snippets" 23 + }, 24 + "indent-blankline.nvim": { 25 + "rev": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03", 26 + "src": "https://github.com/lukas-reineke/indent-blankline.nvim" 27 + }, 28 + "mason-lspconfig.nvim": { 29 + "rev": "0c2823e0418f3d9230ff8b201c976e84de1cb401", 30 + "src": "https://github.com/mason-org/mason-lspconfig.nvim" 31 + }, 32 + "mason.nvim": { 33 + "rev": "12ddd182d9efbdc848b540f16484a583d52da0fb", 34 + "src": "https://github.com/mason-org/mason.nvim" 35 + }, 36 + "nvim-highlight-colors": { 37 + "rev": "e2cb22089cc2358b2b995c09578224f142de6039", 38 + "src": "https://github.com/brenoprata10/nvim-highlight-colors" 39 + }, 40 + "nvim-lspconfig": { 41 + "rev": "81878de76c0de4ce289513734ad80c31ec7871b8", 42 + "src": "https://github.com/neovim/nvim-lspconfig" 43 + }, 44 + "nvim-notify": { 45 + "rev": "8701bece920b38ea289b457f902e2ad184131a5d", 46 + "src": "https://github.com/rcarriga/nvim-notify" 47 + }, 48 + "plenary.nvim": { 49 + "rev": "74b06c6c75e4eeb3108ec01852001636d85a932b", 50 + "src": "https://github.com/nvim-lua/plenary.nvim" 51 + }, 52 + "project.nvim": { 53 + "rev": "d4c1df4c2a7e811295e3685709b0a473b966fc34", 54 + "src": "https://github.com/DrKJeff16/project.nvim" 55 + }, 56 + "telescope-file-browser.nvim": { 57 + "rev": "3610dc7dc91f06aa98b11dca5cc30dfa98626b7e", 58 + "src": "https://github.com/nvim-telescope/telescope-file-browser.nvim" 59 + }, 60 + "telescope.nvim": { 61 + "rev": "84b9ba066d1860f7a586ce9cd732fd6c4f77d1d9", 62 + "src": "https://github.com/nvim-telescope/telescope.nvim", 63 + "version": "0.1.0 - 0.2.0" 64 + }, 65 + "tiny-code-action.nvim": { 66 + "rev": "9f4b05c2f93f76a7bd517d9587ad0dc73cca0d0d", 67 + "src": "https://github.com/rachartier/tiny-code-action.nvim" 68 + }, 69 + "tree-sitter-manager.nvim": { 70 + "rev": "33a94d022e3a5a500d878b784ba7fec61559c70a", 71 + "src": "https://github.com/romus204/tree-sitter-manager.nvim" 72 + }, 73 + "trouble.nvim": { 74 + "rev": "bd67efe408d4816e25e8491cc5ad4088e708a69a", 75 + "src": "https://github.com/folke/trouble.nvim" 76 + }, 77 + "which-key.nvim": { 78 + "rev": "3aab2147e74890957785941f0c1ad87d0a44c15a", 79 + "src": "https://github.com/folke/which-key.nvim" 80 + }, 81 + "workspace-diagnostics.nvim": { 82 + "rev": "0dcd7d0a6c8f6e1ddb5bb72e1412aa4c9388718f", 83 + "src": "https://github.com/artemave/workspace-diagnostics.nvim" 84 + }, 85 + "zpack.nvim": { 86 + "rev": "43e8d65bebd95107736f4162673cd451ee75e463", 87 + "src": "https://github.com/zuqini/zpack.nvim" 88 + }, 89 + "zshow.nvim": { 90 + "rev": "880bcde84efaf325d638eed2ae32a308d7727d95", 91 + "src": "https://github.com/sairyy/zshow.nvim" 92 + } 93 + } 94 + }