From ebfcb8ce3050ccb5591e8124220fc37cbacec16e Mon Sep 17 00:00:00 2001 From: Ahmed Elsakaan Date: Sat, 3 Dec 2022 21:22:19 +0000 Subject: [PATCH] refactor: removes some unused plugins --- lua/config/lsp/init.lua | 6 ++++++ lua/config/plugins.lua | 11 ++--------- lua/config/which-key.lua | 8 ++++++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lua/config/lsp/init.lua b/lua/config/lsp/init.lua index 2c777a6..dcab11d 100644 --- a/lua/config/lsp/init.lua +++ b/lua/config/lsp/init.lua @@ -39,6 +39,7 @@ import({ "mason", "mason-lspconfig", "lspconfig", "cmp_nvim_lsp" }, function(mod "cssmodules_ls", "volar", "angularls", + "rust_analyzer", }, }) @@ -64,6 +65,11 @@ import({ "mason", "mason-lspconfig", "lspconfig", "cmp_nvim_lsp" }, function(mod }) end) end, + ["rust_analyzer"] = function() + import("rust-tools", function (rustTools) + rustTools.setup({ server = opts }) + end) + end, }) require("config.lsp.null-ls") diff --git a/lua/config/plugins.lua b/lua/config/plugins.lua index d324bae..51b422a 100644 --- a/lua/config/plugins.lua +++ b/lua/config/plugins.lua @@ -62,15 +62,8 @@ return packer.startup(function(use) use("ThePrimeagen/harpoon") use("akinsho/git-conflict.nvim") - -- Colorschemes - use("kvrohit/mellow.nvim") - use("Yazeed1s/oh-lucy.nvim") + -- Colorscheme use({ "catppuccin/nvim", as = "catppuccin" }) - use("marko-cerovac/material.nvim") - use("folke/tokyonight.nvim") - use("olivercederborg/poimandres.nvim") - use("tiagovla/tokyodark.nvim") - use("projekt0n/github-nvim-theme") -- Treesitter use("nvim-treesitter/nvim-treesitter") @@ -119,6 +112,7 @@ return packer.startup(function(use) use("folke/trouble.nvim") use("smiteshp/nvim-navic") use("utilyre/barbecue.nvim") + use("simrat39/rust-tools.nvim") -- Editing use("max397574/better-escape.nvim") @@ -138,7 +132,6 @@ return packer.startup(function(use) use("akinsho/toggleterm.nvim") use("rcarriga/nvim-notify") use("ThePrimeagen/vim-be-good") - use("davidgranstrom/nvim-markdown-preview") use("aserowy/tmux.nvim") if PACKER_BOOTSTRAP then diff --git a/lua/config/which-key.lua b/lua/config/which-key.lua index 5af7d8f..8db7f4d 100644 --- a/lua/config/which-key.lua +++ b/lua/config/which-key.lua @@ -24,7 +24,6 @@ import("which-key", function(whichKey) ["q"] = { "q", "Quit" }, ["e"] = { "Neotree toggle", "Toggle Explorer" }, ["n"] = { "nohl", "No highlight" }, - ["c"] = { "lua require('telescope.builtin').colorscheme()", "Change colorscheme" }, ["b"] = { name = "Buffers", ["p"] = { "BufferLinePick", "Pick" }, @@ -69,7 +68,7 @@ import("which-key", function(whichKey) ["d"] = { "lua vim.lsp.buf.definition()", "Definition" }, ["T"] = { "lua vim.lsp.buf.type_definition()", "Type definition" }, ["i"] = { "lua vim.lsp.buf.implementation()", "Implementation" }, - ["r"] = { "lua vim.lsp.buf.references()", "References" }, + ["R"] = { "lua vim.lsp.buf.references()", "References" }, ["K"] = { "lua vim.lsp.buf.hover()", "Hover" }, ["k"] = { "lua vim.lsp.buf.signature_help()", "Signature help" }, ["s"] = { "SymbolsOutline", "Toggle symbols outline" }, @@ -86,6 +85,11 @@ import("which-key", function(whichKey) ["g"] = { "TypescriptGoToSourceDefinition", "Go to source definition" }, ["r"] = { "TypescriptRenameFile", "Rename file" }, }, + ["r"] = { + name = "Rust", + ["r"] = { "RustRun", "Run" }, + ["a"] = { "RustRunnables", "Runnables"} + }, ["u"] = { name = "Trouble", r = { "TroubleToggle lsp_references", "References" },