diff options
Diffstat (limited to 'lua/plugins')
| -rw-r--r-- | lua/plugins/10_ide.lua | 234 | ||||
| -rw-r--r-- | lua/plugins/50_ui.lua | 53 | ||||
| -rw-r--r-- | lua/plugins/90_misc.lua | 19 |
3 files changed, 306 insertions, 0 deletions
diff --git a/lua/plugins/10_ide.lua b/lua/plugins/10_ide.lua new file mode 100644 index 0000000..73ae12f --- /dev/null +++ b/lua/plugins/10_ide.lua @@ -0,0 +1,234 @@ +return { + { + 'nvim-treesitter/nvim-treesitter', + build = ':TSUpdate', + event = { "VeryLazy" }, + lazy = vim.fn.argc(-1) == 0, + opts = { + ensure_installed = { + "bash", + "bibtex", + "c", + "cpp", + "css", + "go", + "html", + "http", + "javascript", + "json", + "latex", + "lua", + "python", + "typescript", + "tsx", + "vim", + }, + sync_install = false, + highlight = { + enable = true, + }, + }, + }, + + -- + -- Autocompletion + -- + { + 'ms-jpq/coq.artifacts', + branch = 'artifacts' + }, + { + 'ms-jpq/coq_nvim', + dependencies = { 'ms-jpq/coq.artifacts' }, + branch = 'coq', + build = ':COQdeps', + config = function() + vim.cmd([[autocmd VimEnter * COQnow -s]]) + end + }, + + -- + -- Language Configurations + -- + { 'ap/vim-css-color', lazy = false }, + -- close tags in html languages + { + 'alvan/closetag.vim', + ft = { "html", "vue", "typescriptreact" }, + }, + + { + 'udalov/kotlin-vim', + ft = 'kotlin' + }, + + { 'bellinitte/uxntal.vim', lazy = false }, + + -- + -- Language Server + -- + + -- Show Code Outline/Symbols tree window + { + 'stevearc/aerial.nvim', + opts = { + backends = { 'lsp', 'markdown', 'man' }, + layout = { + min_width = 25 + }, + }, + keys = { + {'<Leader>e', ':AerialToggle<LF>'}, + } + }, + + -- Language Server Installer + { + 'williamboman/mason.nvim', + cmd = { + "Mason", + "MasonInstall", + "MasonUpdate", + + }, + opts = { + ui = { + icons = { + package_installed = "i", + package_pending = "p", + package_uninstalled = "u" + }, + }, + }, + }, + { + 'neovim/nvim-lspconfig', + config = function() + -- disable inline error messages + vim.diagnostic.config({ virtual_text = false }) + end + }, + { + 'williamboman/mason-lspconfig.nvim', + dependencies = { + 'ms-jpq/coq_nvim', + 'nanotee/nvim-lsp-basics', + 'neovim/nvim-lspconfig', + 'stevearc/aerial.nvim', + 'williamboman/mason.nvim', + }, + opts = { + ensure_installed = { + "bashls", + "clangd", + "ast_grep", + "gopls", + "html", + "jsonls", + "lua_ls", + "pyright", + "texlab", + "tsserver" + }, + }, + ft = { + "bash", + "c", + "cpp", + "dart", + "go", + "html", + "javascript", + "javascriptreact", + "json", + "lua", + "python", + "tex", + "typescript", + "typescriptreact", + }, + config = function() + local masonlsp = require 'mason-lspconfig' + --[[ + masonlsp.setup + --]] + masonlsp.setup_handlers { + function(server_name) + require('lspconfig')[server_name].setup(require('coq').lsp_ensure_capabilities { + on_attach = function(client, bufnr) + local basics = require('lsp_basics') + basics.make_lsp_commands(client, bufnr) + basics.make_lsp_mappings(client, bufnr) + end + }) + end + } + end + }, + + -- Show code diagnostics in a separate buffer window + { + 'folke/trouble.nvim', + opts = { + height = 6, + icons = false, + fold_open = "v", + fold_closed = ">", + signs = { + error = "E:", + warning = "W:", + hint = "H:", + information = "I:" + }, + use_diagnostic_signs = false + }, + + cmd = { + "TroubleToggle", + }, + + keys = { + {'<Leader>t', ':TroubleToggle<CR>'}, + } + }, + -- + -- Markdown Live Preview + -- + { + "iamcco/markdown-preview.nvim", + ft = 'markdown', + config = function() + vim.fn["mkdp#util#install"]() + vim.g.mkdp_theme = 'light' + end + }, + + -- + -- Misc + -- + { + "rest-nvim/rest.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { + -- Open request results in a horizontal split + result_split_horizontal = true, + -- Keep the http file buffer above|left when split horizontal|vertical + result_split_in_place = true, + result = { + show_curl_command = false, + }, + }, + keys = { + {'<Leader>r', '<Plug>RestNvim<CR>'}, + {'<Leader>R', '<Plug>RestNvimLast<CR>'}, + {'<Leader><A-r>', '<Plug>RestNvimPreview<CR>'}, + }, + config = function() + -- commands + local ct = require('conftool') + ct.defcmd('RestNvim', 'lua require(\'rest-nvim\').run()<CR>') + ct.defcmd('RestNvimPreview', 'lua require(\'rest-nvim\').run(true)<CR>') + ct.defcmd('RestNvimLast', 'lua require(\'rest-nvim\').last()<CR>') + end, + }, +} diff --git a/lua/plugins/50_ui.lua b/lua/plugins/50_ui.lua new file mode 100644 index 0000000..1382bf1 --- /dev/null +++ b/lua/plugins/50_ui.lua @@ -0,0 +1,53 @@ +return { + -- + -- Theme + -- + { + 'navarasu/onedark.nvim', + lazy = false, + config = function() + local ct = require('conftool') + ct.set({'background', 'light'}) + vim.cmd [[colo onedark]] + end, + keys = { + { + '<Leader>c', + function() + if vim.o.background == 'light' then + vim.o.background = 'dark' + else + vim.o.background = 'light' + -- vim.api.nvim_set_hl(0, 'ColorColumn', {bg = '#c0bfbc'}) + vim.cmd('redraw') + vim.cmd('redraw') + end + end, + desc = 'toggle color themes' + }, + }, + + }, + + -- + -- Indentation + -- + { + 'nathanaelkane/vim-indent-guides', + lazy = false, + setup = function() + vim.g.indent_guides_guide_size = 1 + vim.g.indent_guides_tab_guides = 0 + vim.g.indent_guides_start_level = 2 + vim.g.indent_guides_enable_on_vim_startup = 1 + end + }, + -- + -- Delimiters + -- + { + 'hiphish/rainbow-delimiters.nvim', + lazy = false, + } + +} diff --git a/lua/plugins/90_misc.lua b/lua/plugins/90_misc.lua new file mode 100644 index 0000000..41acb67 --- /dev/null +++ b/lua/plugins/90_misc.lua @@ -0,0 +1,19 @@ +return { + -- + -- Focus Mode + -- + { + 'junegunn/goyo.vim', + cmd = 'Goyo' + }, + + -- + -- Multi-cursor + -- + { + 'mg979/vim-visual-multi', + lazy = false + }, + { 'Raimondi/delimitMate', lazy = false } +} + |
