From d548c4027e9e89d8200b8b8508754adee62aef05 Mon Sep 17 00:00:00 2001 From: Daniele Pintore Date: Tue, 27 Feb 2024 17:08:10 +0100 Subject: [PATCH] Replaced packer with lazyvim plugin manager --- .config/nvim/after/plugin/colorscheme.lua | 9 -- .config/nvim/after/plugin/copilot.lua | 2 - .config/nvim/after/plugin/fugitive.lua | 1 - .config/nvim/after/plugin/harpoon.lua | 11 -- .config/nvim/after/plugin/lsp.lua | 89 ---------------- .config/nvim/after/plugin/telescope.lua | 6 -- .config/nvim/after/plugin/treesitter.lua | 26 ----- .config/nvim/after/plugin/undotree.lua | 1 - .config/nvim/lazy-lock.json | 21 ++++ .config/nvim/lua/configs/init.lua | 9 +- .config/nvim/lua/configs/lazy.lua | 15 +++ .config/nvim/lua/plugins/colorscheme.lua | 29 +++++ .config/nvim/lua/plugins/copilot.lua | 8 ++ .config/nvim/lua/plugins/fugitive.lua | 7 ++ .config/nvim/lua/plugins/harpoon.lua | 17 +++ .config/nvim/lua/plugins/init.lua | 2 + .config/nvim/lua/plugins/lsp.lua | 111 ++++++++++++++++++++ .config/nvim/lua/plugins/neoconf.lua | 31 ++++++ .config/nvim/lua/plugins/telescope.lua | 12 +++ .config/nvim/lua/plugins/tmux-navigator.lua | 5 + .config/nvim/lua/plugins/treesitter.lua | 32 ++++++ .config/nvim/lua/plugins/undotree.lua | 7 ++ .config/nvim/lua/plugins/vimwiki.lua | 22 ++++ 23 files changed, 324 insertions(+), 149 deletions(-) delete mode 100644 .config/nvim/after/plugin/colorscheme.lua delete mode 100644 .config/nvim/after/plugin/copilot.lua delete mode 100644 .config/nvim/after/plugin/fugitive.lua delete mode 100644 .config/nvim/after/plugin/harpoon.lua delete mode 100644 .config/nvim/after/plugin/lsp.lua delete mode 100644 .config/nvim/after/plugin/telescope.lua delete mode 100644 .config/nvim/after/plugin/treesitter.lua delete mode 100644 .config/nvim/after/plugin/undotree.lua create mode 100644 .config/nvim/lazy-lock.json create mode 100644 .config/nvim/lua/configs/lazy.lua create mode 100644 .config/nvim/lua/plugins/colorscheme.lua create mode 100644 .config/nvim/lua/plugins/copilot.lua create mode 100644 .config/nvim/lua/plugins/fugitive.lua create mode 100644 .config/nvim/lua/plugins/harpoon.lua create mode 100644 .config/nvim/lua/plugins/init.lua create mode 100644 .config/nvim/lua/plugins/lsp.lua create mode 100644 .config/nvim/lua/plugins/neoconf.lua create mode 100644 .config/nvim/lua/plugins/telescope.lua create mode 100644 .config/nvim/lua/plugins/tmux-navigator.lua create mode 100644 .config/nvim/lua/plugins/treesitter.lua create mode 100644 .config/nvim/lua/plugins/undotree.lua create mode 100644 .config/nvim/lua/plugins/vimwiki.lua diff --git a/.config/nvim/after/plugin/colorscheme.lua b/.config/nvim/after/plugin/colorscheme.lua deleted file mode 100644 index 93e2da7..0000000 --- a/.config/nvim/after/plugin/colorscheme.lua +++ /dev/null @@ -1,9 +0,0 @@ -function ActivateColorScheme(color) - color = color or "catppuccin-mocha" - vim.cmd.colorscheme(color) - - vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) - vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) -end - -ActivateColorScheme() diff --git a/.config/nvim/after/plugin/copilot.lua b/.config/nvim/after/plugin/copilot.lua deleted file mode 100644 index a817c07..0000000 --- a/.config/nvim/after/plugin/copilot.lua +++ /dev/null @@ -1,2 +0,0 @@ --- Disable copilot by default -vim.g.copilot_enabled = false diff --git a/.config/nvim/after/plugin/fugitive.lua b/.config/nvim/after/plugin/fugitive.lua deleted file mode 100644 index 73b78b8..0000000 --- a/.config/nvim/after/plugin/fugitive.lua +++ /dev/null @@ -1 +0,0 @@ -vim.keymap.set("n", "gs", vim.cmd.Git); diff --git a/.config/nvim/after/plugin/harpoon.lua b/.config/nvim/after/plugin/harpoon.lua deleted file mode 100644 index cc1c341..0000000 --- a/.config/nvim/after/plugin/harpoon.lua +++ /dev/null @@ -1,11 +0,0 @@ -local mark = require("harpoon.mark") -local ui = require("harpoon.ui") - -vim.keymap.set("n", "a", mark.add_file) -vim.keymap.set("n", "", ui.toggle_quick_menu) - -vim.keymap.set("n", "", function() ui.nav_file(1) end) -vim.keymap.set("n", "", function() ui.nav_file(2) end) -vim.keymap.set("n", "", function() ui.nav_file(3) end) --- Conflicts with find git files -- vim.keymap.set("n", "", function() ui.nav_file(4) end) - diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua deleted file mode 100644 index 4e6677f..0000000 --- a/.config/nvim/after/plugin/lsp.lua +++ /dev/null @@ -1,89 +0,0 @@ --- custom lsp per project -require("neoconf").setup({ - -- override any of the default settings here - plugins = { - -- configures lsp clients with settings in the following order: - -- - lua settings passed in lspconfig setup - -- - global json settings - -- - local json settings - lspconfig = { - enabled = true, - }, - -- configures jsonls to get completion in .nvim.settings.json files - jsonls = { - enabled = true, - -- only show completion in json settings for configured lsp servers - configured_servers_only = false, - }, - -- configures lua_ls to get completion of lspconfig server settings - lua_ls = { - -- by default, lua_ls annotations are only enabled in your neovim config directory - enabled_for_neovim_config = true, - -- explicitely enable adding annotations. Mostly relevant to put in your local .nvim.settings.json file - enabled = false, - }, - }, -}) - -local lsp = require('lsp-zero') - -lsp.on_attach(function(client, bufnr) - -- see :help lsp-zero-keybindings - -- to learn the available actions - lsp.default_keymaps({buffer = bufnr}) -end) - -lsp.extend_cmp() -require('mason').setup({}) -require('mason-lspconfig').setup({ - -- Replace the language servers listed here - -- with the ones you want to install - ensure_installed = {'eslint', 'tsserver', 'rust_analyzer', 'lua_ls', 'clangd', - 'volar', 'pylsp'}, - -- handlers = { - -- lsp.default_setup, - -- lua_ls = function() - -- -- (Optional) Configure lua language server for neovim - -- require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls()) - -- end, - -- }, -}) - -require('mason-lspconfig').setup_handlers({ - function(server_name) - local server_config = {} - if require("neoconf").get(server_name .. ".disable") then - return - end - if server_name == "volar" then - server_config.filetypes = { 'vue', 'typescript', 'javascript' } - end - require('lspconfig')[server_name].setup(server_config) - end, -}) - -local cmp = require('cmp') -local cmp_action = require('lsp-zero').cmp_action() - -cmp.setup({ - mapping = { - -- `Enter` key to confirm completion - [''] = cmp.mapping.confirm({select = false}), - - -- Alt+Space to trigger completion menu - [''] = cmp.mapping.complete(), - - -- Tab to change item in completion menu - [''] = cmp_action.tab_complete(), - -- Shift+Tab goes to the previus item in the completion menu - [''] = cmp_action.select_prev_or_fallback(), - - -- Navigate between documentation - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.scroll_docs(-4), - } -}) - -lsp.set_preferences({ - sign_icons = {} -}) diff --git a/.config/nvim/after/plugin/telescope.lua b/.config/nvim/after/plugin/telescope.lua deleted file mode 100644 index 4806008..0000000 --- a/.config/nvim/after/plugin/telescope.lua +++ /dev/null @@ -1,6 +0,0 @@ -local builtin = require('telescope.builtin') -vim.keymap.set('n', 'pf', builtin.find_files, {}) -vim.keymap.set('n', '', builtin.git_files, {}) -vim.keymap.set('n', 'ps', function() - builtin.grep_string({ search = vim.fn.input("Grep > ") }); -end) diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua deleted file mode 100644 index fc1e6eb..0000000 --- a/.config/nvim/after/plugin/treesitter.lua +++ /dev/null @@ -1,26 +0,0 @@ -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = {"javascript", "typescript", "rust", "c", "lua", "vim", "vimdoc", "query" }, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, - - -- List of parsers to ignore installing (for "all") - -- ignore_install = { "javascript" }, - - ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) - -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! - - highlight = { - enable = true, - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} diff --git a/.config/nvim/after/plugin/undotree.lua b/.config/nvim/after/plugin/undotree.lua deleted file mode 100644 index 8732728..0000000 --- a/.config/nvim/after/plugin/undotree.lua +++ /dev/null @@ -1 +0,0 @@ -vim.keymap.set("n", "u", vim.cmd.UndotreeToggle) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..ae85073 --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,21 @@ +{ + "LuaSnip": { "branch": "master", "commit": "f3b3d3446bcbfa62d638b1903ff00a78b2b730a1" }, + "catppuccin": { "branch": "main", "commit": "c0de3b46811fe1ce3912e2245a9dfbea6b41c300" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "copilot.vim": { "branch": "release", "commit": "8f24a74d5937c1fb28fbce5caf05ffc633093fc5" }, + "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, + "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, + "lsp-zero.nvim": { "branch": "v3.x", "commit": "009ace7a0ca360d9299ff7eb33364b5c16556561" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" }, + "mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" }, + "neoconf.nvim": { "branch": "main", "commit": "faab415b0ba57f0a15a82210f346f662e6551e1a" }, + "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, + "nvim-lspconfig": { "branch": "master", "commit": "b1a11b042d015df5b8f7f33aa026e501b639c649" }, + "nvim-treesitter": { "branch": "master", "commit": "db12bd416e2764420047e4a5d6b96fe44e4377d5" }, + "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, + "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, + "undotree": { "branch": "master", "commit": "9dbbf3b7d19dda0d22ceca461818e4739ad8154d" }, + "vim-fugitive": { "branch": "master", "commit": "2e88f14a585c014691904ba8fe39e6ea851c9422" }, + "vim-tmux-navigator": { "branch": "master", "commit": "38b1d0402c4600543281dc85b3f51884205674b6" }, + "vimwiki": { "branch": "dev", "commit": "fde35bb87e45abe930eebef5ab99a16289e53789" } +} \ No newline at end of file diff --git a/.config/nvim/lua/configs/init.lua b/.config/nvim/lua/configs/init.lua index 5a8ca8c..89cb8d4 100644 --- a/.config/nvim/lua/configs/init.lua +++ b/.config/nvim/lua/configs/init.lua @@ -1,4 +1,5 @@ -require("configs.remap") -require("configs.packer") -require("configs.set") -require("configs.templates") +require("configs.remap") -- set remps like leader and other useful ones +require("configs.set") -- set vim preferences +-- require("configs.packer") +require("configs.lazy") -- configure lazy plugin manager +require("configs.templates") -- configure templates for various files diff --git a/.config/nvim/lua/configs/lazy.lua b/.config/nvim/lua/configs/lazy.lua new file mode 100644 index 0000000..bf411e1 --- /dev/null +++ b/.config/nvim/lua/configs/lazy.lua @@ -0,0 +1,15 @@ +-- Bootstrap lazy plugin manager +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) + +require("lazy").setup("plugins") diff --git a/.config/nvim/lua/plugins/colorscheme.lua b/.config/nvim/lua/plugins/colorscheme.lua new file mode 100644 index 0000000..f6b1bd1 --- /dev/null +++ b/.config/nvim/lua/plugins/colorscheme.lua @@ -0,0 +1,29 @@ +return { + { "catppuccin/nvim", name = "catppuccin", priority = 1000, + config = function() + require('catppuccin').setup({ + term_colors = false, + transparent_background = true, + styles = { + comments = {}, + conditionals = {}, + loops = {}, + functions = {}, + keywords = {}, + strings = {}, + variables = {}, + numbers = {}, + booleans = {}, + properties = {}, + types = {}, + }, + }) + + -- set the colorscheme + vim.cmd('colorscheme catppuccin') + -- Do i need those? + vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) + vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) + end + }, +} diff --git a/.config/nvim/lua/plugins/copilot.lua b/.config/nvim/lua/plugins/copilot.lua new file mode 100644 index 0000000..68f00b1 --- /dev/null +++ b/.config/nvim/lua/plugins/copilot.lua @@ -0,0 +1,8 @@ +return { + { 'github/copilot.vim', + config = function () + -- Disable copilot by default + vim.g.copilot_enabled = false + end + } +} diff --git a/.config/nvim/lua/plugins/fugitive.lua b/.config/nvim/lua/plugins/fugitive.lua new file mode 100644 index 0000000..d2d7e88 --- /dev/null +++ b/.config/nvim/lua/plugins/fugitive.lua @@ -0,0 +1,7 @@ +return { + { 'tpope/vim-fugitive', + config = function () + vim.keymap.set("n", "gs", vim.cmd.Git); + end + } +} diff --git a/.config/nvim/lua/plugins/harpoon.lua b/.config/nvim/lua/plugins/harpoon.lua new file mode 100644 index 0000000..7208dc8 --- /dev/null +++ b/.config/nvim/lua/plugins/harpoon.lua @@ -0,0 +1,17 @@ +return { + { "ThePrimeagen/harpoon", + config = function () + local mark = require("harpoon.mark") + local ui = require("harpoon.ui") + + vim.keymap.set("n", "a", mark.add_file) + vim.keymap.set("n", "", ui.toggle_quick_menu) + + vim.keymap.set("n", "", function() ui.nav_file(1) end) + vim.keymap.set("n", "", function() ui.nav_file(2) end) + vim.keymap.set("n", "", function() ui.nav_file(3) end) + -- Conflicts with find git files -- vim.keymap.set("n", "", function() ui.nav_file(4) end) + end, + dependencies = { "nvim-lua/plenary.nvim" } + }, +} diff --git a/.config/nvim/lua/plugins/init.lua b/.config/nvim/lua/plugins/init.lua new file mode 100644 index 0000000..97aeadd --- /dev/null +++ b/.config/nvim/lua/plugins/init.lua @@ -0,0 +1,2 @@ +return { +} diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua new file mode 100644 index 0000000..e430aee --- /dev/null +++ b/.config/nvim/lua/plugins/lsp.lua @@ -0,0 +1,111 @@ +return { + { + 'VonHeikemen/lsp-zero.nvim', + branch = 'v3.x', + lazy = true, + config = false, + init = function() + -- Disable automatic setup, we are doing it manually + vim.g.lsp_zero_extend_cmp = 0 + vim.g.lsp_zero_extend_lspconfig = 0 + end, + }, + { + 'williamboman/mason.nvim', + lazy = false, + config = true, + }, + + -- Autocompletion + { + 'hrsh7th/nvim-cmp', + event = 'InsertEnter', + dependencies = { + {'L3MON4D3/LuaSnip'}, + }, + config = function() + -- Here is where you configure the autocompletion settings. + local lsp_zero = require('lsp-zero') + lsp_zero.extend_cmp() + + -- And you can configure cmp even more, if you want to. + local cmp = require('cmp') + local cmp_action = lsp_zero.cmp_action() + + cmp.setup({ + formatting = lsp_zero.cmp_format(), + mapping = cmp.mapping.preset.insert({ + -- `Enter` key to confirm completion + [''] = cmp.mapping.confirm({select = false}), + + -- Alt+Space to trigger completion menu + [''] = cmp.mapping.complete(), + + -- Tab to change item in completion menu + [''] = cmp_action.tab_complete(), + -- Shift+Tab goes to the previus item in the completion menu + [''] = cmp_action.select_prev_or_fallback(), + + -- Navigate between documentation + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.scroll_docs(-4), + }) + }) + + lsp_zero.set_preferences({ + sign_icons = {} + }) + end + }, + + -- LSP + { + 'neovim/nvim-lspconfig', + cmd = {'LspInfo', 'LspInstall', 'LspStart'}, + event = {'BufReadPre', 'BufNewFile'}, + dependencies = { + {'hrsh7th/cmp-nvim-lsp'}, + {'williamboman/mason-lspconfig.nvim'}, + }, + config = function() + -- This is where all the LSP shenanigans will live + local lsp_zero = require('lsp-zero') + lsp_zero.extend_lspconfig() + + --- if you want to know more about lsp-zero and mason.nvim + --- read this: https://github.com/VonHeikemen/lsp-zero.nvim/blob/v3.x/doc/md/guides/integrate-with-mason-nvim.md + lsp_zero.on_attach(function(client, bufnr) + -- see :help lsp-zero-keybindings + -- to learn the available actions + lsp_zero.default_keymaps({buffer = bufnr}) + end) + + require('mason-lspconfig').setup({ + ensure_installed = {'eslint', 'tsserver', 'rust_analyzer', 'lua_ls', + 'clangd', 'volar', 'pylsp'}, + handlers = { + lsp_zero.default_setup, + lua_ls = function() + -- (Optional) Configure lua language server for neovim + local lua_opts = lsp_zero.nvim_lua_ls() + require('lspconfig').lua_ls.setup(lua_opts) + end, + } + }) + + require('mason-lspconfig').setup_handlers({ + function(server_name) + local server_config = {} + if require("neoconf").get(server_name .. ".disable") then + return + end + if server_name == "volar" then + server_config.filetypes = { 'vue', 'typescript', 'javascript' } + end + require('lspconfig')[server_name].setup(server_config) + end, + }) + + end + } +} diff --git a/.config/nvim/lua/plugins/neoconf.lua b/.config/nvim/lua/plugins/neoconf.lua new file mode 100644 index 0000000..521d2e5 --- /dev/null +++ b/.config/nvim/lua/plugins/neoconf.lua @@ -0,0 +1,31 @@ +return { + { 'folke/neoconf.nvim', + config = function () + require("neoconf").setup({ + -- override any of the default settings here + plugins = { + -- configures lsp clients with settings in the following order: + -- - lua settings passed in lspconfig setup + -- - global json settings + -- - local json settings + lspconfig = { + enabled = true, + }, + -- configures jsonls to get completion in .nvim.settings.json files + jsonls = { + enabled = true, + -- only show completion in json settings for configured lsp servers + configured_servers_only = false, + }, + -- configures lua_ls to get completion of lspconfig server settings + lua_ls = { + -- by default, lua_ls annotations are only enabled in your neovim config directory + enabled_for_neovim_config = true, + -- explicitely enable adding annotations. Mostly relevant to put in your local .nvim.settings.json file + enabled = false, + }, + }, + }) + end + } +} diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua new file mode 100644 index 0000000..b9e8cd4 --- /dev/null +++ b/.config/nvim/lua/plugins/telescope.lua @@ -0,0 +1,12 @@ +return { + "nvim-telescope/telescope.nvim", tag = "0.1.5", + config = function () + local builtin = require('telescope.builtin') + vim.keymap.set('n', 'pf', builtin.find_files, {}) + vim.keymap.set('n', '', builtin.git_files, {}) + vim.keymap.set('n', 'ps', function() + builtin.grep_string({ search = vim.fn.input("Grep > ") }); + end) + end, + dependencies = { "nvim-lua/plenary.nvim" } +} diff --git a/.config/nvim/lua/plugins/tmux-navigator.lua b/.config/nvim/lua/plugins/tmux-navigator.lua new file mode 100644 index 0000000..e5e9aa7 --- /dev/null +++ b/.config/nvim/lua/plugins/tmux-navigator.lua @@ -0,0 +1,5 @@ +return { + { + 'christoomey/vim-tmux-navigator' + } +} diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..ebc2329 --- /dev/null +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,32 @@ +return { + { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", + config = function() + require('nvim-treesitter.configs').setup({ + -- A list of parser names, or "all" (the five listed parsers should always be installed) + ensure_installed = {"javascript", "typescript", "rust", "c", "lua", "vim", "vimdoc", "query" }, + + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- Automatically install missing parsers when entering buffer + -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + auto_install = true, + + -- List of parsers to ignore installing (for "all") + -- ignore_install = { "javascript" }, + + ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) + -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! + + highlight = { + enable = true, + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, + }) + end + } +} diff --git a/.config/nvim/lua/plugins/undotree.lua b/.config/nvim/lua/plugins/undotree.lua new file mode 100644 index 0000000..8c7e557 --- /dev/null +++ b/.config/nvim/lua/plugins/undotree.lua @@ -0,0 +1,7 @@ +return { + {'mbbill/undotree', + config = function () + vim.keymap.set('n', 'u', vim.cmd.UndotreeToggle) + end + } +} diff --git a/.config/nvim/lua/plugins/vimwiki.lua b/.config/nvim/lua/plugins/vimwiki.lua new file mode 100644 index 0000000..be998fe --- /dev/null +++ b/.config/nvim/lua/plugins/vimwiki.lua @@ -0,0 +1,22 @@ +return { + { "vimwiki/vimwiki", + config = function() + -- Restrict vimwiki to only the path specified in the vimwiki_list global var + vim.g.vimwiki_global_ext = 0 + -- Configure a list of vimwiki wiki, need a :PackerCompile to apply + vim.g.vimwiki_list = { + { + path = '~/Documents/cybersecurity/wiki/', + path_html = '~/Documents/cybersecurity/wiki/dist', + template_path = '~/.config/vimwiki/templates/cybersecurity/', + template_default = 'default', + template_ext = 'html', + css_name = 'css/styles.css', + syntax = 'markdown', + ext = '.md', + custom_wiki2html = '~/.config/vimwiki/parse_wiki.py', + }, + } + end, + } +}