diff options
| author | pml68 <tutorialmester@gmail.com> | 2024-03-20 16:13:51 +0100 |
|---|---|---|
| committer | pml68 <tutorialmester@gmail.com> | 2024-03-20 16:13:51 +0100 |
| commit | be0cf4b36bd7be242d04b901eb59539f956f3354 (patch) | |
| tree | d13e07e77402ed9fa479cb892e9784686c537727 | |
| parent | refactor: remap Ex from CTRL-n to leader + e (diff) | |
| download | nvim-be0cf4b36bd7be242d04b901eb59539f956f3354.tar.gz | |
feat: add crates.nvim and cmp-path plugins
| -rw-r--r-- | lua/pml68/configs/cmp.lua | 2 | ||||
| -rw-r--r-- | lua/pml68/plugins.lua | 49 |
2 files changed, 34 insertions, 17 deletions
diff --git a/lua/pml68/configs/cmp.lua b/lua/pml68/configs/cmp.lua index e4c2ed2..528add0 100644 --- a/lua/pml68/configs/cmp.lua +++ b/lua/pml68/configs/cmp.lua @@ -3,6 +3,8 @@ local cmp = require("cmp") cmp.setup({ sources = { {name = 'nvim_lsp'}, + {name = 'crates'}, + {name = 'path'} }, window = { completion = { diff --git a/lua/pml68/plugins.lua b/lua/pml68/plugins.lua index fe432a5..2111880 100644 --- a/lua/pml68/plugins.lua +++ b/lua/pml68/plugins.lua @@ -22,6 +22,7 @@ local plugins = { end, }, "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-path" }, config = function() require("pml68.configs.cmp") @@ -135,23 +136,23 @@ local plugins = { config = function() require("nvim-treesitter.configs").setup({ ensure_installed = { - "c", - "cpp", - "lua", - "kotlin", - "nasm", - "bash", - "html", - "scss", - "css", - "typescript", - "javascript", - "python", - "rust", - "markdown", - "json", - "glsl", - "dart", + "c", + "cpp", + "lua", + "kotlin", + "nasm", + "bash", + "html", + "scss", + "css", + "typescript", + "javascript", + "python", + "rust", + "markdown", + "json", + "glsl", + "dart", } }) end @@ -283,6 +284,20 @@ local plugins = { vim.g.rustfmt_autosave = 1 end, }, + { + "saecki/crates.nvim", + tag = "stable", + dependencies = "hrsh7th/nvim-cmp", + event = {"BufRead Cargo.toml"}, + config = function() + local crates = require("crates") + crates.setup() + + vim.keymap.set("n", "<leader>rcu", function() + crates.upgrade_all_crates() + end) + end + }, } return plugins |
