From b996d8fa7e668591d8747ad899e4d99f299d06e8 Mon Sep 17 00:00:00 2001 From: Vo Quang Chien Date: Fri, 3 May 2024 14:25:01 +0700 Subject: [PATCH] use lazyvim --- dot_config/nvim/dot_gitignore | 8 ++ dot_config/nvim/dot_neoconf.json | 5 -- dot_config/nvim/dot_stylua.toml | 7 -- dot_config/nvim/init.lua | 21 +----- dot_config/nvim/lazy-lock.json | 86 +++++++++++----------- dot_config/nvim/lazyvim.json | 20 +++++ dot_config/nvim/lua/community.lua | 5 -- dot_config/nvim/lua/config/autocmds.lua | 3 + dot_config/nvim/lua/config/keymaps.lua | 3 + dot_config/nvim/lua/config/lazy.lua | 45 +++++++++++ dot_config/nvim/lua/config/options.lua | 1 + dot_config/nvim/lua/lazy_setup.lua | 34 --------- dot_config/nvim/lua/plugins/astrocore.lua | 43 ----------- dot_config/nvim/lua/plugins/astrolsp.lua | 81 -------------------- dot_config/nvim/lua/plugins/astroui.lua | 20 ----- dot_config/nvim/lua/plugins/mason.lua | 20 ----- dot_config/nvim/lua/plugins/none-ls.lua | 22 ------ dot_config/nvim/lua/plugins/treesitter.lua | 10 --- dot_config/nvim/lua/plugins/user.lua | 58 ++++++++++++--- dot_config/nvim/lua/polish.lua | 18 ----- dot_config/nvim/neovim.yml | 6 -- dot_config/nvim/stylua.toml | 3 + 22 files changed, 174 insertions(+), 345 deletions(-) create mode 100644 dot_config/nvim/dot_gitignore delete mode 100644 dot_config/nvim/dot_stylua.toml create mode 100644 dot_config/nvim/lazyvim.json delete mode 100644 dot_config/nvim/lua/community.lua create mode 100644 dot_config/nvim/lua/config/autocmds.lua create mode 100644 dot_config/nvim/lua/config/keymaps.lua create mode 100644 dot_config/nvim/lua/config/lazy.lua create mode 100644 dot_config/nvim/lua/config/options.lua delete mode 100644 dot_config/nvim/lua/lazy_setup.lua delete mode 100644 dot_config/nvim/lua/plugins/astrocore.lua delete mode 100644 dot_config/nvim/lua/plugins/astrolsp.lua delete mode 100644 dot_config/nvim/lua/plugins/astroui.lua delete mode 100644 dot_config/nvim/lua/plugins/mason.lua delete mode 100644 dot_config/nvim/lua/plugins/none-ls.lua delete mode 100644 dot_config/nvim/lua/plugins/treesitter.lua delete mode 100644 dot_config/nvim/lua/polish.lua delete mode 100644 dot_config/nvim/neovim.yml create mode 100644 dot_config/nvim/stylua.toml diff --git a/dot_config/nvim/dot_gitignore b/dot_config/nvim/dot_gitignore new file mode 100644 index 00000000..cc5457ab --- /dev/null +++ b/dot_config/nvim/dot_gitignore @@ -0,0 +1,8 @@ +tt.* +.tests +doc/tags +debug +.repro +foo.* +*.log +data diff --git a/dot_config/nvim/dot_neoconf.json b/dot_config/nvim/dot_neoconf.json index 2d7a81f9..7c480874 100644 --- a/dot_config/nvim/dot_neoconf.json +++ b/dot_config/nvim/dot_neoconf.json @@ -11,10 +11,5 @@ "enabled": true } } - }, - "lspconfig": { - "lua_ls": { - "Lua.format.enable": false - } } } diff --git a/dot_config/nvim/dot_stylua.toml b/dot_config/nvim/dot_stylua.toml deleted file mode 100644 index bfcffff4..00000000 --- a/dot_config/nvim/dot_stylua.toml +++ /dev/null @@ -1,7 +0,0 @@ -column_width = 120 -line_endings = "Unix" -indent_type = "Spaces" -indent_width = 2 -quote_style = "AutoPreferDouble" -call_parentheses = "None" -collapse_simple_statement = "Always" diff --git a/dot_config/nvim/init.lua b/dot_config/nvim/init.lua index 2ce1cdd2..2514f9ed 100644 --- a/dot_config/nvim/init.lua +++ b/dot_config/nvim/init.lua @@ -1,19 +1,2 @@ --- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution --- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk. -local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim" -if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then - -- stylua: ignore - vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) -end -vim.opt.rtp:prepend(lazypath) - --- validate that lazy is available -if not pcall(require, "lazy") then - -- stylua: ignore - vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {}) - vim.fn.getchar() - vim.cmd.quit() -end - -require "lazy_setup" -require "polish" +-- bootstrap lazy.nvim, LazyVim and your plugins +require("config.lazy") diff --git a/dot_config/nvim/lazy-lock.json b/dot_config/nvim/lazy-lock.json index d33ef0f0..2e3ca208 100644 --- a/dot_config/nvim/lazy-lock.json +++ b/dot_config/nvim/lazy-lock.json @@ -1,62 +1,62 @@ { - "AstroNvim": { "branch": "main", "commit": "8e167226e24f85154a6ba3dd5ea2fe7e85921835" }, - "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, - "SchemaStore.nvim": { "branch": "main", "commit": "6af7d312ad66a056666b1dac803517f051e66ffd" }, - "aerial.nvim": { "branch": "master", "commit": "399e276328be8242ccde01d90f6f6c619f7bb24f" }, - "alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" }, - "astrocommunity": { "branch": "main", "commit": "b2023db22855046db5d39afab7c7add93488ed8e" }, - "astrocore": { "branch": "main", "commit": "151846f72cb8a88a6581674dfdadb9b77beeba04" }, - "astrolsp": { "branch": "main", "commit": "e597eb1cc9f99f8e861346073a17bdf5340586b1" }, - "astrotheme": { "branch": "main", "commit": "8b316aa3ecd8c4206430379c0b1da0b4e7969ab9" }, - "astroui": { "branch": "main", "commit": "e5c5d4570cb00d0e1b2d81db357d108b21503592" }, - "better-escape.nvim": { "branch": "master", "commit": "7e86edafb8c7e73699e0320f225464a298b96d12" }, + "SchemaStore.nvim": { "branch": "main", "commit": "2ef728ff7e790431f1f71052bfd4c5568157e110" }, + "bufferline.nvim": { "branch": "main", "commit": "73540cb95f8d95aa1af3ed57713c6720c78af915" }, + "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" }, - "friendly-snippets": { "branch": "main", "commit": "d5f74ce4dfdd82848f3f4eac65fe6e29ac5df4c2" }, - "gitsigns.nvim": { "branch": "main", "commit": "76927d14d3fbd4ba06ccb5246e79d93b5442c188" }, - "guess-indent.nvim": { "branch": "main", "commit": "b8ae749fce17aa4c267eec80a6984130b94f80b2" }, - "heirline.nvim": { "branch": "master", "commit": "03cff30d7e7d3ba6fdc00925f015822f79cef908" }, + "conform.nvim": { "branch": "master", "commit": "12b3995537f52ba2810a9857e8ca256881febbda" }, + "crates.nvim": { "branch": "main", "commit": "f00e11e8282b94f2a2e938d32712c99f0e0bdeb4" }, + "dashboard-nvim": { "branch": "master", "commit": "1c8b82c5b02bb890862538be2061e37ef801a99b" }, + "dressing.nvim": { "branch": "master", "commit": "5162edb1442a729a885c45455a07e9a89058be2f" }, + "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, + "gitsigns.nvim": { "branch": "main", "commit": "9cafac31a091267838e1e90fd6e083d37611f516" }, "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, - "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "1a14770dc8c7cb29643870ac79788eec6f7ce1f8" }, - "mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "3614a39aae98ccd34124b072939d6283853b3dd2" }, - "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, + "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "273fdde8ac5e51f3a223ba70980e52bbc09d9f6f" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" }, + "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, + "mini.ai": { "branch": "main", "commit": "55e9b7217f29e62f734e239bfeed5731a065d801" }, "mini.bufremove": { "branch": "main", "commit": "931a3bb514147d9e812767275c4beba6b779b1d3" }, - "neo-tree.nvim": { "branch": "main", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, - "neoconf.nvim": { "branch": "main", "commit": "f8947e998dac4213f6c7bb1c7b843cba64db22dd" }, - "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" }, - "none-ls.nvim": { "branch": "main", "commit": "f5632db2491fbe02b54f1a321a98548a8ba2bd15" }, - "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, - "nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" }, + "mini.comment": { "branch": "main", "commit": "f9f1a646fd3d9df7397aa1b9550a875fe8189eb0" }, + "mini.indentscope": { "branch": "main", "commit": "a8274b6ea2d868198d27bd91a31ed5ea3a6a5744" }, + "mini.pairs": { "branch": "main", "commit": "5c975d8f68dc1e11bf4b20ced71e7987ed782513" }, + "mini.surround": { "branch": "main", "commit": "0f528eb2e1bab420c0569d9e52615144c51db920" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, + "neoconf.nvim": { "branch": "main", "commit": "d4a48c2a6fdeec138605cee4eb6f8c6fafd0b3ed" }, + "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, + "neotest": { "branch": "master", "commit": "5caac5cc235d495a2382bc2980630ef36ac87032" }, + "neotest-go": { "branch": "main", "commit": "6a2f996d89fe4631942e035b1c114544ee045043" }, + "noice.nvim": { "branch": "main", "commit": "0cbe3f88d038320bdbda3c4c5c95f43a13c3aa12" }, + "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, "nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, - "nvim-dap": { "branch": "master", "commit": "9d81c11fd185a131f81841e64941859305f6c42d" }, + "nvim-dap": { "branch": "master", "commit": "6ae8a14828b0f3bff1721a35a1dfd604b6a933bb" }, + "nvim-dap-go": { "branch": "main", "commit": "5faf165f5062187320eaf9d177c3c1f647adc22e" }, "nvim-dap-ui": { "branch": "master", "commit": "5934302d63d1ede12c0b22b6f23518bb183fc972" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "3e8e207513e6ef520894950acd76b79902714103" }, + "nvim-lint": { "branch": "master", "commit": "861a04313501563bb1b11f125ae9b7237a517b9b" }, "nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" }, - "nvim-nio": { "branch": "master", "commit": "d8743224616f8107347ddebc77cdbf1e488bdee2" }, + "nvim-nio": { "branch": "master", "commit": "8765cbc4d0c629c8158a5341e1b4305fd93c3a90" }, "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, - "nvim-treesitter": { "branch": "master", "commit": "bbc67f736e22c37c23f2c11a05bfa23b715af30c" }, + "nvim-spectre": { "branch": "master", "commit": "4651801ba37a9407b7257287aec45b6653ffc5e9" }, + "nvim-treesitter": { "branch": "master", "commit": "b1f3f02027f1fd21956c1e219878764014498a59" }, + "nvim-treesitter-context": { "branch": "master", "commit": "2650e6431f7daba5d9c2c64134fa5eb2312eb3d7" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "23b820146956b3b681c19e10d3a8bc0cbd9a1d4c" }, "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "a6382f744f584bbf71d0a563af789af7190aabda" }, - "nvim-ufo": { "branch": "main", "commit": "a5390706f510d39951dd581f6d2a972741b3fa26" }, "nvim-web-devicons": { "branch": "master", "commit": "794bba734ec95eaff9bb82fbd112473be2087283" }, - "nvim-window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" }, - "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "promise-async": { "branch": "main", "commit": "38a4575da9497326badd3995e768b4ccf0bb153e" }, - "resession.nvim": { "branch": "master", "commit": "dc8825439c619030925543a444c4186a2487c200" }, - "smart-splits.nvim": { "branch": "master", "commit": "2179ec0d26aacd4f40c766c79f6ebc83b7001e48" }, + "omnisharp-extended-lsp.nvim": { "branch": "main", "commit": "6e0aa6465f8fa8ac6c833f6ac4713adfee0202a0" }, + "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" }, + "plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" }, + "rustaceanvim": { "branch": "master", "commit": "cd35b0f7fb0c9fe6879b084096230a74fefa4da8" }, + "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, - "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, + "telescope.nvim": { "branch": "master", "commit": "fac83a556e7b710dc31433dec727361ca062dbe9" }, "todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" }, - "toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" }, + "tokyonight.nvim": { "branch": "main", "commit": "67afeaf7fd6ebba000633e89f63c31694057edde" }, + "trouble.nvim": { "branch": "dev", "commit": "b4b9a11b3578d510963f6f681fecb4631ae992c3" }, "vim-illuminate": { "branch": "master", "commit": "e522e0dd742a83506db0a72e1ced68c9c130f185" }, - "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" } + "vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" }, + "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/dot_config/nvim/lazyvim.json b/dot_config/nvim/lazyvim.json new file mode 100644 index 00000000..e4bc2c03 --- /dev/null +++ b/dot_config/nvim/lazyvim.json @@ -0,0 +1,20 @@ +{ + "extras": [ + "lazyvim.plugins.extras.coding.native_snippets", + "lazyvim.plugins.extras.dap.core", + "lazyvim.plugins.extras.editor.trouble-v3", + "lazyvim.plugins.extras.formatting.prettier", + "lazyvim.plugins.extras.lang.go", + "lazyvim.plugins.extras.lang.json", + "lazyvim.plugins.extras.lang.rust", + "lazyvim.plugins.extras.lang.tailwind", + "lazyvim.plugins.extras.lang.typescript", + "lazyvim.plugins.extras.lang.vue", + "lazyvim.plugins.extras.linting.eslint", + "lazyvim.plugins.extras.test.core" + ], + "news": { + "NEWS.md": "3314" + }, + "version": 3 +} \ No newline at end of file diff --git a/dot_config/nvim/lua/community.lua b/dot_config/nvim/lua/community.lua deleted file mode 100644 index d4f2b686..00000000 --- a/dot_config/nvim/lua/community.lua +++ /dev/null @@ -1,5 +0,0 @@ ----@type LazySpec -return { - "AstroNvim/astrocommunity", - { import = "astrocommunity.pack.json" }, -} diff --git a/dot_config/nvim/lua/config/autocmds.lua b/dot_config/nvim/lua/config/autocmds.lua new file mode 100644 index 00000000..27e9e064 --- /dev/null +++ b/dot_config/nvim/lua/config/autocmds.lua @@ -0,0 +1,3 @@ +-- Autocmds are automatically loaded on the VeryLazy event +-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua +-- Add any additional autocmds here diff --git a/dot_config/nvim/lua/config/keymaps.lua b/dot_config/nvim/lua/config/keymaps.lua new file mode 100644 index 00000000..2c134f7b --- /dev/null +++ b/dot_config/nvim/lua/config/keymaps.lua @@ -0,0 +1,3 @@ +-- Keymaps are automatically loaded on the VeryLazy event +-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua +-- Add any additional keymaps here diff --git a/dot_config/nvim/lua/config/lazy.lua b/dot_config/nvim/lua/config/lazy.lua new file mode 100644 index 00000000..417eab12 --- /dev/null +++ b/dot_config/nvim/lua/config/lazy.lua @@ -0,0 +1,45 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" + +if not (vim.uv or vim.loop).fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", + lazypath, + }) +end +vim.opt.rtp:prepend(vim.env.LAZY or lazypath) + +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "plugins" }, + }, + defaults = { + lazy = true, + version = false, + }, + dev = { + patterns = { "2giosangmitom", "LazyVim" }, + path = "~/Workspace/neovim-plugins", + }, + install = { colorscheme = { "tokyonight", "habamax" } }, + checker = { enabled = true }, -- automatically check for plugin updates + performance = { + rtp = { + -- disable some rtp plugins + disabled_plugins = { + "gzip", + "matchit", + "matchparen", + "netrwPlugin", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + }, + }, + }, +}) diff --git a/dot_config/nvim/lua/config/options.lua b/dot_config/nvim/lua/config/options.lua new file mode 100644 index 00000000..9415ff2a --- /dev/null +++ b/dot_config/nvim/lua/config/options.lua @@ -0,0 +1 @@ +vim.opt.writebackup = false diff --git a/dot_config/nvim/lua/lazy_setup.lua b/dot_config/nvim/lua/lazy_setup.lua deleted file mode 100644 index 1cc98d6a..00000000 --- a/dot_config/nvim/lua/lazy_setup.lua +++ /dev/null @@ -1,34 +0,0 @@ -require("lazy").setup({ - { - "AstroNvim/AstroNvim", - version = "^4", - import = "astronvim.plugins", - opts = { - mapleader = " ", - maplocalleader = ",", - icons_enabled = true, - pin_plugins = nil, - update_notifications = true, - }, - }, - { import = "community" }, - { import = "plugins" }, -}, { - install = { colorscheme = { "lienchi", "habamax" } }, - ui = { backdrop = 100 }, - dev = { - path = "~/Workspace/neovim-plugins", - patterns = { "2giosangmitom" }, - }, - performance = { - rtp = { - disabled_plugins = { - "gzip", - "netrwPlugin", - "tarPlugin", - "tohtml", - "zipPlugin", - }, - }, - }, -}) diff --git a/dot_config/nvim/lua/plugins/astrocore.lua b/dot_config/nvim/lua/plugins/astrocore.lua deleted file mode 100644 index db9378ff..00000000 --- a/dot_config/nvim/lua/plugins/astrocore.lua +++ /dev/null @@ -1,43 +0,0 @@ ----@type LazySpec -return { - "AstroNvim/astrocore", - ---@type AstroCoreOpts - opts = { - -- Configure core features of AstroNvim - features = { - large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter - diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on) - highlighturl = true, -- highlight URLs at start - notifications = true, -- enable notifications at start - }, - -- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on - diagnostics = { - virtual_text = true, - underline = true, - }, - -- vim options can be configured here - options = { - opt = { -- vim.opt. - relativenumber = true, -- sets vim.opt.relativenumber - number = true, -- sets vim.opt.number - spell = false, -- sets vim.opt.spell - signcolumn = "auto", -- sets vim.opt.signcolumn to auto - wrap = false, -- sets vim.opt.wrap - }, - g = { -- vim.g. - -- configure global vim variables (vim.g) - -- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup` - -- This can be found in the `lua/lazy_setup.lua` file - }, - }, - -- Mappings can be configured through AstroCore as well. - -- NOTE: keycodes follow the casing in the vimdocs. For example, `` must be capitalized - mappings = { - n = { - -- navigate buffer tabs with `H` and `L` - L = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" }, - H = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" }, - }, - }, - }, -} diff --git a/dot_config/nvim/lua/plugins/astrolsp.lua b/dot_config/nvim/lua/plugins/astrolsp.lua deleted file mode 100644 index b550a8d5..00000000 --- a/dot_config/nvim/lua/plugins/astrolsp.lua +++ /dev/null @@ -1,81 +0,0 @@ ----@type LazySpec -return { - "AstroNvim/astrolsp", - ---@type AstroLSPOpts - opts = { - features = { - autoformat = true, - codelens = true, - inlay_hints = true, - semantic_tokens = true, - }, - formatting = { - format_on_save = { - enabled = true, -- enable or disable format on save globally - allow_filetypes = { -- enable format on save for specified filetypes only - -- "go", - }, - ignore_filetypes = { -- disable format on save for specified filetypes - -- "python", - }, - }, - disabled = { -- disable formatting capabilities for the listed language servers - -- disable lua_ls formatting capability if you want to use StyLua to format your lua code - -- "lua_ls", - }, - timeout_ms = 1000, -- default format timeout - -- filter = function(client) -- fully override the default formatting function - -- return true - -- end - }, - -- enable servers that you already have installed without mason - servers = { - -- "pyright" - }, - -- customize language server configuration options passed to `lspconfig` - ---@diagnostic disable: missing-fields - config = { - -- clangd = { capabilities = { offsetEncoding = "utf-8" } }, - }, - -- customize how language servers are attached - handlers = { - -- a function without a key is simply the default handler, functions take two parameters, the server name and the configured options table for that server - -- function(server, opts) require("lspconfig")[server].setup(opts) end - - -- the key is the server that is being setup with `lspconfig` - -- rust_analyzer = false, -- setting a handler to false will disable the set up of that language server - -- pyright = function(_, opts) require("lspconfig").pyright.setup(opts) end -- or a custom handler function can be passed - }, - -- Configure buffer local auto commands to add when attaching a language server - autocmds = { - -- first key is the `augroup` to add the auto commands to (:h augroup) - lsp_document_highlight = { - -- Optional condition to create/delete auto command group - -- can either be a string of a client capability or a function of `fun(client, bufnr): boolean` - -- condition will be resolved for each client on each execution and if it ever fails for all clients, - -- the auto commands will be deleted for that buffer - cond = "textDocument/documentHighlight", - -- cond = function(client, bufnr) return client.name == "lua_ls" end, - -- list of auto commands to set - { - -- events to trigger - event = { "CursorHold", "CursorHoldI" }, - -- the rest of the autocmd options (:h nvim_create_autocmd) - desc = "Document Highlighting", - callback = function() vim.lsp.buf.document_highlight() end, - }, - { - event = { "CursorMoved", "CursorMovedI", "BufLeave" }, - desc = "Document Highlighting Clear", - callback = function() vim.lsp.buf.clear_references() end, - }, - }, - }, - -- mappings to be set up on attaching of a language server - mappings = { - n = { - gl = { function() vim.diagnostic.open_float() end, desc = "Hover diagnostics" }, - }, - }, - }, -} diff --git a/dot_config/nvim/lua/plugins/astroui.lua b/dot_config/nvim/lua/plugins/astroui.lua deleted file mode 100644 index 2198b73c..00000000 --- a/dot_config/nvim/lua/plugins/astroui.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@type LazySpec -return { - "AstroNvim/astroui", - ---@type AstroUIOpts - opts = { - colorscheme = "lienchi", - icons = { - LSPLoading1 = "⠋", - LSPLoading2 = "⠙", - LSPLoading3 = "⠹", - LSPLoading4 = "⠸", - LSPLoading5 = "⠼", - LSPLoading6 = "⠴", - LSPLoading7 = "⠦", - LSPLoading8 = "⠧", - LSPLoading9 = "⠇", - LSPLoading10 = "⠏", - }, - }, -} diff --git a/dot_config/nvim/lua/plugins/mason.lua b/dot_config/nvim/lua/plugins/mason.lua deleted file mode 100644 index 853eaabf..00000000 --- a/dot_config/nvim/lua/plugins/mason.lua +++ /dev/null @@ -1,20 +0,0 @@ ----@type LazySpec -return { - { - "williamboman/mason-lspconfig.nvim", - opts = function(_, opts) - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { - "lua_ls", - }) - end, - }, - - { - "jay-babu/mason-null-ls.nvim", - opts = function(_, opts) - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { - "stylua", - }) - end, - }, -} diff --git a/dot_config/nvim/lua/plugins/none-ls.lua b/dot_config/nvim/lua/plugins/none-ls.lua deleted file mode 100644 index 382368dc..00000000 --- a/dot_config/nvim/lua/plugins/none-ls.lua +++ /dev/null @@ -1,22 +0,0 @@ -if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE - --- Customize None-ls sources - ----@type LazySpec -return { - "nvimtools/none-ls.nvim", - opts = function(_, config) - -- config variable is the default configuration table for the setup function call - -- local null_ls = require "null-ls" - - -- Check supported formatters and linters - -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting - -- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics - config.sources = { - -- Set a formatter - -- null_ls.builtins.formatting.stylua, - -- null_ls.builtins.formatting.prettier, - } - return config -- return final config table - end, -} diff --git a/dot_config/nvim/lua/plugins/treesitter.lua b/dot_config/nvim/lua/plugins/treesitter.lua deleted file mode 100644 index 56d67d75..00000000 --- a/dot_config/nvim/lua/plugins/treesitter.lua +++ /dev/null @@ -1,10 +0,0 @@ ----@type LazySpec -return { - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { - "lua", - "vim", - }) - end, -} diff --git a/dot_config/nvim/lua/plugins/user.lua b/dot_config/nvim/lua/plugins/user.lua index 274ca972..bc591a07 100644 --- a/dot_config/nvim/lua/plugins/user.lua +++ b/dot_config/nvim/lua/plugins/user.lua @@ -1,16 +1,50 @@ ----@type LazySpec return { { - "2giosangmitom/lienchi.nvim", - enabled = true, - lazy = false, - priority = 1000, - version = "*", - opts = {}, - init = function() vim.g.lienchi_debug = true end, - config = function(_, opts) - require("lienchi").setup(opts) - vim.cmd.colorscheme "lienchi" - end, + "neovim/nvim-lspconfig", + opts = { + servers = { + denols = {}, + }, + }, + }, + + { + "nvim-neo-tree/neo-tree.nvim", + opts = { + popup_border_style = "rounded", + commands = { + parent_or_close = function(state) + local node = state.tree:get_node() + if node:has_children() and node:is_expanded() then + state.commands.toggle_node(state) + else + require("neo-tree.ui.renderer").focus_node(state, node:get_parent_id()) + end + end, + child_or_open = function(state) + local node = state.tree:get_node() + if node:has_children() then + if not node:is_expanded() then -- if unexpanded, expand + state.commands.toggle_node(state) + else -- if expanded and has children, seleect the next child + if node.type == "file" then + state.commands.open(state) + else + require("neo-tree.ui.renderer").focus_node(state, node:get_child_ids()[1]) + end + end + else -- if has no children + state.commands.open(state) + end + end, + }, + window = { + width = 40, + mappings = { + h = "parent_or_close", + l = "child_or_open", + }, + }, + }, }, } diff --git a/dot_config/nvim/lua/polish.lua b/dot_config/nvim/lua/polish.lua deleted file mode 100644 index 14c38cd4..00000000 --- a/dot_config/nvim/lua/polish.lua +++ /dev/null @@ -1,18 +0,0 @@ -if true then return end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE - --- This will run last in the setup process and is a good place to configure --- things like custom filetypes. This just pure lua so anything that doesn't --- fit in the normal config locations above can go here - --- Set up custom filetypes -vim.filetype.add { - extension = { - foo = "fooscript", - }, - filename = { - ["Foofile"] = "fooscript", - }, - pattern = { - ["~/%.config/foo/.*"] = "fooscript", - }, -} diff --git a/dot_config/nvim/neovim.yml b/dot_config/nvim/neovim.yml deleted file mode 100644 index b9235ab8..00000000 --- a/dot_config/nvim/neovim.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -base: lua51 - -globals: - vim: - any: true diff --git a/dot_config/nvim/stylua.toml b/dot_config/nvim/stylua.toml new file mode 100644 index 00000000..5d6c50dc --- /dev/null +++ b/dot_config/nvim/stylua.toml @@ -0,0 +1,3 @@ +indent_type = "Spaces" +indent_width = 2 +column_width = 120 \ No newline at end of file