From f2ac9f069d4c1de4f061dfe35cf2741e96773b6b Mon Sep 17 00:00:00 2001 From: Compey Date: Sun, 21 May 2023 17:03:42 +0530 Subject: [PATCH] customize + additional plugin --- lua/plugins/configs/lspconfig.lua | 2 + lua/plugins/configs/nvimtree.lua | 2 +- lua/plugins/init.lua | 67 +++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) diff --git a/lua/plugins/configs/lspconfig.lua b/lua/plugins/configs/lspconfig.lua index aa00274..6b1d27c 100644 --- a/lua/plugins/configs/lspconfig.lua +++ b/lua/plugins/configs/lspconfig.lua @@ -64,4 +64,6 @@ lspconfig.lua_ls.setup { }, } +require'lspconfig'.rust_analyzer.setup{} + return M diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index 4279d23..ead5bed 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -22,7 +22,7 @@ local options = { }, view = { adaptive_size = true, - side = "left", + side = "right", width = 25, hide_root_folder = true, }, diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index e380eea..f36815a 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -88,6 +88,48 @@ local plugins = { end, }, + ["EthanJWright/vs-tasks.nvim"] = { + requires = { + 'nvim-lua/popup.nvim', + 'nvim-lua/plenary.nvim', + 'nvim-telescope/telescope.nvim' + }, + setup = function() + require("vstask").setup({ + cache_json_conf = true, -- don't read the json conf every time a task is ran + cache_strategy = "last", -- can be "most" or "last" (most used / last used) + use_harpoon = true, -- use harpoon to auto cache terminals + telescope_keys = { -- change the telescope bindings used to launch tasks + vertical = '', + split = '', + tab = '', + current = '', + }, + autodetect = { -- auto load scripts + npm = "on" + }, + terminal = 'nvterm', + term_opts = { + vertical = { + direction = "vertical", + size = "80" + }, + horizontal = { + direction = "horizontal", + size = "10" + }, + current = { + direction = "float", + }, + tab = { + direction = 'tab', + } + } + }) + + end, + }, + -- git stuff ["lewis6991/gitsigns.nvim"] = { ft = "gitcommit", @@ -117,6 +159,31 @@ local plugins = { end, }, + ["simrat39/rust-tools.nvim"] = { + after = "nvim-lspconfig", + config = function() + require('rust-tools').setup({}) + end, + }, + + ["jose-elias-alvarez/typescript.nvim"] = { + after = "nvim-lspconfig", + config = function() + require("typescript").setup({ + disable_commands = false, -- prevent the plugin from creating Vim commands + debug = false, -- enable debug logging for commands + go_to_source_definition = { + fallback = true, -- fall back to standard LSP definition on failure + }, + server = { -- pass options to lspconfig's setup method + on_attach = function() + print("attached to TypeScript project") + end, + }, + }) + end, + }, + -- load luasnips + cmp related in insert mode only ["rafamadriz/friendly-snippets"] = {