diff options
| -rw-r--r-- | after/ftplugin/rust.lua | 10 | ||||
| -rw-r--r-- | lazy-lock.json | 68 | ||||
| -rw-r--r-- | lua/config/diagnostic.lua | 58 | ||||
| -rw-r--r-- | lua/config/keymaps.lua | 28 | ||||
| -rw-r--r-- | lua/config/lazy.lua | 178 | ||||
| -rw-r--r-- | lua/pi/completition/init.lua | 74 | ||||
| -rw-r--r-- | lua/pi/dap/configs/rust.old (renamed from lua/pi/dap/configs/rust.lua) | 0 | ||||
| -rw-r--r-- | lua/pi/dap/init.lua | 8 | ||||
| -rw-r--r-- | lua/pi/lsp/default.lua | 2 | ||||
| -rw-r--r-- | lua/pi/lsp/servers/rust_analyzer.old (renamed from lua/pi/lsp/servers/rust_analyzer.lua) | 0 | ||||
| -rw-r--r-- | lua/plugins/completition.lua | 19 | ||||
| -rw-r--r-- | lua/plugins/elixir.lua | 3 | ||||
| -rw-r--r-- | lua/plugins/lualine.lua | 22 | ||||
| -rw-r--r-- | lua/plugins/neotest.lua | 3 | ||||
| -rw-r--r-- | lua/plugins/noice.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/nvim-html-css.lua | 9 | ||||
| -rw-r--r-- | lua/plugins/oil.lua | 359 | ||||
| -rw-r--r-- | spell/dict_es_en.dict | 3999 |
18 files changed, 4501 insertions, 341 deletions
diff --git a/after/ftplugin/rust.lua b/after/ftplugin/rust.lua new file mode 100644 index 0000000..df6dc7b --- /dev/null +++ b/after/ftplugin/rust.lua @@ -0,0 +1,10 @@ +local bufnr = vim.api.nvim_get_current_buf() +vim.keymap.set( + "n", + "<leader>a", + function() + vim.cmd.RustLsp('codeAction') -- supports rust-analyzer's grouping + -- or vim.lsp.buf.codeAction() if you don't want grouping. + end, + { silent = true, buffer = bufnr } +) diff --git a/lazy-lock.json b/lazy-lock.json index bb721ee..d778abb 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,7 +1,7 @@ { "CodeGPT.nvim": { "branch": "master", "commit": "9d0a58a0bdc858f2e9729b8b5ac8b994c3453c8f" }, "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "CopilotChat.nvim": { "branch": "canary", "commit": "2352cd3e7e980cd73594be05f96b2dc4c0dd4a74" }, + "CopilotChat.nvim": { "branch": "canary", "commit": "9333944fde3c65868818e245c73aa29eef826e9b" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "500981ff6cefc7343e3959ef0f939bd0bfd49ba9" }, "NeoColumn.nvim": { "branch": "main", "commit": "db7695c7c70fcacd290712deef659bca464634ee" }, @@ -19,7 +19,7 @@ "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "codeium.nvim": { "branch": "main", "commit": "937667b2cadc7905e6b9ba18ecf84694cf227567" }, + "codeium.nvim": { "branch": "main", "commit": "17bbefff02be8fd66931f366bd4ed76a76e4a57e" }, "color-picker.nvim": { "branch": "master", "commit": "06cb5f853535dea529a523e9a0e8884cdf9eba4d" }, "composer.nvim": { "branch": "main", "commit": "ec9537969adc7fc128cfe9c3a9925850455896c8" }, "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" }, @@ -27,13 +27,13 @@ "direnv.vim": { "branch": "master", "commit": "ab2a7e08dd630060cd81d7946739ac7442a4f269" }, "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" }, "duck.nvim": { "branch": "main", "commit": "d8a6b08af440e5a0e2b3b357e2f78bb1883272cd" }, - "elixir-tools.nvim": { "branch": "main", "commit": "5e7596be469be0800e9cbe3415de971f7286c3d0" }, - "firenvim": { "branch": "master", "commit": "bb70728c13c305ff35193586d5f6ce68668af063" }, - "flutter-tools.nvim": { "branch": "main", "commit": "ea1d398f543a54ba95357c3b8bb9d6f68eaec36c" }, - "fzf": { "branch": "master", "commit": "855f90727af7827d9934b7fa00ea5ed51f5e4e81" }, - "fzf.vim": { "branch": "master", "commit": "c5ce7908ee86af7d4090d2007086444afb6ec1c9" }, + "elixir-tools.nvim": { "branch": "main", "commit": "b465f6aff50257fa466de3886fc3e7de2dcff0de" }, + "firenvim": { "branch": "master", "commit": "64f9389b88c8b0c7667d45c171a5f25c42d852fb" }, + "flutter-tools.nvim": { "branch": "main", "commit": "ce18f5da5f9c458cd26eef5c3accb0c37b2263c2" }, + "fzf": { "branch": "master", "commit": "e76aa37fd402f994ff194a02e47576fba928e8f4" }, + "fzf.vim": { "branch": "master", "commit": "ec75ffbfd50630bf2b8d444d89487e149bacf7f3" }, "git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" }, - "gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" }, + "gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" }, "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, "hydra.nvim": { "branch": "master", "commit": "3ced42c0b6a6c85583ff0f221635a7f4c1ab0dd0" }, "icon-picker.nvim": { "branch": "master", "commit": "3ee9a0ea9feeef08ae35e40c8be6a2fa2c20f2d3" }, @@ -41,8 +41,8 @@ "indent-blankline.nvim": { "branch": "master", "commit": "18603eb949eba08300799f64027af11ef922283f" }, "indent-o-matic": { "branch": "master", "commit": "4d11e98f523d3c4500b1dc33f0d1a248a4f69719" }, "laravel.nvim": { "branch": "main", "commit": "aabe7c59a7ec64baf3f2af3d56e6852955c065c3" }, - "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" }, - "lspkind-nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" }, + "lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" }, + "lspkind-nvim": { "branch": "master", "commit": "59c3f419af48a2ffb2320cea85e44e5a95f71664" }, "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, "luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" }, @@ -51,70 +51,70 @@ "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" }, - "mini.icons": { "branch": "main", "commit": "2d89252993fec829b24720097a687412d10f6c85" }, - "mini.nvim": { "branch": "main", "commit": "e50cf9de614500a20e47cfc50e30a100042f91c3" }, + "mini.icons": { "branch": "main", "commit": "a2742459f0ee32806c2438ca06b4d8b331f3f4d4" }, + "mini.nvim": { "branch": "main", "commit": "61e5d46fc0cf71306c51275383767d996f559a60" }, "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, "neogen": { "branch": "main", "commit": "e932ba918b56723436b77aa3efb844a11b2851ab" }, - "neorg": { "branch": "main", "commit": "ba35900b21921c439e676b063a79c8fad914eac9" }, - "neotest": { "branch": "master", "commit": "6d6ad113f56edc7c3f2a77a0836ea8c1b955ebea" }, + "neorg": { "branch": "main", "commit": "afc9a37bf021acb0853e95714c4c6436e1588286" }, + "neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" }, "neotest-go": { "branch": "main", "commit": "92950ad7be2ca02a41abca5c6600ff6ffaf5b5d6" }, "neotest-plenary": { "branch": "master", "commit": "3523adcf9ffaad1911960c5813b0136c1b63a2ec" }, "neotest-rust": { "branch": "main", "commit": "0418811e1e3499b2501593f2e131d02f5e6823d4" }, "neotest-vim-test": { "branch": "master", "commit": "75c4228882ae4883b11bfce9b8383e637eb44192" }, - "noice.nvim": { "branch": "main", "commit": "c1ba80ccf6b3bd8c7fc88fe2e61085131d44ad65" }, + "noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" }, "none-ls-extras.nvim": { "branch": "main", "commit": "ebb09961f1c0a377f9ed1685740cdf87b5cd39a8" }, "none-ls-luacheck.nvim": { "branch": "main", "commit": "a1dfea0d4c40c4023829c8b9a7ab0a26135985ca" }, "none-ls-shellcheck.nvim": { "branch": "main", "commit": "0f84461241e76e376a95fb7391deac82dc3efdbf" }, - "none-ls.nvim": { "branch": "main", "commit": "9b98991e15dce8fc502993e23caac2528b8b667f" }, + "none-ls.nvim": { "branch": "main", "commit": "0e0a940477cc08fa7b1799384a1d668058ed4e61" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "numb.nvim": { "branch": "master", "commit": "3f7d4a74bd456e747a1278ea1672b26116e0824d" }, - "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" }, + "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, "nvim-bqf": { "branch": "main", "commit": "1b24dc6050c34e8cd377b6b4cd6abe40509e0187" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, - "nvim-dap": { "branch": "master", "commit": "90616ae6ae40053103dc66872886fc26b94c70c8" }, - "nvim-dap-go": { "branch": "main", "commit": "5511788255c92bdd845f8d9690f88e2e0f0ff9f2" }, - "nvim-dap-ui": { "branch": "master", "commit": "1c351e4e417d4691da12948b6ecf966936a56d28" }, + "nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" }, + "nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" }, + "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "3497eb39bf413a57ab5b7e7e2e192683e462148c" }, "nvim-dap-vscode-js": { "branch": "main", "commit": "03bd29672d7fab5e515fc8469b7d07cc5994bbf6" }, "nvim-html-css": { "branch": "main", "commit": "c514bd27ad560636ed39dea3e370b3103754e244" }, - "nvim-lspconfig": { "branch": "master", "commit": "b064131428f6bbbbc905f4451ba6779fda334a3a" }, + "nvim-lspconfig": { "branch": "master", "commit": "1c2595e38da319a1a58c94f58afe6fe6fe02e292" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, + "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, "nvim-python-repl": { "branch": "main", "commit": "c79254982e32f9d3abf2de0ce72e7bf48dbb9afd" }, "nvim-spectre": { "branch": "master", "commit": "ba7fb777edff6c1fbbeffd343e113af64c04e90a" }, "nvim-transparent": { "branch": "main", "commit": "8a2749a2fa74f97fe6557f61b89ac7fd873f3c21" }, - "nvim-treesitter": { "branch": "master", "commit": "b8ad0473f4d5d7b59e17a67ad0b68711b0232486" }, - "nvim-treesitter-context": { "branch": "master", "commit": "7f7eeaa99e5a9beab518f502292871ae5f20de6f" }, + "nvim-treesitter": { "branch": "master", "commit": "cc2c11c403a9143827501223b4ee64432dcaf246" }, + "nvim-treesitter-context": { "branch": "master", "commit": "ddbc09bb984f0ca0796de2ac7cb27cfb57a0c6da" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" }, - "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "4a2d05ec24eaa6b655c7d19092a3b6c0219d46b9" }, + "nvim-web-devicons": { "branch": "master", "commit": "6b53401918a9033a41159d012160c5fb5eb249ae" }, "oil-git-status.nvim": { "branch": "main", "commit": "a7ea816bac0cc3b8b4c3605e2f2b87960be60a05" }, "oil-image-preview.nvim": { "branch": "master", "commit": "a71eacc879e1264339a62019ee3c2ff376f2cc39" }, - "oil.nvim": { "branch": "master", "commit": "1360be5fda9c67338331abfcd80de2afbb395bcd" }, + "oil.nvim": { "branch": "master", "commit": "9e6fb844fe4cce13d9e3f6a7c970cbc669bb1629" }, "pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" }, "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, "refactoring.nvim": { "branch": "master", "commit": "c406fc5fb4d7ba5fce7b668637075fad6e75e9f8" }, - "rustaceanvim": { "branch": "master", "commit": "f9ecc0c3084186a60513b83139a643a5cbf3bdf7" }, - "smart-splits.nvim": { "branch": "master", "commit": "3737faa521d12a0c77d0d28bb15ad903a9e8cfe0" }, + "rustaceanvim": { "branch": "master", "commit": "29f42cc149f915d771c550b6dfe7c788d856cf04" }, + "smart-splits.nvim": { "branch": "master", "commit": "22ca8bf770965306082fe23dd22822134bf3b70a" }, "solarized-osaka.nvim": { "branch": "main", "commit": "126d394c0c979a99206214a2b6b8c86e456c9c0f" }, "telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" }, - "telescope-file-browser.nvim": { "branch": "master", "commit": "dd9de68c08b6d678198a99f5ea13e0384a1f04cf" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "3b8a1e17187cfeedb31decbd625da62398a8ff34" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" }, "telescope-live-grep-args.nvim": { "branch": "master", "commit": "649b662a8f476fd2c0289570764459e95ebaa3f3" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "b5fd7f7ae0ea4537511077ed8ef4a6021cedba2f" }, + "telescope.nvim": { "branch": "master", "commit": "eae0d8fbde590b0eaa2f9481948cd6fd7dd21656" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" }, - "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, + "trouble.nvim": { "branch": "main", "commit": "254145ffd528b98eb20be894338e2d5c93fa02c2" }, "twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" }, "undotree": { "branch": "master", "commit": "78b5241191852ffa9bb5da5ff2ee033160798c3b" }, "vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" }, "vim-dadbod-completion": { "branch": "master", "commit": "880f7e9f2959e567c718d52550f9fae1aa07aa81" }, - "vim-dadbod-ui": { "branch": "master", "commit": "a5ff8bd69fcaf53cd24827b54492c8ce87806d18" }, + "vim-dadbod-ui": { "branch": "master", "commit": "f29c85ab42861c6ef683289b0c6a51e0d436dcf6" }, "vim-dispatch": { "branch": "master", "commit": "a2ff28abdb2d89725192db5b8562977d392a4d3f" }, "vim-dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" }, "vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" }, @@ -126,5 +126,5 @@ "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, "vim-test": { "branch": "master", "commit": "c090bfd93919888bb0b86e1ab707bc6a3095097f" }, - "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" } + "which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" } } diff --git a/lua/config/diagnostic.lua b/lua/config/diagnostic.lua index 84d57b5..011d83a 100644 --- a/lua/config/diagnostic.lua +++ b/lua/config/diagnostic.lua @@ -1,28 +1,50 @@ - vim.diagnostic.config { virtual_text = false, signs = { text = { [vim.diagnostic.severity.ERROR] = '', [vim.diagnostic.severity.WARN] = '', - [vim.diagnostic.severity.INFO] = '', - [vim.diagnostic.severity.HINT] = '', - }, - linehl = { - [vim.diagnostic.severity.ERROR] = 'ErrorMsg', - }, - numhl = { - [vim.diagnostic.severity.WARN] = 'WarningMsg', + [vim.diagnostic.severity.INFO] = '', + [vim.diagnostic.severity.HINT] = '' }, + -- linehl = { + -- [vim.diagnostic.severity.ERROR] = 'ErrorMsg', + -- }, + -- numhl = { + -- [vim.diagnostic.severity.WARN] = 'WarningMsg', + -- }, + }, + update_in_insert = true, + underline = true, + severity_sort = true, + float = { + -- focusable = true, + -- style = "minimal", + border = "rounded", + source = "if_many", + -- header = "", + -- prefix = "", }, } --- vim.diagnostic.config { --- virtual_text = false, --- } --- --- 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.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { +-- border = "rounded", +-- -- width = 100, +-- -- height = 10, +-- position = "center", +-- header = "", +-- prefix = "", +-- source = "always", +-- style = "minimal", +-- focusable = true, +-- }) + +-- vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { +-- border = "rounded", +-- }) + +vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { + -- delay update diagnostics + update_in_insert = false, +}) + diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 73478de..6002563 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -69,8 +69,6 @@ map( { desc = "Save the current file and source it for .vim and .lua files" } ) --- map("n", "<leader>vn", vim.diagnostic.goto_next, { desc = "Goes to next diagnostic error" }) --- map("n", "<leader>vp", vim.diagnostic.goto_prev, { desc = "Goes to prev diagnostic error" }) map( "n", "<leader>vn", @@ -129,24 +127,6 @@ map( function() require('nvim-python-repl').toggle_vertical() end, { desc = "Create REPL in vertical or horizontal split"} ) --- map( --- "n", --- "<leader>rl", --- function() require('rust-tools').inlay_hints.enable() end, --- {desc = "Enable inlay hints auto update and set them for all the buffers"} --- ) --- map( --- "n", --- "<leader>rdl", --- function() require('rust-tools').inlay_hints.disable() end, --- {desc = "Disable inlay hints auto update and unset them for all buffers"} --- ) --- map( --- "n", --- "<leader>rrn", --- function () require('rust-tools').runnables.runnables() end, --- {desc = "run rust"} --- ) map( "n", "-", @@ -167,3 +147,11 @@ vim.api.nvim_set_keymap( ':lua ToggleWrap()<CR>', { noremap = true, silent = true } ) +vim.keymap.set +( + "n", + "<leader>rrn", + ':RustLsp runnables<CR>', + {desc = "run rust"} +) + diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 81584d1..70aaec7 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -12,23 +12,160 @@ end vim.opt.rtp:prepend(lazypath) require("lazy").setup { - spec = { - { import = "plugins" }, + -- leave nil when passing the spec as the first argument to setup() + spec = { { import = "plugins" } }, + local_spec = true, -- load project specific .lazy.lua spec files. They will be added at the end of the spec. + defaults = { + -- Set this to `true` to have all your plugins lazy-loaded by default. + -- Only do this if you know what you are doing, as it can lead to unexpected behavior. + lazy = false, -- should plugins be lazy-loaded? + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = nil, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + -- default `cond` you can use to globally disable a lot of plugins + -- when running inside vscode for example + cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil }, - default = { - lazy = true, + lockfile = vim.fn.stdpath("config") .. "/lazy-lock.json", -- lockfile generated after running update. + ---@type number? limit the maximum amount of concurrent tasks + concurrency = jit.os:find("Windows") and (vim.uv.available_parallelism() * 2) or nil, + git = { + -- defaults for the `Lazy log` command + -- log = { "--since=3 days ago" }, -- show commits from the last 3 days + log = { "-8" }, -- show the last 8 commits + timeout = 120, -- kill processes that take more than 2 minutes + url_format = "https://github.com/%s.git", + -- lazy.nvim requires git >=2.19.0. If you really want to use lazy with an older version, + -- then set the below to false. This should work, but is NOT supported and will + -- increase downloads a lot. + filter = true, + }, + pkg = { + enabled = true, + cache = vim.fn.stdpath("state") .. "/lazy/pkg-cache.lua", + versions = true, -- Honor versions in pkg sources + -- the first package source that is found for a plugin will be used. + sources = { + "lazy", + "rockspec", + "packspec", + }, + }, + rocks = { + root = vim.fn.stdpath("data") .. "/lazy-rocks", + server = "https://nvim-neorocks.github.io/rocks-binaries/", }, - checker = { enabled = true, notify = false }, dev = { - path = "~/code/plugins", - fallback = true, - patterns = { "adalessa" }, + ---@type string | fun(plugin: LazyPlugin): string directory where you store your local plugin projects + path = "~/MIS-REPOS/neovim-plugins", + ---@type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub + patterns = {"elvis"}, -- For example {"folke"} + fallback = false, -- Fallback to git when local plugin doesn't exist + }, + install = { + -- install missing plugins on startup. This doesn't increase startup time. + missing = true, + -- try to load one of these colorschemes when starting an installation during startup + colorscheme = { "habamax" }, }, ui = { + -- a number <1 is a percentage., >1 is a fixed size + -- size = { width = 0.8, height = 0.8 }, + -- wrap = true, -- wrap the lines in the ui + -- The border to use for the UI window. Accepts same border values as |nvim_open_win()|. border = "rounded", + -- The backdrop opacity. 0 is fully opaque, 100 is fully transparent. + backdrop = 60, + title = nil, ---@type string only works when border is not "none" + title_pos = "center", ---@type "center" | "left" | "right" + -- Show pills on top of the Lazy window + pills = true, ---@type boolean + icons = { + cmd = " ", + config = "", + event = " ", + favorite = " ", + ft = " ", + init = " ", + import = " ", + keys = " ", + lazy = " ", + loaded = "●", + not_loaded = "○", + plugin = " ", + runtime = " ", + require = " ", + source = " ", + start = " ", + task = "✔ ", + list = { + "●", + "➜", + "★", + "‒", + }, + }, + -- leave nil, to automatically select a browser depending on your OS. + -- If you want to use a specific browser, you can define it here + browser = nil, ---@type string? + throttle = 20, -- how frequently should the ui process render events + custom_keys = { + -- You can define custom key maps here. If present, the description will + -- be shown in the help menu. + -- To disable one of the defaults, set it to false. + + ["<localleader>l"] = { + function(plugin) + require("lazy.util").float_term({ "lazygit", "log" }, { + cwd = plugin.dir, + }) + end, + desc = "Open lazygit log", + }, + + ["<localleader>t"] = { + function(plugin) + require("lazy.util").float_term(nil, { + cwd = plugin.dir, + }) + end, + desc = "Open terminal in plugin dir", + }, + }, + }, + diff = { + -- diff command <d> can be one of: + -- * browser: opens the github compare view. Note that this is always mapped to <K> as well, + -- so you can have a different command for diff <d> + -- * git: will run git diff and open a buffer with filetype git + -- * terminal_git: will open a pseudo terminal with git diff + -- * diffview.nvim: will open Diffview to show the diff + cmd = "git", + }, + checker = { + -- automatically check for plugin updates + enabled = true, + concurrency = nil, ---@type number? set to 1 to check for updates very slowly + notify = false, -- get a notification when new updates are found + frequency = 3600, -- check for updates every hour + check_pinned = false, -- check for pinned packages that can't be updated + }, + change_detection = { + -- automatically check for config file changes and reload the ui + enabled = true, + notify = true, -- get a notification when changes are found }, performance = { + cache = { + enabled = true, + }, + reset_packpath = true, -- reset the package path to improve startup time rtp = { + reset = true, -- reset the runtime path to $VIMRUNTIME and your config directory + ---@type string[] + paths = {}, -- add any custom paths here that you want to includes in the rtp + ---@type string[] list any plugins you want to disable here disabled_plugins = { "gzip", "matchit", @@ -41,4 +178,29 @@ require("lazy").setup { }, }, }, + -- lazy can generate helptags from the headings in markdown readme files, + -- so :help works even for plugins that don't have vim docs. + -- when the readme opens with :help it will be correctly displayed as markdown + readme = { + enabled = true, + root = vim.fn.stdpath("state") .. "/lazy/readme", + files = { "README.md", "lua/**/README.md" }, + -- only generate markdown helptags for plugins that dont have docs + skip_if_doc_exists = true, + }, + state = vim.fn.stdpath("state") .. "/lazy/state.json", -- state info for checker and other things + -- Enable profiling of lazy.nvim. This will add some overhead, + -- so only enable this when you are debugging lazy.nvim + profiling = { + -- Enables extra stats on the debug tab related to the loader cache. + -- Additionally gathers stats about all package.loaders + loader = false, + -- Track each new require in the Lazy profiling tab + require = false, + }, } + + + + + diff --git a/lua/pi/completition/init.lua b/lua/pi/completition/init.lua index 418c6d2..9ac1216 100644 --- a/lua/pi/completition/init.lua +++ b/lua/pi/completition/init.lua @@ -55,28 +55,30 @@ cmp.setup { ["<c-space>"] = cmp.mapping.complete(), }, sources = { - { name = "dictionary", keyword_length = 2}, + { name = "dictionary", keyword_length = 2 }, { name = "nvim_lua" }, { name = "nvim_lsp" }, { name = "path" }, { name = "luasnip" }, { name = "copilot" }, - {name = "codeium"}, + { name = "codeium" }, -- { name = 'cmp_ai' }, - { name = 'html-css', - option = { - max_count = {}, -- not ready yet - enable_on = { - "html", - "css" - }, -- set the file types you want the plugin to work on - file_extensions = { "css", "sass", "less" }, -- set the local filetypes from which you want to derive classes - style_sheets = { - -- example of remote styles, only css no js for now - "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css", - "https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css", - } - } + { + name = "html-css", + option = { + spa = { + enable = false, -- SPA mode is disabled by default + entry_file = "index.html", -- if entry_file is omitted, it defaults to index.html in root dir + }, + max_count = {}, -- not ready yet + enable_on = { "html", "css" }, -- set the file types you want the plugin to work on + file_extensions = { "css", "sass", "less" }, -- set the local filetypes from which you want to derive classes + style_sheets = { + -- example of remote styles, only css no js for now + "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css", + "https://cdn.jsdelivr.net/npm/bulma@0.9.4/css/bulma.min.css", + }, + }, }, { name = "buffer", @@ -104,12 +106,12 @@ cmp.setup { }, formatting = { - format = function (entry, vim_item) + format = function(entry, vim_item) if entry.source.name == "html-css" then - vim_item.menu = entry.completion_item.menu + source_mapping["html-css"] = "[" .. entry.completion_item.provider .. "]" or "[html-css]" end local KIND_ICONS = { - Tailwind = '', + Tailwind = "", Copilot = "", Ollama = "", Text = "", @@ -140,20 +142,20 @@ cmp.setup { TypeParameter = "", OpenAI = "", TinyLlama = "", - LlamaCPP = "" + LlamaCPP = "", } - if vim_item.kind == 'Color' and entry.completion_item.documentation then + if vim_item.kind == "Color" and entry.completion_item.documentation then local _, _, r, g, b = - ---@diagnostic disable-next-line: param-type-mismatch - string.find(entry.completion_item.documentation, '^rgb%((%d+), (%d+), (%d+)') + ---@diagnostic disable-next-line: param-type-mismatch + string.find(entry.completion_item.documentation, "^rgb%((%d+), (%d+), (%d+)") if r and g and b then - local color = string.format('%02x', r) .. string.format('%02x', g) .. string.format('%02x', b) - local group = 'Tw_' .. color + local color = string.format("%02x", r) .. string.format("%02x", g) .. string.format("%02x", b) + local group = "Tw_" .. color - if vim.api.nvim_call_function('hlID', { group }) < 1 then - vim.api.nvim_command('highlight' .. ' ' .. group .. ' ' .. 'guifg=#' .. color) + if vim.api.nvim_call_function("hlID", { group }) < 1 then + vim.api.nvim_command("highlight" .. " " .. group .. " " .. "guifg=#" .. color) end vim_item.kind = KIND_ICONS.Tailwind @@ -165,18 +167,16 @@ cmp.setup { vim_item.kind = KIND_ICONS[vim_item.kind] or vim_item.kind -- Add maxwidth and ellipsis_char in the middle - local maxwidth = 20 - local ellipsis_char = '...' + local maxwidth = 50 + local ellipsis_char = "..." if #vim_item.abbr > maxwidth then local half_width = math.floor((maxwidth - #ellipsis_char) / 2) - vim_item.abbr = string.sub( - vim_item.abbr, - 1, - half_width - ) .. ellipsis_char .. string.sub(vim_item.abbr, -half_width) + vim_item.abbr = string.sub(vim_item.abbr, 1, half_width) + .. ellipsis_char + .. string.sub(vim_item.abbr, -half_width) end return vim_item - end + end, }, sorting = { @@ -198,8 +198,8 @@ vim.api.nvim_set_hl(0, "CmpItemKindCopilot", { fg = "#3426C3" }) vim.api.nvim_set_hl(0, "CmpItemKindCodeium", { fg = "#2ACDBA" }) vim.api.nvim_set_hl(0, "CmpItemKindOllama", { fg = "#FDFEFF" }) vim.api.nvim_set_hl(0, "CmpItemKindOpenAI", { fg = "#080808" }) -vim.api.nvim_set_hl(0, "CmpItemKindTinyLlama", { fg = "#DF468C"}) -vim.api.nvim_set_hl(0, "CmpItemKindLlamaCPP", { fg = "#FF8235"}) +vim.api.nvim_set_hl(0, "CmpItemKindTinyLlama", { fg = "#DF468C" }) +vim.api.nvim_set_hl(0, "CmpItemKindLlamaCPP", { fg = "#FF8235" }) -- Set configuration for specific filetype. cmp.setup.filetype("gitcommit", { diff --git a/lua/pi/dap/configs/rust.lua b/lua/pi/dap/configs/rust.old index 9ca976f..9ca976f 100644 --- a/lua/pi/dap/configs/rust.lua +++ b/lua/pi/dap/configs/rust.old diff --git a/lua/pi/dap/init.lua b/lua/pi/dap/init.lua index 327dedf..97084fd 100644 --- a/lua/pi/dap/init.lua +++ b/lua/pi/dap/init.lua @@ -10,11 +10,11 @@ for _, ft_path in ipairs(vim.api.nvim_get_runtime_file("lua/pi/dap/configs/*.lua end -- Signs -vim.fn.sign_define("DapBreakpoint", { text = "🛑", texthl = "", linehl = "", numhl = "" }) +vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "", linehl = "", numhl = "" }) vim.fn.sign_define("DapStopped", { text = "▶", texthl = "", linehl = "", numhl = "" }) -vim.fn.sign_define("DapBreakpointRejected", { text = "🚫", texthl = "", linehl = "", numhl = "" }) -vim.fn.sign_define("DapBreakpointCondition", { text = "❓", texthl = "", linehl = "", numhl = "" }) -vim.fn.sign_define("DapLogPoint", { text = "💬", texthl = "", linehl = "", numhl = "" }) +vim.fn.sign_define("DapBreakpointRejected", { text = "", texthl = "", linehl = "", numhl = "" }) +vim.fn.sign_define("DapBreakpointCondition", { text = "", texthl = "", linehl = "", numhl = "" }) +vim.fn.sign_define("DapLogPoint", { text = "", texthl = "", linehl = "", numhl = "" }) -- UI structure dapui.setup { diff --git a/lua/pi/lsp/default.lua b/lua/pi/lsp/default.lua index b2be73e..b2020db 100644 --- a/lua/pi/lsp/default.lua +++ b/lua/pi/lsp/default.lua @@ -11,7 +11,7 @@ return { lua_ls = { enable = true, neodev = true }, -- nil_ls = { enable = true }, phpactor = {enable = true }, - rust_analyzer = { enable = true }, + -- rust_analyzer = { enable = true }, svelte = { enable = true }, tailwindcss = { enable = true, filetypes = {"blade", "html", "svelte"} }, ts_ls = { enable = true }, diff --git a/lua/pi/lsp/servers/rust_analyzer.lua b/lua/pi/lsp/servers/rust_analyzer.old index 8999ef8..8999ef8 100644 --- a/lua/pi/lsp/servers/rust_analyzer.lua +++ b/lua/pi/lsp/servers/rust_analyzer.old diff --git a/lua/plugins/completition.lua b/lua/plugins/completition.lua index 480da46..173cb54 100644 --- a/lua/plugins/completition.lua +++ b/lua/plugins/completition.lua @@ -17,28 +17,19 @@ return { "zbirenbaum/copilot.lua", cmd = { "Copilot" }, event = { "VeryLazy" }, - opts = { - suggestion = { enabled = false }, - panel = { enabled = false }, - }, + opts = { suggestion = { enabled = false }, panel = { enabled = false } }, }, config = true, }, { "uga-rosa/cmp-dictionary", config = function() - local dict_fl = { - ["*"] = { "/usr/share/dict/words" }, - ft = { - foo = { "./../../spell/dict_es.dict" }, - }, - } - local dict = require("cmp_dictionary") - - dict.setup({ paths = dict_fl["*"], exact_length = 3, first_case_insensitive = false }) + local dict_fl = { ["*"] = { "/usr/share/dict/words" }, ft = { foo = { "./../../spell/dict_es_en.dict" } } } + local dict = require "cmp_dictionary" + dict.setup { paths = dict_fl["*"], exact_length = 3, first_case_insensitive = false } end, }, - + { "Jezda1337/nvim-html-css" }, }, event = "VeryLazy", config = function() diff --git a/lua/plugins/elixir.lua b/lua/plugins/elixir.lua index 6aabb08..925c493 100644 --- a/lua/plugins/elixir.lua +++ b/lua/plugins/elixir.lua @@ -1,8 +1,7 @@ return { "elixir-tools/elixir-tools.nvim", version = "*", - event = { "BufReadPre", "BufNewFile" }, - filetypes = { "elixir" }, + ft = { "elixir" }, config = function() local elixir = require("elixir") local elixirls = require("elixir.elixirls") diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 88a0fec..5873598 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -91,10 +91,10 @@ return { }, sections = process_sections { lualine_a = { - { 'mode', - -- icons_enabled = true, + { 'mode', + icons_enabled = true, icon = { - " ", |