From c4dca3f7dda3eeaacdb6c519338d771553b11eb0 Mon Sep 17 00:00:00 2001 From: zolinthecow Date: Tue, 12 Nov 2024 14:34:30 -0800 Subject: [PATCH] add some configs --- lua/colinzhao/lazy/init.lua | 3 +++ lua/colinzhao/lazy/lsp.lua | 4 ++-- lua/colinzhao/lazy/markdown.lua | 8 +++++++ lua/colinzhao/lazy/trouble.lua | 37 +++++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 lua/colinzhao/lazy/markdown.lua create mode 100644 lua/colinzhao/lazy/trouble.lua diff --git a/lua/colinzhao/lazy/init.lua b/lua/colinzhao/lazy/init.lua index 2c26b3f5..56e70c90 100644 --- a/lua/colinzhao/lazy/init.lua +++ b/lua/colinzhao/lazy/init.lua @@ -2,7 +2,10 @@ return { -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically 'tpope/vim-fugitive', + 'tpope/vim-repeat', 'tpope/vim-surround', + 'tpope/vim-eunuch', + 'tpope/vim-unimpaired', -- NOTE: Plugins can also be added by using a table, -- with the first argument being the link and the following diff --git a/lua/colinzhao/lazy/lsp.lua b/lua/colinzhao/lazy/lsp.lua index 1d482f75..42e3afda 100644 --- a/lua/colinzhao/lazy/lsp.lua +++ b/lua/colinzhao/lazy/lsp.lua @@ -136,11 +136,11 @@ return { -- LSP Configuration & Plugins local servers = { clangd = {}, bashls = {}, - -- gopls = {}, + gopls = {}, pyright = { filetypes = { 'python' }, }, - -- rust_analyzer = {}, + rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: diff --git a/lua/colinzhao/lazy/markdown.lua b/lua/colinzhao/lazy/markdown.lua new file mode 100644 index 00000000..b1591c3d --- /dev/null +++ b/lua/colinzhao/lazy/markdown.lua @@ -0,0 +1,8 @@ +return { + 'iamcco/markdown-preview.nvim', + cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' }, + ft = { 'markdown' }, + build = function() + vim.fn['mkdp#util#install']() + end, +} diff --git a/lua/colinzhao/lazy/trouble.lua b/lua/colinzhao/lazy/trouble.lua new file mode 100644 index 00000000..0347802e --- /dev/null +++ b/lua/colinzhao/lazy/trouble.lua @@ -0,0 +1,37 @@ +return { + 'folke/trouble.nvim', + opts = { + open_no_results = true, + win = { + size = 0.4, + }, + }, -- for default options, refer to the configuration section for custom setup. + cmd = 'Trouble', + keys = { + { + 'te', + 'Trouble diagnostics toggle focus=true', + desc = 'Diagnostics (Trouble)', + }, + { + 'ts', + 'Trouble symbols toggle focus=true', + desc = 'Symbols (Trouble)', + }, + { + 'ti', + 'Trouble lsp toggle focus=true win.position=right', + desc = 'LSP Definitions / references / ... (Trouble)', + }, + { + 'tl', + 'Trouble loclist toggle focus=true', + desc = 'Location List (Trouble)', + }, + { + 'tq', + 'Trouble qflist toggle focus=true', + desc = 'Quickfix List (Trouble)', + }, + }, +}