diff options
| author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-11-03 15:00:36 +0100 | 
|---|---|---|
| committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-11-03 15:00:36 +0100 | 
| commit | 78a876bdb838ae43f21525bd0f24441706bdd5b7 (patch) | |
| tree | f9f160d5b0256d20d0c121f09af19d62ea15eb4e /config/essentials | |
| parent | 470eece95798fa687086aa18d33c1892e205117b (diff) | |
migrated from packer to lazy
Diffstat (limited to 'config/essentials')
| -rw-r--r-- | config/essentials/nvim/after/plugin/colorizer.lua.disabled (renamed from config/essentials/nvim/after/plugin/colorizer.lua) | 0 | ||||
| -rw-r--r-- | config/essentials/nvim/after/plugin/treesitter.lua | 11 | ||||
| -rw-r--r-- | config/essentials/nvim/lua/user/init.lua | 3 | ||||
| -rw-r--r-- | config/essentials/nvim/lua/user/lazy.lua | 98 | ||||
| -rw-r--r-- | config/essentials/nvim/lua/user/remap.lua | 4 | ||||
| -rw-r--r-- | config/essentials/nvim/lua/user/treesitter.lua | 44 | 
6 files changed, 146 insertions, 14 deletions
diff --git a/config/essentials/nvim/after/plugin/colorizer.lua b/config/essentials/nvim/after/plugin/colorizer.lua.disabled index 6ca374f..6ca374f 100644 --- a/config/essentials/nvim/after/plugin/colorizer.lua +++ b/config/essentials/nvim/after/plugin/colorizer.lua.disabled diff --git a/config/essentials/nvim/after/plugin/treesitter.lua b/config/essentials/nvim/after/plugin/treesitter.lua deleted file mode 100644 index e18368e..0000000 --- a/config/essentials/nvim/after/plugin/treesitter.lua +++ /dev/null @@ -1,11 +0,0 @@ -require'nvim-treesitter.configs'.setup { -	ensure_installed = { "c", "lua", "vim", "diff"}, - -	sync_install = false, -	auto_install = true, - -	highlight = { -		enable = true, -		additional_vim_regex_highlighting = false, -	} -} diff --git a/config/essentials/nvim/lua/user/init.lua b/config/essentials/nvim/lua/user/init.lua index 2f29b87..f195e4f 100644 --- a/config/essentials/nvim/lua/user/init.lua +++ b/config/essentials/nvim/lua/user/init.lua @@ -1,5 +1,6 @@ -require("user.packer") +require("user.lazy")  require("user.remap") +require("user.treesitter")  require("user.set")  require("user.cmp")  require("user.zk") diff --git a/config/essentials/nvim/lua/user/lazy.lua b/config/essentials/nvim/lua/user/lazy.lua new file mode 100644 index 0000000..5c3148c --- /dev/null +++ b/config/essentials/nvim/lua/user/lazy.lua @@ -0,0 +1,98 @@ +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({ +    -- Example using a list of specs with the default options +    "folke/which-key.nvim", + +    -- telescope +    { +        'nvim-telescope/telescope.nvim', +        tag = '0.1.4', +        dependencies = { 'nvim-lua/plenary.nvim' } +    }, +    "nvim-telescope/telescope-ui-select.nvim", +    "nvim-telescope/telescope-media-files.nvim", + +    "nvim-telescope/telescope-symbols.nvim", +    "theprimeagen/harpoon", + +    -- colors +    "shaunsingh/nord.nvim", +    { 'uZer/pywal16.nvim',                        name = 'pywal16' }, +    "norcalli/nvim-colorizer.lua", + +    { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' }, +    "nvim-treesitter/playground", + +    -- syntax +    "sheerun/vim-polyglot", +    "theRealCarneiro/hyprland-vim-syntax", + +    "mbbill/undotree", + +    "tpope/vim-capslock", +    "tpope/vim-commentary", +    -- "tpope/vim-endwise", +    "tpope/vim-fugitive", +    "lewis6991/gitsigns.nvim", +    "tpope/vim-repeat", +    "tpope/vim-surround", +    "tpope/vim-vinegar", +    "m4xshen/autoclose.nvim", + +    "christoomey/vim-tmux-navigator", + +    -- utils +    "godlygeek/tabular", +    "renerocksai/calendar-vim", +    "ojroques/vim-oscyank", +    "potamides/pantran.nvim", +    "alx741/vinfo", + +    -- "github/copilot.vim", +    -- +    { +        'https://gitlab.com/itaranto/plantuml.nvim', +        config = function() require('plantuml').setup() end +    }, + +    -- objects +    "michaeljsmith/vim-indent-object", + +    -- completion +    "neovim/nvim-lspconfig", +    "hrsh7th/nvim-cmp", +    "hrsh7th/cmp-nvim-lua", +    "hrsh7th/cmp-nvim-lsp", +    "hrsh7th/cmp-buffer", +    "hrsh7th/cmp-path", +    "hrsh7th/cmp-cmdline", +    "hrsh7th/cmp-nvim-lsp-signature-help", +    "alvan/vim-closetag", + +    -- debugging +    "mfussenegger/nvim-dap", +    { "rcarriga/nvim-dap-ui",            dependencies = { "mfussenegger/nvim-dap" } }, + +    -- java +    "mfussenegger/nvim-jdtls", + +    -- snippets +    "L3MON4D3/LuaSnip", +    "saadparwaiz1/cmp_luasnip", + +    -- notes +    "renerocksai/telekasten.nvim", + +}) diff --git a/config/essentials/nvim/lua/user/remap.lua b/config/essentials/nvim/lua/user/remap.lua index fadca21..8a8ad5c 100644 --- a/config/essentials/nvim/lua/user/remap.lua +++ b/config/essentials/nvim/lua/user/remap.lua @@ -73,8 +73,8 @@ vim.keymap.set("n", "<LocalLeader>s", function ()  	print("sourced.")  end, { noremap = true }) --- Packer -vim.keymap.set("n", "<Leader>P", "<cmd>PackerSync<cr>", { noremap = true }) +-- Lazy +vim.keymap.set("n", "<Leader>P", "<cmd>Lazy<cr>", { noremap = true })  -- spelling  vim.keymap.set("n", "<C-s>s", "<cmd>setlocal spell!<cr>", { noremap = true }) diff --git a/config/essentials/nvim/lua/user/treesitter.lua b/config/essentials/nvim/lua/user/treesitter.lua new file mode 100644 index 0000000..5b1fc5e --- /dev/null +++ b/config/essentials/nvim/lua/user/treesitter.lua @@ -0,0 +1,44 @@ +require'nvim-treesitter.configs'.setup { +  -- A list of parser names, or "all" (the five listed parsers should always be installed) +  ensure_installed = { "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 (or "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")! +  indent = { +      enable = on +  }, + +  highlight = { +    enable = true, + +    -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to +    -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is +    -- the name of the parser) +    -- list of language that will be disabled +    disable = { "c", "rust" }, +    -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files +    disable = function(lang, buf) +        local max_filesize = 100 * 1024 -- 100 KB +        local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) +        if ok and stats and stats.size > max_filesize then +            return true +        end +    end, + +    -- 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, +  }, +}  | 
