From e553f7585dd8091c0ae23e6d07577c2ef453272d Mon Sep 17 00:00:00 2001 From: huyjaky Date: Fri, 22 Aug 2025 14:43:56 +0700 Subject: [PATCH] chore: uptodate v5 --- .luarc.json | 3 + .neoconf.json | 20 ++ .stylua.toml | 7 + README.md | 34 +++ init.lua | 27 +++ lazy-lock.json | 50 ++++ lua/community.lua | 12 + lua/core/autocmds.lua | 0 lua/core/mappings.lua | 64 ++++++ lua/core/options.lua | 33 +++ lua/lazy_setup.lua | 32 +++ lua/plugins/astrocore.lua | 57 +++++ lua/plugins/astrolsp.lua | 197 ++++++++++++++++ lua/plugins/astroui.lua | 21 ++ .../configs/lsp/config/basedpyright.lua | 38 ++++ lua/plugins/configs/lsp/config/clangd.lua | 19 ++ .../configs/lsp/config/jedi_language.lua | 31 +++ lua/plugins/configs/lsp/config/pylsp.lua | 16 ++ lua/plugins/configs/lsp/config/pyright.lua | 26 +++ lua/plugins/configs/lsp/config/ruff.lua | 26 +++ lua/plugins/configs/lsp/formatting.lua | 20 ++ lua/plugins/configs/ui/alpha.lua | 173 ++++++++++++++ lua/plugins/configs/ui/heirline.lua | 215 ++++++++++++++++++ lua/plugins/configs/ui/highlights.lua | 27 +++ lua/plugins/configs/ui/icons.lua | 59 +++++ lua/plugins/configs/ui/lspkind.lua | 38 ++++ lua/plugins/configs/ui/status.lua | 39 ++++ lua/plugins/configs/ui/transparent.lua | 39 ++++ lua/plugins/developments.lua | 106 +++++++++ lua/plugins/mason.lua | 25 ++ lua/plugins/neo-tree.lua | 39 ++++ lua/plugins/none-ls.lua | 24 ++ lua/plugins/themes.lua | 14 ++ lua/plugins/treesitter.lua | 34 +++ lua/plugins/user.lua | 146 ++++++++++++ lua/polish.lua | 5 + neovim.yml | 6 + selene.toml | 8 + 38 files changed, 1730 insertions(+) create mode 100644 .luarc.json create mode 100644 .neoconf.json create mode 100644 .stylua.toml create mode 100644 README.md create mode 100644 init.lua create mode 100644 lazy-lock.json create mode 100644 lua/community.lua create mode 100644 lua/core/autocmds.lua create mode 100644 lua/core/mappings.lua create mode 100644 lua/core/options.lua create mode 100644 lua/lazy_setup.lua create mode 100644 lua/plugins/astrocore.lua create mode 100644 lua/plugins/astrolsp.lua create mode 100644 lua/plugins/astroui.lua create mode 100644 lua/plugins/configs/lsp/config/basedpyright.lua create mode 100644 lua/plugins/configs/lsp/config/clangd.lua create mode 100644 lua/plugins/configs/lsp/config/jedi_language.lua create mode 100644 lua/plugins/configs/lsp/config/pylsp.lua create mode 100644 lua/plugins/configs/lsp/config/pyright.lua create mode 100644 lua/plugins/configs/lsp/config/ruff.lua create mode 100644 lua/plugins/configs/lsp/formatting.lua create mode 100644 lua/plugins/configs/ui/alpha.lua create mode 100644 lua/plugins/configs/ui/heirline.lua create mode 100644 lua/plugins/configs/ui/highlights.lua create mode 100644 lua/plugins/configs/ui/icons.lua create mode 100644 lua/plugins/configs/ui/lspkind.lua create mode 100644 lua/plugins/configs/ui/status.lua create mode 100644 lua/plugins/configs/ui/transparent.lua create mode 100644 lua/plugins/developments.lua create mode 100644 lua/plugins/mason.lua create mode 100644 lua/plugins/neo-tree.lua create mode 100644 lua/plugins/none-ls.lua create mode 100644 lua/plugins/themes.lua create mode 100644 lua/plugins/treesitter.lua create mode 100644 lua/plugins/user.lua create mode 100644 lua/polish.lua create mode 100644 neovim.yml create mode 100644 selene.toml diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..8415579 --- /dev/null +++ b/.luarc.json @@ -0,0 +1,3 @@ +{ + "format.enable": false +} diff --git a/.neoconf.json b/.neoconf.json new file mode 100644 index 0000000..2d7a81f --- /dev/null +++ b/.neoconf.json @@ -0,0 +1,20 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + }, + "lspconfig": { + "lua_ls": { + "Lua.format.enable": false + } + } +} diff --git a/.stylua.toml b/.stylua.toml new file mode 100644 index 0000000..bfcffff --- /dev/null +++ b/.stylua.toml @@ -0,0 +1,7 @@ +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/README.md b/README.md new file mode 100644 index 0000000..71d48de --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# AstroNvim Template + +**NOTE:** This is for AstroNvim v5+ + +A template for getting started with [AstroNvim](https://github.com/AstroNvim/AstroNvim) + +## 🛠️ Installation + +#### Make a backup of your current nvim and shared folder + +```shell +mv ~/.config/nvim ~/.config/nvim.bak +mv ~/.local/share/nvim ~/.local/share/nvim.bak +mv ~/.local/state/nvim ~/.local/state/nvim.bak +mv ~/.cache/nvim ~/.cache/nvim.bak +``` + +#### Create a new user repository from this template + +Press the "Use this template" button above to create a new repository to store your user configuration. + +You can also just clone this repository directly if you do not want to track your user configuration in GitHub. + +#### Clone the repository + +```shell +git clone https://github.com// ~/.config/nvim +``` + +#### Start Neovim + +```shell +nvim +``` diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..424e48d --- /dev/null +++ b/init.lua @@ -0,0 +1,27 @@ +-- 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 + local result = vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) + if vim.v.shell_error ~= 0 then + -- stylua: ignore + vim.api.nvim_echo({ { ("Error cloning lazy.nvim:\n%s\n"):format(result), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {}) + vim.fn.getchar() + vim.cmd.quit() + end +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" diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..ea7dab7 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,50 @@ +{ + "AstroNvim": { "branch": "main", "commit": "2bb2fa9a01311ae7f9bfebf7b3ae996bcc4717be" }, + "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, + "aerial.nvim": { "branch": "master", "commit": "deed64693123b45a4e82590cb9b2eb45ea5fd159" }, + "astrocore": { "branch": "main", "commit": "c797dd5a592e2bd154f2503e231b8a4083659534" }, + "astrolsp": { "branch": "main", "commit": "414775e4b49a46bd7105cc5498ea7bb312359bf2" }, + "astrotheme": { "branch": "main", "commit": "0a3fb361f1e3d6a0cbb42e93f3d01fb5203b6752" }, + "astroui": { "branch": "main", "commit": "4943abbd42674b43249313afe83b91065a40e4be" }, + "bamboo.nvim": { "branch": "master", "commit": "56c924d0cbd3a37f9d0ea1235a189a3cccde1f44" }, + "better-escape.nvim": { "branch": "master", "commit": "199dcc2643dec5d8dbdab4ec672cf405224dcb3b" }, + "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, + "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, + "gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" }, + "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, + "heirline.nvim": { "branch": "master", "commit": "fae936abb5e0345b85c3a03ecf38525b0828b992" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, + "lsp_signature.nvim": { "branch": "master", "commit": "62cadce83aaceed677ffe7a2d6a57141af7131ea" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, + "mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, + "mason.nvim": { "branch": "main", "commit": "197f6352c276bbc2d25541dfce00ec50d1a4e88f" }, + "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" }, + "neo-tree.nvim": { "branch": "main", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" }, + "neoconf.nvim": { "branch": "main", "commit": "5aeca07ecb2f506d32e81eb82b0ed384ac2a53c5" }, + "none-ls-extras.nvim": { "branch": "main", "commit": "924fe88a9983c7d90dbb31fc4e3129a583ea0a90" }, + "none-ls.nvim": { "branch": "main", "commit": "5fcb73913a9290f78097e34420fe0e6130c5c33c" }, + "nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" }, + "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, + "nvim-dap": { "branch": "master", "commit": "a479e25ed5b5d331fb46ee4b9e160ff02ac64310" }, + "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, + "nvim-highlight-colors": { "branch": "main", "commit": "1ce0a09bfc28c7274e649d20927cea51e440b65c" }, + "nvim-lsp-endhints": { "branch": "main", "commit": "f977426055fc6b5c6449b416e08e2462f59b9317" }, + "nvim-lspconfig": { "branch": "master", "commit": "fa2662510d30b06168b6e2e6915518decde6bbac" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" }, + "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, + "nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, + "resession.nvim": { "branch": "master", "commit": "cc819b0489938d03e4f3532a583354f0287c015b" }, + "smart-splits.nvim": { "branch": "master", "commit": "ddb23c1a1cf1507bda487cda7f6e4690965ef9f5" }, + "snacks.nvim": { "branch": "main", "commit": "5eac729fa290248acfe10916d92a5ed5e5c0f9ed" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, + "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "e65731d50c548c020f3961bb42071671f0fa923c" }, + "vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" }, + "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" } +} diff --git a/lua/community.lua b/lua/community.lua new file mode 100644 index 0000000..c842899 --- /dev/null +++ b/lua/community.lua @@ -0,0 +1,12 @@ +if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE + +-- AstroCommunity: import any community modules here +-- We import this file in `lazy_setup.lua` before the `plugins/` folder. +-- This guarantees that the specs are processed before any user plugins. + +---@type LazySpec +return { + "AstroNvim/astrocommunity", + { import = "astrocommunity.pack.lua" }, + -- import/override with your plugins folder +} diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua new file mode 100644 index 0000000..e69de29 diff --git a/lua/core/mappings.lua b/lua/core/mappings.lua new file mode 100644 index 0000000..9e87c37 --- /dev/null +++ b/lua/core/mappings.lua @@ -0,0 +1,64 @@ +-- Mapping data with "desc" stored directly by vim.keymap.set(). +-- +-- Please use this mappings table to set keyboard mapping since this is the +-- lower level configuration and more robust one. (which-key will +-- automatically pick-up stored data by this setting.) + +return function() + local mappings = require("astrocore").empty_map_table() + + ------------------------------------------- + ------- Disable default mappings ---------- + ------------------------------------------- + mappings.n[""] = false + mappings.n[""] = false + mappings.n[""] = false + mappings.n[""] = false + mappings.n[""] = false + mappings.n[""] = false + mappings.n[""] = false + mappings.n[""] = false + + ------------------------------------------- + ----------- Utility functions ------------- + ------------------------------------------- + mappings.n[""] = { "u", desc = "Undo" } + -- mappings.n[""] = { "u", desc = "Undo" } + -- mappings.n["K"] = { function() vim.lsp.buf.hover() end, desc = "Hover symbol details"} + + mappings.i[""] = { "u", desc = "Undo" } + mappings.i[""] = { "dw", desc = "Delete a word backward" } + mappings.i[""] = { "w!", desc = "Save file" } + mappings.i["jj"] = { "", desc = "Normal mode" } + + mappings.i[""] = { "", desc = "Unindent line" } + mappings.v[""] = { ">gv", desc = "Indent line" } + mappings.v[""] = { ""] = { "ggVG", desc = "Select all lines" } + + ------ My customs keybinding ------ + mappings.n["xn"] = { "Telescope notify", desc = "Notifications" } + + + return mappings +end diff --git a/lua/core/options.lua b/lua/core/options.lua new file mode 100644 index 0000000..90df014 --- /dev/null +++ b/lua/core/options.lua @@ -0,0 +1,33 @@ +return { + -- vim.opt. + opt = { + number = true, -- show line number + relativenumber = true, -- show relative line number + spell = false, -- disable spell check + wrap = false, -- disable auto wrap lines + signcolumn = "yes", -- show changes of file + foldcolumn = "1", -- show foldcolumn + foldenable = true, -- enable fold for nvim-ufo + foldlevel = 99, -- set high foldlevel for nvim-ufo + foldlevelstart = 99, -- start with all code unfolded + guicursor = "n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20", -- default cursor setting + clipboard = "unnamedplus", -- enable system clipboard + termguicolors = true, -- true color support + mouse = "a", -- enable mouse + mousemoveevent = true, -- enable mousemove event + laststatus = 3, -- only show one statusline + swapfile = false, -- don't use swapfile + shiftwidth = 2, -- number of space inserted for indentation; when zero the 'tabstop' value will be used + tabstop = 2, -- set the number of space in a tab to 4 + softtabstop = 2, -- can be differnt from tabstop + showtabline = 0, -- always show tabline + expandtab = true, -- use spaces instead of tab + undofile = true, -- enable persistent undo + }, + -- vim.g. + 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 + }, +} diff --git a/lua/lazy_setup.lua b/lua/lazy_setup.lua new file mode 100644 index 0000000..4d9552f --- /dev/null +++ b/lua/lazy_setup.lua @@ -0,0 +1,32 @@ +require("lazy").setup({ + { + "AstroNvim/AstroNvim", + version = "^5", -- Remove version tracking to elect for nightly AstroNvim + import = "astronvim.plugins", + opts = { -- AstroNvim options must be set here with the `import` key + mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up + maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up + icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available) + pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override + update_notifications = true, -- Enable/disable notification about running `:Lazy update` twice to update pinned plugins + }, + }, + { import = "community" }, + { import = "plugins" }, +} --[[@as LazySpec]], { + -- Configure any other `lazy.nvim` configuration options here + install = { colorscheme = { "astrotheme", "habamax" } }, + ui = { backdrop = 100 }, + performance = { + rtp = { + -- disable some rtp plugins, add more to your liking + disabled_plugins = { + "gzip", + "netrwPlugin", + "tarPlugin", + "tohtml", + "zipPlugin", + }, + }, + }, +} --[[@as LazyConfig]]) diff --git a/lua/plugins/astrocore.lua b/lua/plugins/astrocore.lua new file mode 100644 index 0000000..2bf86e1 --- /dev/null +++ b/lua/plugins/astrocore.lua @@ -0,0 +1,57 @@ +-- AstroCore provides a central place to modify mappings, vim options, autocommands, and more! +-- Configuration documentation can be found with `:h astrocore` +-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`) +-- as this provides autocomplete and documentation while editing + +---@type LazySpec +return { + "AstroNvim/astrocore", + ---@type AstroCoreOpts + opts = { + -- Configure core features of AstroNvim + features = { + large_buf = { size = 1024 * 256, lines = 10000 }, -- set global limits for large files for disabling features like treesitter + autopairs = false, -- enable autopairs at start + cmp = true, -- enable completion at start + diagnostics = { virtual_text = true, virtual_lines = false }, -- diagnostic settings on startup + highlighturl = false, -- highlight URLs at start + notifications = true, -- enable notifications at start + }, + -- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on + diagnostics = { + virtual_text = false, + underline = true, + }, + -- passed to `vim.filetype.add` + filetypes = { + -- see `:h vim.filetype.add` for usage + extension = { + foo = "fooscript", + }, + filename = { + [".foorc"] = "fooscript", + }, + pattern = { + [".*/etc/foo/.*"] = "fooscript", + }, + }, + sessions = { + -- Configure auto saving + autosave = { + last = false, -- auto save last session + cwd = false, -- auto save session for each working directory + }, + -- Patterns to ignore when saving sessions + ignore = { + dirs = {}, -- working directories to ignore sessions in + filetypes = { "gitcommit", "gitrebase" }, -- filetypes to ignore sessions + buftypes = {}, -- buffer types to ignore sessions + }, + }, + -- vim options can be configured here + options = require"core.options", + -- Mappings can be configured through AstroCore as well. + -- NOTE: keycodes follow the casing in the vimdocs. For example, `` must be capitalized + mappings = require "core.mappings"(), + }, +} diff --git a/lua/plugins/astrolsp.lua b/lua/plugins/astrolsp.lua new file mode 100644 index 0000000..5eda3fa --- /dev/null +++ b/lua/plugins/astrolsp.lua @@ -0,0 +1,197 @@ +-- Configuration documentation can be found with `:h astrolsp` +-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`) +-- as this provides autocomplete and documentation while editing +---@type LazySpec +return { + "AstroNvim/astrolsp", + ---@type AstroLSPOpts + opts = { + -- Configuration table of features provided by AstroLSP + features = { + autoformat = false, -- enable or disable auto formatting on start + codelens = true, -- enable/disable codelens refresh on start + inlay_hints = false, -- enable/disable inlay hints on start + semantic_tokens = true, -- enable/disable semantic token highlighting + }, + -- customize lsp formatting options + formatting = require("plugins.configs.lsp.formatting"), + -- enable servers that you already have installed without mason + + servers = {}, + -- customize language server configuration options passed to `lspconfig` + ---@diagnostic disable: missing-fields + config = { + -- clangd = require "plugins.configs.lsp.config.clangd", + basedpyright = require("plugins.configs.lsp.config.basedpyright"), + jedi_language_server = require("plugins.configs.lsp.config.jedi_language"), + pyright = require("plugins.configs.lsp.config.pyright"), + ruff = require("plugins.configs.lsp.config.ruff"), + pylsp = require("plugins.configs.lsp.config.pylsp"), + }, + -- 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 + -- config Ty + + -- 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, + }, + }, + -- disable inlay hints in insert mode + disable_inlay_hints_on_insert = { + -- only create for language servers that support inlay hints + -- (and only if vim.lsp.inlay_hint is available) + cond = vim.lsp.inlay_hint and "textDocument/inlayHint" or false, + { + -- when going into insert mode + event = "InsertEnter", + desc = "disable inlay hints on insert", + callback = function(args) + local filter = { bufnr = args.buf } + -- if the inlay hints are currently enabled + if vim.lsp.inlay_hint.is_enabled(filter) then + -- disable the inlay hints + vim.lsp.inlay_hint.enable(false, filter) + -- create a single use autocommand to turn the inlay hints back on + -- when leaving insert mode + vim.api.nvim_create_autocmd("InsertLeave", { + buffer = args.buf, + once = true, + callback = function() + vim.lsp.inlay_hint.enable(true, filter) + end, + }) + end + end, + }, + }, + }, + -- mappings to be set up on attaching of a language server + mappings = { + n = { + gh = { + function() + vim.lsp.buf.hover() + end, + desc = "Hover symbol details", + cond = "textDocument/hover", + }, + gl = { + function() + vim.diagnostic.open_float() + end, + desc = "Hover diagnostics", + }, + -- a `cond` key can provided as the string of a server capability to be required to attach, or a function with `client` and `bufnr` parameters from the `on_attach` that returns a boolean + gD = { + function() + vim.lsp.buf.declaration() + end, + desc = "Declaration of current symbol", + cond = "textDocument/declaration", + }, + ["uY"] = { + function() + require("astrolsp.toggles").buffer_semantic_tokens() + end, + desc = "Toggle LSP semantic highlight (buffer)", + cond = function(client) + return client.server_capabilities.semanticTokensProvider and vim.lsp.semantic_tokens + end, + }, + }, + }, + -- A custom `on_attach` function to be run after the default `on_attach` function + -- takes two parameters `client` and `bufnr` (`:h lspconfig-setup`) + on_attach = function(client, bufnr) + -- this would disable semanticTokensProvider for all clients + -- client.server_capabilities.semanticTokensProvider = nil + -- Disable ruff_lsp hover in favor of pyright + if client.name == "ruff" then + client.server_capabilities.hoverProvider = false + end + + -- if client.name == "pyright" then + -- -- disable pyright analysis features + -- client.server_capabilities.documentFormattingProvider = false + -- client.server_capabilities.hoverProvider = false + + -- end + + -- Disable completion feature of pyright + if client.name == "ty" then + client.server_capabilities.completionProvider = false + end + + if client.name == "basedpyright" then + -- Tắt hết các dịch vụ, chỉ giữ lại diagnostics và inlay hints + client.server_capabilities.completionProvider = false + client.server_capabilities.codeLensProvider = false + client.server_capabilities.colorProvider = false + client.server_capabilities.callHierarchyProvider = false + client.server_capabilities.documentFormattingProvider = false + client.server_capabilities.documentRangeFormattingProvider = false + client.server_capabilities.declarationProvider = false + client.server_capabilities.documentLinkProvider = false + client.server_capabilities.definitionProvider = false + client.server_capabilities.documentOnTypeFormattingProvider = false + client.server_capabilities.documentSymbolProvider = false + client.server_capabilities.hoverProvider = false + client.server_capabilities.inlineCompletionProvider = false + client.server_capabilities.inlineValueProvider = false + client.server_capabilities.notebookDocumentSync = false + client.server_capabilities.signatureHelpProvider = false + client.server_capabilities.renameProvider = false + client.server_capabilities.typeDefinitionProvider = false + client.server_capabilities.workspaceSymbolProvider = false + client.server_capabilities.monikerProvider = false + client.server_capabilities.semanticTokensProvider = false + + -- Tắt thêm các capabilities khác có thể có + client.server_capabilities.referencesProvider = false + client.server_capabilities.implementationProvider = false + client.server_capabilities.foldingRangeProvider = false + client.server_capabilities.selectionRangeProvider = false + client.server_capabilities.linkedEditingRangeProvider = false + client.server_capabilities.executeCommandProvider = false + client.server_capabilities.workspace = { + workspaceFolders = { supported = false }, + fileOperations = { supported = false } + } + + -- Giữ lại diagnostics và inlay hints + -- client.server_capabilities.diagnosticProvider = true (mặc định) + -- client.server_capabilities.inlayHintProvider = true (mặc định) + end + end, + }, +} diff --git a/lua/plugins/astroui.lua b/lua/plugins/astroui.lua new file mode 100644 index 0000000..ce5a5a4 --- /dev/null +++ b/lua/plugins/astroui.lua @@ -0,0 +1,21 @@ +-- AstroUI provides the basis for configuring the AstroNvim User Interface +-- Configuration documentation can be found with `:h astroui` +-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`) +-- as this provides autocomplete and documentation while editing + +---@type LazySpec +return { + "AstroNvim/astroui", + ---@type AstroUIOpts + opts = { + -- change colorscheme + colorscheme = "bamboo", + -- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes + highlights = require "plugins.configs.ui.highlights", + -- Icons can be configured throughout the interface + icons = require "plugins.configs.ui.icons", + status = require "plugins.configs.ui.status", + lazygit = false, + }, +} + diff --git a/lua/plugins/configs/lsp/config/basedpyright.lua b/lua/plugins/configs/lsp/config/basedpyright.lua new file mode 100644 index 0000000..afbaa69 --- /dev/null +++ b/lua/plugins/configs/lsp/config/basedpyright.lua @@ -0,0 +1,38 @@ +return { + before_init = function(_, c) + if not c.settings then + c.settings = {} + end + if not c.settings.python then + c.settings.python = {} + end + c.settings.python.pythonPath = vim.fn.exepath("python") + end, + settings = { + basedpyright = { + disableLanguageServices = false, + disableOrganizeImports = true, + disableTaggedHints = true, + + analysis = { + autoSearchPath = false, + logLevel = "Trace", + typeCheckingMode = "standard", + deprecateTypingAliases = false, + inlayHints = { + variableTypes = true, + functionReturnTypes = true, + callArgumentNames = true, + pytestParameters = true, + }, + ignore = { + "unsloth_compiled_cache", + "__pycache__", + "__index__", + }, + useLibraryCodeForTypes = true, + }, + autoImportCompletions = false, + }, + }, +} diff --git a/lua/plugins/configs/lsp/config/clangd.lua b/lua/plugins/configs/lsp/config/clangd.lua new file mode 100644 index 0000000..b3bf5ce --- /dev/null +++ b/lua/plugins/configs/lsp/config/clangd.lua @@ -0,0 +1,19 @@ +-- return { +-- capabilities = { +-- offsetEncoding = "utf-8", +-- }, +-- cmd = { +-- "clangd", +-- "--background-index", +-- "--clang-tidy", +-- "--all-scopes-completion", +-- "--header-insertion=iwyu", +-- "--completion-style=detailed", +-- "--fallback-style=Microsoft", +-- }, +-- init_options = { +-- clangdFileStatus = true, +-- usePlaceholders = false, +-- completeUnimported = true, +-- }, +-- } diff --git a/lua/plugins/configs/lsp/config/jedi_language.lua b/lua/plugins/configs/lsp/config/jedi_language.lua new file mode 100644 index 0000000..9ad8f9d --- /dev/null +++ b/lua/plugins/configs/lsp/config/jedi_language.lua @@ -0,0 +1,31 @@ +return { + + init_options = { + completion = { + disableSnippets = true, + }, + diagnostics = { + enable = false, + }, + hover = { + enable = true, + }, + workspace = { + -- environmentPath = "/home/duckq1u/miniconda3/envs/OCR3/bin/python", + environmentPath = vim.fn.exepath("python"), + ignore = { + "/home/duckq1u/miniconda3/envs/OCR3/lib/python3.11/site-packages/transformers/mode ls/albert/configuration_albert.py", + }, + }, + + jediSettings = { + autoImportModules = { + "numpy", + "pandas", + "torch", + -- "torchmetrics", + -- "pytorch_lightning", + }, + }, + }, +} diff --git a/lua/plugins/configs/lsp/config/pylsp.lua b/lua/plugins/configs/lsp/config/pylsp.lua new file mode 100644 index 0000000..1a34c61 --- /dev/null +++ b/lua/plugins/configs/lsp/config/pylsp.lua @@ -0,0 +1,16 @@ +return { + settings = { + pylsp = { + plugins = { + pyflakes = { enabled = false }, -- disable pyflakes + pycodestyle = { enabled = false }, -- disable pycodestyle + flake8 = { enabled = false }, -- disable flake8 + yapf = { enabled = false }, -- disable yapf + mcabe = { enabled = false }, -- disable mccabe + pylsp_black = { enabled = false }, -- disable black + pylsp_mypy = { enabled = false }, -- disable mypy + pylsp_isort = { enabled = false }, -- disable isort + }, + }, + }, +} diff --git a/lua/plugins/configs/lsp/config/pyright.lua b/lua/plugins/configs/lsp/config/pyright.lua new file mode 100644 index 0000000..4998bbd --- /dev/null +++ b/lua/plugins/configs/lsp/config/pyright.lua @@ -0,0 +1,26 @@ +return { + before_init = function(_, c) + if not c.settings then + c.settings = {} + end + if not c.settings.python then + c.settings.python = {} + end + c.settings.python.pythonPath = vim.fn.exepath("python") + end, + settings = { + pyright = { + disableLanguageServices = false, + disableOrganizeImports = true, + analysis = { + -- diagnosticMode = "openFilesOnly", + typeCheckingMode = "standard", + autoSearchPath = true, + -- diagnosticSeverityOverrides = false, + logLevel = "Trace", + }, + }, + -- python = { + -- }, + }, +} diff --git a/lua/plugins/configs/lsp/config/ruff.lua b/lua/plugins/configs/lsp/config/ruff.lua new file mode 100644 index 0000000..4998bbd --- /dev/null +++ b/lua/plugins/configs/lsp/config/ruff.lua @@ -0,0 +1,26 @@ +return { + before_init = function(_, c) + if not c.settings then + c.settings = {} + end + if not c.settings.python then + c.settings.python = {} + end + c.settings.python.pythonPath = vim.fn.exepath("python") + end, + settings = { + pyright = { + disableLanguageServices = false, + disableOrganizeImports = true, + analysis = { + -- diagnosticMode = "openFilesOnly", + typeCheckingMode = "standard", + autoSearchPath = true, + -- diagnosticSeverityOverrides = false, + logLevel = "Trace", + }, + }, + -- python = { + -- }, + }, +} diff --git a/lua/plugins/configs/lsp/formatting.lua b/lua/plugins/configs/lsp/formatting.lua new file mode 100644 index 0000000..be08b7b --- /dev/null +++ b/lua/plugins/configs/lsp/formatting.lua @@ -0,0 +1,20 @@ +-- Customize lsp formatting options +return { -- control auto formatting on save + format_on_save = { + enabled = false, -- 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 + -- "lua", + }, + }, + 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 +} diff --git a/lua/plugins/configs/ui/alpha.lua b/lua/plugins/configs/ui/alpha.lua new file mode 100644 index 0000000..340051a --- /dev/null +++ b/lua/plugins/configs/ui/alpha.lua @@ -0,0 +1,173 @@ +-- Store alpha themes + +local banners = { + [1] = { + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⣤⣤⣶⣶⣶⣶⣶⣦⣤⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⠿⠿⠿⢿⣿⣿⣿⠿⠿⠿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠿⢿⣿⣿⣿⡿⠿⠿⢿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⡄⠀⠀⠸⢿⣿⠟⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠘⢿⣿⡿⠁⠀⠀⣾⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⢀⣠⣾⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⠟⢹⠛⢿⣿⣿⣿⣿⣿⣿⣶⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⣸⡀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣠⣼⣿⣷⣤⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠉⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠈⠉⠁⠈⠉⠁⠉⠉⠀⠉⠉⠈⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + }, + [2] = { + " ", + " ", + " ", + " ⣴⣶⣤⡤⠦⣤⣀⣤⠆ ⣈⣭⣿⣶⣿⣦⣼⣆ ", + " ⠉⠻⢿⣿⠿⣿⣿⣶⣦⠤⠄⡠⢾⣿⣿⡿⠋⠉⠉⠻⣿⣿⡛⣦ ", + " ⠈⢿⣿⣟⠦ ⣾⣿⣿⣷ ⠻⠿⢿⣿⣧⣄ ", + " ⣸⣿⣿⢧ ⢻⠻⣿⣿⣷⣄⣀⠄⠢⣀⡀⠈⠙⠿⠄ ", + " ⢠⣿⣿⣿⠈ ⣻⣿⣿⣿⣿⣿⣿⣿⣛⣳⣤⣀⣀ ", + " ⢠⣧⣶⣥⡤⢄ ⣸⣿⣿⠘ ⢀⣴⣿⣿⡿⠛⣿⣿⣧⠈⢿⠿⠟⠛⠻⠿⠄ ", + " ⣰⣿⣿⠛⠻⣿⣿⡦⢹⣿⣷ ⢊⣿⣿⡏ ⢸⣿⣿⡇ ⢀⣠⣄⣾⠄ ", + " ⣠⣿⠿⠛ ⢀⣿⣿⣷⠘⢿⣿⣦⡀ ⢸⢿⣿⣿⣄ ⣸⣿⣿⡇⣪⣿⡿⠿⣿⣷⡄ ", + " ⠙⠃ ⣼⣿⡟ ⠈⠻⣿⣿⣦⣌⡇⠻⣿⣿⣷⣿⣿⣿ ⣿⣿⡇ ⠛⠻⢷⣄ ", + " ⢻⣿⣿⣄ ⠈⠻⣿⣿⣿⣷⣿⣿⣿⣿⣿⡟ ⠫⢿⣿⡆ ", + " ⠻⣿⣿⣿⣿⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⡟⢀⣀⣤⣾⡿⠃ ", + " ", + }, + [3] = { + " ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡰⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀", + " ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⢀⢄⠀⠀⡴⠁⠈⡆⠀⢀⡤⡀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀", + " ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠢⣄⠀⠀⡇⠀⡕⠀⢸⠀⢠⠃⠀⢮⠀⠹⠀⠀⣠⢾⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀", + " ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⣞⠀⢀⠇⠀⡇⠀⡸⠀⠈⣆⠀⡸⠀⢰⠀⠀⡇⣸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀", + " ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⠘⢶⣯⣊⣄⡨⠟⡡⠁⠐⢌⠫⢅⣢⣑⣵⠶⠁⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀", + " ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⢀⣀⣀⠀⠀⠀⠀⠀⣼⣀⠀⢀⠒⠒⠂⠉⠀⠀⠀⠀⠁⠐⠒⠂⡀⠀⣸⣄⠀⠀⠀⠀⠀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀", + " ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⢠⢮⣵⣶⣦⡩⡲⣄⠀⠀⣿⣿⣽⠲⠭⣥⣖⣂⣀⣀⣀⣀⣐⣢⡭⠵⠖⣿⣿⢫⠀⠀⣠⣖⣯⣶⣶⣮⡷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀", + " ⠀⠀ ⠀⠀⠀⠀⠀⠀⣀⣤⣴⣶⣾⣿⣿⣿⣶⣶⣦⣄⡀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⢸⡟⢉⣉⠙⣿⣿⣦⠀⣿⣿⣿⣿⣷⣲⠶⠤⠭⣭⡭⠭⠴⠶⣖⣾⣿⣿⡿⢸⢀⣼⣿⡿⠋⣉⠉⢳⠁⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣶⣿⣿⣿⣿⣶⣶⣤⣄⡀⠀⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⠀⢀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⡀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠮⣳⣴⣫⠂⠘⣿⣿⣇⢷⢻⣿⣿⣿⣿⣿⣷⣶⣶⣶⣶⣿⣿⣿⣿⣿⢿⢃⡟⣼⣿⣿⠁⠸⣘⣢⣚⠜⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣄⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠈⢧⢻ ⣿⣿⣟⠻⣿⣿⣿⣿⠛⣩⣿⣿ ⢟⡞⢀⣿⣿⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀ ", + "⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣒⣒⣦⣄⣿⣿⣿⢀⡬⣟⣯ ⣿⢷⣼⡟⢿⣿⡿⣿⣿ ⡻⣤⡀⣿⣿⣸⡠⢔⣒⡒⢤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀ ", + "⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇ ⠀⠀⠀⣀⣀⠀⠀⠀⠀⠀⠀⠀⢾⣟⣅⠉⢎⣽⣿⣿⡏⡟⣤⣮⣿⣿ ⡏⣿⠀⠀⣿⢡⣷ ⣿⣟⢎⣷⢻⣿⣿⣾⡟⠉⣽⡇⡇⠀⠀⠀⠀⠀⠀⠀⣀⣀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀ ", + "⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⢿⣿⣿⣿⣿⣿ ⠀⡴⣫⣭⣭⣍⡲⢄⠀⠀⠀⠀⠈⠻⠋⣠⡮⣻⣿⣿⠃⠳⣏⣼⣿⣿⣿⣿⡇⣿⣴⣴⣿⣾⣿⣿⣿⡿⣄⣩⠏⢸⣿⣿⣿⣧⡀⠛⠞⠁⠀⠀⠀⢀⣤⣺⣭⣭⣭⡝⢦⠀⠀⠀⠀⢸⣿⣿⣿⡿⠿⠛⠻⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠟⠛⠿⢿⣿⣿⣿⡇ ", + "⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣻⣿⣿⣿⡟⠁⠀⠀⠀⠈⢻⣿⣿⣿ ⢸⢹⡟⠁⠀⠉⢫⡳⣵⣄⠀⠀⢀⠴⢊⣿⣾⣿⣿⣿⠀⠀⠀⠻⣬⣽⣿⣿⣿⣿ ⣿⣿⣿⣿⣯⣵⠏⠀⠀⢸⣿⣿⣿⣿⣿⣗⢤⡀⠀⠀⣠⣿⢟⠟⠉⠀⠈⢻⢸⡆⠀⠀⠀⢸⣿⣿⠏⣠⣤⡄⣠⣤⡌⢿⣿⣿⣿⣿⡿⢁⣤⣄⢀⣤⣄⠹⣿⣿⡇ ", + "⠀⠀⠀⠀⣿⣿⣿⠛⠛⠛⠛⠛⠛⢛⣿⣮⣿⣿⣿⠀⠀⠀⠀⠀⠀⢈⣿⣿⡟ ⠘⢏⢧⣤⡀⠀⠀⣇⢻⣿⣆⢔⢕⣵⠟⣏⣿⣿⣿⠋⣵⠚⠄⣾⣿⣿⣿⡿⠟⣛⣛⣛⣛⠻⣿⣿⣿⣿⣧⢰⠓⣏⠻⣿⣿⣿⢹⠻⣿⣿⢦⣸⣿⡏⡾⠀⠀⢠⣤⠎⡼⠀⠀⠀⠀⠸⣿⣿⠀⢿⣿⣿⣿⣿⡟⢸⣿⣿⣿⣿⡇⠸⣿⣿⣿⣿⡿⠀⣿⣿⠇ ", + "⠀⠀⠀⠀⠸⣿⣿⣧⡀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⢀⣼⣿⣿⠃ ⠀⠈⠑⠂⠁⠀⠀⣿⠸⣿⢏⢂⣾⠇⠀⣿⣿⣿⡇⡆⠹⢷⣴⣿⡿⠟⠉⣐⡀⠄⣠⡄⡠⣁⡠⠙⠻⢿⣿⣴⡾⠃⢠⢹⣿⣿⢸⠀⢹⣿⣷⢹⣿⢃⡇⠀⠀⠈⠒⠋⠀⠀⠀⠀⠀⠀⢻⣿⣆⠀⠙⠿⠟⠋⢀⣾⣿⣿⣿⣿⣷⡀⠈⠻⡿⠋⠁⣰⣿⡟⠀ ", + "⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣶⣿⣿⣿⣿⠟⠉⠻⣿⣿⣿⣿⣶⣿⣿⣿⣿⣷⠀ ⠀⠀⠀⠀⠀⠀⠀⢹⡀⣿⢀⣿⣿⡀⠀⢫⣿⣿⣷⣙⠒⠀⠄⠐⠂⣼⠾⣵⠾⠟⣛⣛⠺⢷⣮⠷⣢⠐⠂⠀⠀⠒⣣⣾⣿⡿⡎⠀⢠⣿⣿⡄⣿⣸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣶⣶⣶⣾⣿⣿⡿⠋⠙⢿⣿⣿⣷⣶⣶⣶⣿⣿⣿⡇⠀ ", + "⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⡇⣠⣷⡀⢹⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀ ⠀⠀⠀⠀⠀⠀⠀⠘⣟⣿⢸⣿⣿⣷⣄⡈⣾⣿⣿⣿⣿⣿⠻⡷⢺⠃⠠⠁⠈⠋⠀⠀⠉⠁⠙⡀⠘⡗⣾⠿⣿⣿⣿⣿⣿⡿⢀⣴⣿⣿⡿⢃⣯⣽⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⢁⣴⣧⡀⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀ ", + "⠀⠀⠀⠀⠀⠈⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⡆⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣵⡞⠀⠁⠐⢁⠎⠄⣠⠀⠀⡄⠀⢳⠈⠆⠈⠈⢳⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⣸⡷⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣌⠛⢿⣿⣿⣿⣿⣿⣿⠿⠋⣠⣢⠂⠀⢂⠌⠀⠃⠀⠀⠘⠀⢢⡑⠀⠰⣵⡀⠻⢿⣿⣿⣿⣿⣿⣿⡿⠋⣰⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀ ", + " ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠋⠛⠋⠛⠙⠛⠙⠛⠙⠛⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠙⠳⣤⣭⢛⣻⠿⣿⣷⣶⢞⡟⡁⢀⢄⠎⠀⠀⠀⠀⠀⡀⠁⠀⠳⢠⠀⢈⢿⢳⣶⣾⣿⠿⣟⣛⣅⡴⠞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠙⠛⠙⠛⠛⠋⠛⠋⠛⠋⠀⠀⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠉⠙⠛⠻⠿⠿⡟⢜⠔⡠⢊⠔⠀⡆⠀⡆⠀⠀⢡⢰⢠⠀⢢⠱⣌⢂⠃⢿⠿⠿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⢀⢤⣊⡰⠵⢺⠉⠸⠀⢰⢃⠀⠀⠀⠀⠀⠸⢸⠀⠀⡇⡞⡑⠬⢆⣑⢤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠈⠁⠀⠀⠀⠘⣾⡸⢀⡜⡾⡀⡇⠀⠀⡴⢠⢻⢦⠀⢃⡿⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⡎⠀⠱⡡⠐⠀⠠⠃⢢⠋⠀⢧⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢤⡀⢀⠔⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠱⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ", + " " + }, + [4] = { + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣤⣤⣤⣤⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣾⣿⣿⠿⠿⠿⠿⢿⣿⣿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⠟⠋⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⣶⣾⣿⣿⠀⣿⣿⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⣿⠀⣿⣿⣷⣶⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣾⣿⡿⠟⠛⠉⠉⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠉⠉⠛⠻⢿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⡿⠋⠀⠀⠀⠀⠀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⠀⠀⠀⠀⠀⠙⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⠃⠀⠀⣠⣶⣾⣿⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⣿⣷⣦⣄⠀⠀⠸⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⠀⢀⣾⣿⡿⠛⠉⠀⣿⣿⡇⠀⠀⣀⣀⠀⠀⠀⠀⠀⣀⣀⠀⠀⢸⣿⣿⠀⠉⠛⢿⣿⣷⡀⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣆⢸⣿⣿⠀⠀⠀⠀⣿⣿⡇⠀⢾⣿⣿⡇⠀⠀⠀⢾⣿⣿⡇⠀⢸⣿⣿⠀⠀⠀⠈⣿⣿⡇⣼⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⣿⣄⠀⠀⠀⣿⣿⡇⠀⠈⠙⠋⠀⠀⠀⠀⠈⠙⠋⠀⠀⢸⣿⣿⠀⠀⠀⣰⣿⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⢿⣿⣿⣿⣷⣶⣶⣿⣿⣿⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣶⣿⣿⣿⣶⣶⣿⣿⣿⣿⡿⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠛⠛⠛⠛⠛⠛⠛⠛⢻⣿⣿⠛⣿⣿⣿⢻⣿⣿⠛⠛⠛⠛⠛⠛⠛⠛⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⠀⢸⣿⣿⠀⣿⣿⣿⢸⣿⣿⠀⠀⣿⣿⣿⣿⣿⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣈⣉⣉⣉⣉⡉⢹⣿⣿⠀⢸⣿⣿⠀⣿⣿⣿⢸⣿⣿⠀⠀⣿⣿⡏⢉⣉⣉⣉⣉⣁⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⣿⣿⠀⢸⣿⣿⠀⣿⣿⣿⢸⣿⣿⠀⠀⣿⣿⡇⢸⣿⣿⣿⣿⣿⣿⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡇⢸⣿⣿⠀⢸⣿⣿⠀⣿⣿⣿⢸⣿⣿⠀⠀⣿⣿⡇⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡇⢸⣿⣿⠀⢸⣿⣿⠀⣿⣿⣿⢸⣿⣿⠀⠀⣿⣿⡇⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⡇⢸⣿⣿⣄⣼⣿⣿⠀⣿⣿⣿⠸⣿⣿⣆⣠⣿⣿⡇⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣄⠻⢿⣿⣿⠿⢋⣴⣿⣿⣿⣦⡙⠿⣿⣿⡿⠛⣠⣿⣿⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣷⣶⣤⣴⣶⣿⣿⠿⠙⢿⣿⣿⣶⣦⣴⣶⣿⣿⡿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠻⠿⠿⠛⠋⠁⠀⠀⠀⠈⠙⠛⠿⠿⠛⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + }, + [5] = { + [[ ██████ ]], + [[ ████▒▒▒▒▒▒████ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], + [[ ██▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ]], + [[ ██▒▒▒▒▒▒ ▒▒▓▓▒▒▒▒▒▒ ▓▓▓▓ ]], + [[ ██▒▒▒▒▒▒ ▒▒▓▓▒▒▒▒▒▒ ▒▒▓▓ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒ ██ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], + [[ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ]], + [[ ██▒▒██▒▒▒▒▒▒██▒▒▒▒▒▒▒▒██▒▒▒▒██ ]], + [[ ████ ██▒▒██ ██▒▒▒▒██ ██▒▒██ ]], + [[ ██ ██ ████ ████ ]], + }, + [7] = { + "⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⣀⣤⣴⣶⣾⣿⣿⣿⣶⣶⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣶⣿⣿⣿⣿⣶⣶⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣤⣶⣶⣿⣿⣿⣷⣶⣶⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⢿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⡿⠿⠛⠻⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠟⠛⠿⢿⣿⣿⣿⡇⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⠿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣻⣿⣿⣿⡟⠁⠀⠀⠀⠈⢻⣿⣿⣿⠀⠀⠀⠀⠀⠀⢸⣿⣿⠏⣠⣤⡄⣠⣤⡌⢿⣿⣿⣿⣿⡿⢁⣤⣄⢀⣤⣄⠹⣿⣿⡇⠀⠀⠀⠀⠀⢺⣿⣿⡿⠋⠀⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠛⠛⠛⠛⠛⠛⢛⣿⣮⣿⣿⣿⠀⠀⠀⠀⠀⠀⢈⣿⣿⡟⠀⠀⠀⠀⠀⠀⠸⣿⣿⠀⢿⣿⣿⣿⣿⡟⢸⣿⣿⣿⣿⡇⠸⣿⣿⣿⣿⡿⠀⣿⣿⠇⠀⠀⠀⠀⠀⢸⣿⣿⡇⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⠋⠁⠠⢴⣾⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣧⡀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⢀⣼⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⢻⣿⣆⠀⠙⠿⠟⠋⢀⣾⣿⣿⣿⣿⣷⡀⠈⠻⡿⠋⠁⣰⣿⡟⠀⠀⠀⠀⠀⠀⠀⢿⣿⣷⣄⠀⠀⠀⢀⣰⣿⣿⣿⣿⣿⣿⣷⣶⣦⣤⣄⣼⣿⣿⡏⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣶⣿⣿⣿⣿⠟⠉⠻⣿⣿⣿⣿⣶⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣶⣶⣶⣾⣿⣿⡿⠋⠙⢿⣿⣿⣷⣶⣶⣶⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣷⣾⣿⣿⣿⡟⢻⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⡇⣠⣷⡀⢹⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⢁⣴⣧⡀⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⢀⣼⣆⢘⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠋⠛⠋⠛⠙⠛⠙⠛⠙⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠙⠛⠙⠛⠛⠋⠛⠋⠛⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠛⠙⠛⠛⠋⠛⠋⠛⠋⠛⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + }, + [8] = { + "⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⣀⣤⣴⣶⣾⣿⣿⣿⣶⣶⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⢿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣻⣿⣿⣿⡟⠁⠀⠀⠀⠈⢻⣿⣿⣿⠀⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠛⠛⠛⠛⠛⠛⢛⣿⣮⣿⣿⣿⠀⠀⠀⠀⠀⠀⢈⣿⣿⡟⠀⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣧⡀⠀⠀⠀⢀⣼⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⢀⣼⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣶⣿⣿⣿⣿⠟⠉⠻⣿⣿⣿⣿⣶⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⡇⣠⣷⡀⢹⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠋⠛⠋⠛⠙⠛⠙⠛⠙⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + }, + [9] = { + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣶⣿⣿⣿⣿⣶⣶⣤⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⡿⠿⠛⠻⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠟⠛⠿⢿⣿⣿⣿⡇⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⢸⣿⣿⠏⣠⣤⡄⣠⣤⡌⢿⣿⣿⣿⣿⡿⢁⣤⣄⢀⣤⣄⠹⣿⣿⡇⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⠸⣿⣿⠀⢿⣿⣿⣿⣿⡟⢸⣿⣿⣿⣿⡇⠸⣿⣿⣿⣿⡿⠀⣿⣿⠇⠀⠀⠀⠀⠀ ", + "⠀⠀⠀⠀⠀⠀⠀⢻⣿⣆⠀⠙⠿⠟⠋⢀⣾⣿⣿⣿⣿⣷⡀⠈⠻⡿⠋⠁⣰⣿⡟⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣶⣶⣶⣾⣿⣿⡿⠋⠙⢿⣿⣿⣷⣶⣶⣶⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⢁⣴⣧⡀⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠋⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠛⠙⠛⠙⠛⠛⠋⠛⠋⠛⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + }, + [10] = { + [[ __ ]], + [[ ___ ___ ___ __ __ /\_\ ___ ___ ]], + [[ / _ `\ / __`\ / __`\/\ \/\ \\/\ \ / __` __`\ ]], + [[/\ \/\ \/\ __//\ \_\ \ \ \_/ |\ \ \/\ \/\ \/\ \ ]], + [[\ \_\ \_\ \____\ \____/\ \___/ \ \_\ \_\ \_\ \_\]], + [[ \/_/\/_/\/____/\/___/ \/__/ \/_/\/_/\/_/\/_/]], + [[ Welcome       ]], + }, +} + +return banners diff --git a/lua/plugins/configs/ui/heirline.lua b/lua/plugins/configs/ui/heirline.lua new file mode 100644 index 0000000..aa9ba51 --- /dev/null +++ b/lua/plugins/configs/ui/heirline.lua @@ -0,0 +1,215 @@ +local M = {} + +local status = require "astroui.status" +local get_icon = require("astroui").get_icon +local is_available = require("astrocore").is_available +local path_func = status.provider.filename { modify = ":.:h", fallback = "" } + +-- custom statusline +M.statusline = { + hl = { fg = "fg", bg = "bg" }, + -- Show mode text + status.component.mode { + -- enable mode text with padding as well as an icon before it + mode_text = { + icon = { kind = "Mode", padding = { left = 0, right = 0 } }, + }, + -- surround the component with a separators + surround = { + separator = "left", + }, + }, + status.component.file_info { + file_icon = { padding = { left = 0, right = 1 } }, + filename = { fallback = "Empty" }, + filetype = false, + file_modified = false, + surround = { + separator = "none", + color = "bg", + }, + }, + status.component.git_branch { + padding = { left = 0, right = 1 }, + surround = { + separator = "none", + color = "bg", + }, + }, + -- Add a icon to represent diagnostic and git git diff + -- status.component.builder { + -- provider = function() return get_icon "Diagnostic" .. "/" .. get_icon "Github" end, + -- hl = { fg = "black" }, + -- surround = { + -- separator = { " ", "" }, + -- color = "#81ab9e", + -- }, + -- }, + status.component.diagnostics { + surround = { + separator = "none", + color = "bg", + }, + }, + status.component.git_diff { + padding = { left = 1 }, + surround = { + separator = "none", + color = "bg", + }, + }, + status.component.fill(), + -- Show search counts and results + { + condition = function(self) + local query = vim.fn.getreg "/" + if query == "" then return false end + query = query:gsub([[^\V]], "") + query = query:gsub([[\<]], ""):gsub([[\>]], "") + + local search_count = vim.fn.searchcount { recompute = 1, maxcount = -1 } + if search_count.total == 0 then return false end + + self.query = query + self.count = search_count + return true + end, + status.component.builder { + provider = function(self) + return status.utils.stylize(" " .. self.query .. " " .. self.count.current .. "/" .. self.count.total, { + icon = { kind = "Search" }, + }) + end, + hl = { fg = "black" }, + surround = { + separator = "left", + color = "search_bg", + }, + }, + }, + -- Show file encoding + status.component.builder { + provider = function() + return status.utils.stylize(string.upper(vim.bo.fileencoding), { + icon = { kind = "FileEncoding", padding = { right = 1 } }, + }) + end, + hl = { fg = "text_fg" }, + padding = { right = 1 }, + }, + -- Show tab width + status.component.builder { + provider = function() + return status.utils.stylize(tostring(vim.bo.tabstop), { + icon = { kind = "TabWidth", padding = { right = 1 } }, + }) + end, + hl = { fg = "text_fg" }, + padding = { right = 1 }, + }, + -- Show Grapple tag + status.component.builder { + condition = function() + if status.condition.is_file and is_available "grapple.nvim" then return true end + return false + end, + provider = function() + local tag = tostring(require("grapple").name_or_index()) + if tag == "nil" then tag = "NO" end + return status.utils.stylize(tag, { + icon = { kind = "Grapple", padding = { right = 1 } }, + }) + end, + + hl = { fg = "text_fg" }, + padding = { right = 1 }, + }, + -- Show Codeium status + status.component.builder { + condition = function() + if status.condition.lsp_attached and is_available "neocodeium" then return true end + return false + end, + provider = function() + local codeium_status = "OFF" + if require("neocodeium.options").options.enabled == true then codeium_status = "ON" end + return status.utils.stylize(codeium_status, { + icon = { kind = "Codeium", padding = { right = 1 } }, + }) + end, + hl = { fg = "text_fg" }, + padding = { right = 1 }, + }, + -- status.component.lsp { + -- lsp_client_names = { + -- icon = { kind = "ActiveLSP", padding = { right = 1 } }, + -- }, + -- surround = { separator = "left" }, + -- }, + { + status.component.builder { + { provider = get_icon "ScrollText" }, + padding = { right = 1 }, + hl = { fg = "black" }, + surround = { + separator = { " ", "" }, + color = { main = "nav_icon_bg", left = "bg" }, + }, + }, + status.component.nav { + percentage = { padding = { left = 0 } }, + ruler = false, + scrollbar = false, + surround = { separator = { "", "" } }, + }, + }, +} + +-- custom winbar +M.winbar = { + -- store the current buffer number + init = function(self) self.bufnr = vim.api.nvim_get_current_buf() end, + fallthrough = false, -- pick the correct winbar based on condition + -- inactive winbar + { + condition = function() return not status.condition.is_active() end, + -- show the path to the file relative to the working directory + status.component.separated_path { path_func = path_func }, + -- add the file name and icon + status.component.file_info { + file_icon = { hl = status.hl.file_icon "winbar", padding = { left = 0 } }, + filename = {}, + filetype = false, + file_modified = false, + file_read_only = false, + hl = status.hl.get_attributes("winbarnc", true), + surround = false, + update = "BufEnter", + }, + }, + -- active winbar + { + -- show the path to the file relative to the working directory + status.component.separated_path { path_func = path_func }, + -- add the file name and icon + status.component.file_info { -- add file_info to breadcrumbs + file_icon = { hl = status.hl.filetype_color, padding = { left = 0 } }, + filename = {}, + filetype = false, + file_modified = false, + file_read_only = false, + hl = status.hl.get_attributes("winbar", true), + surround = false, + update = "BufEnter", + }, + -- show the breadcrumbs + status.component.breadcrumbs { + icon = { hl = true }, + hl = status.hl.get_attributes("winbar", true), + prefix = true, + padding = { left = 0 }, + }, + }, +} + +return M diff --git a/lua/plugins/configs/ui/highlights.lua b/lua/plugins/configs/ui/highlights.lua new file mode 100644 index 0000000..a21b1ab --- /dev/null +++ b/lua/plugins/configs/ui/highlights.lua @@ -0,0 +1,27 @@ +return { + init = function() -- this table overrides highlights in all themes + local get_hlgroup = require("astroui").get_hlgroup + local ui = require("astroui") + local utils = require("astrocore") + + local hl = { + -- remove background of virtual texts + DiagnosticVirtualTextError = { fg = get_hlgroup("DiagnosticError").fg, bg = "none" }, + DiagnosticVirtualTextHint = { fg = get_hlgroup("DiagnosticHint").fg, bg = "none" }, + DiagnosticVirtualTextInfo = { fg = get_hlgroup("DiagnosticInfo").fg, bg = "none" }, + DiagnosticVirtualTextWarn = { fg = get_hlgroup("DiagnosticWarn").fg, bg = "none" }, + + CursorLineNr = { fg = "#FFD700", bg = "none", bold = true }, + CursorLine = { fg = "none", bg = "#004C4C", bold = true }, + Visual = { fg = "#000000", bg = "#FFFFFF", bold = true }, + + -- remove background of inlay hints + LspInlayHint = { fg = "#FF748B", bg = "none" }, + } + + return hl + end, + astrotheme = { -- a table of overrides/changes when applying the astrotheme theme + -- Normal = { bg = "#000000" }, + }, +} diff --git a/lua/plugins/configs/ui/icons.lua b/lua/plugins/configs/ui/icons.lua new file mode 100644 index 0000000..b7a37bf --- /dev/null +++ b/lua/plugins/configs/ui/icons.lua @@ -0,0 +1,59 @@ +return { + -- LSP + ActiveLSP = " ", + ActiveTS = " ", + LSPLoaded = " ", + LSPLoading1 = "⠋ ", + LSPLoading2 = "⠙ ", + LSPLoading3 = "⠹ ", + LSPLoading4 = "⠸ ", + LSPLoading5 = "⠼ ", + LSPLoading6 = "⠴ ", + LSPLoading7 = "⠦ ", + LSPLoading8 = "⠧ ", + LSPLoading9 = "⠇ ", + LSPLoading10 = "⠏ ", + -- Git + Github = "  ", + GitAdd = " ", + GitBranch = " ", + GitChange = " ", + GitConflict = " ", + GitDelete = " ", + GitIgnored = " ", + GitRenamed = " ", + GitStaged = "✓ ", + GitUnstaged = "✗ ", + GitUntracked = "★ ", + Neogit = " ", + -- Files + Ellipsis = " ", + DefaultFile = " ", + FileModified = " ", + FileReadOnly = " ", + FoldClosed = " ", + FoldOpened = " ", + FolderClosed = " ", + FolderEmpty = " ", + FolderOpen = " ", + -- DAP + DapBreakpoint = " ", + DapBreakpointCondition = " ", + DapBreakpointRejected = " ", + DapLogPoint = " ", + DapStopped = " ", + -- Diagnostics + Diagnostic = " 󰒡 ", + DiagnosticError = " ", + DiagnosticHint = " ", + DiagnosticInfo = "󰋼 ", + DiagnosticWarn = " ", + -- Misc + Mode = "     ", + FileEncoding = " ", + ScrollText = " ", + TabWidth = " ", + Search = " ", + Grapple = "󰓹 ", + Codeium = "󱚝 ", +} diff --git a/lua/plugins/configs/ui/lspkind.lua b/lua/plugins/configs/ui/lspkind.lua new file mode 100644 index 0000000..f125150 --- /dev/null +++ b/lua/plugins/configs/ui/lspkind.lua @@ -0,0 +1,38 @@ +-- LSP kind symbol map +return { + Array = " ", + Boolean = " ", + Class = " ", + Color = " ", + Constant = " ", + Constructor = " ", + Enum = " ", + EnumMember = "  ", + Event = " ", + Field = " ", + File = "󰈔 ", + Folder = " ", + Function = "󰡱 ", + Interface = " ", + Key = " ", + Keyword = "󰌋 ", + Method = " ", + Module = " ", + Namespace = " ", + Null = " ", + Number = " ", + Object = " ", + Operator = " ", + Package = " ", + Property = " ", + Reference = " ", + Snippet = "󰗀 ", + String = " ", + Struct = " ", + Text = "󰉿 ", + TypeParameter = " ", + Unit = " ", + Value = "󱄑 ", + Variable = " ", +} + diff --git a/lua/plugins/configs/ui/status.lua b/lua/plugins/configs/ui/status.lua new file mode 100644 index 0000000..113948e --- /dev/null +++ b/lua/plugins/configs/ui/status.lua @@ -0,0 +1,39 @@ +return { + separators = { + left = { " ", " " }, -- separator for the left side of the statusline + right = { " ", "" }, -- separator for the right side of the statusline + -- tab = { "", "" }, + }, + colors = function(hl) + local get_hlgroup = require("astroui").get_hlgroup + -- use helper function to get highlight group properties + hl.text_fg = "#60b2a7" + hl.insert = "#a9b665" + hl.visual = "#e8b142" + hl.replace = "#ea6962" + hl.terminal = "#a89984" + hl.file_info_fg = hl.text_fg + hl.file_info_bg = "#bac2de" + hl.git_branch_fg = "#bd81b6" + hl.git_branch_bg = "#f5c2e7" + hl.lsp_fg = "black" + hl.lsp_bg = "#7fb4ca" + hl.search_bg = "#c8c093" + hl.grapple_bg = "#eba0ac" + hl.file_encoding_bg = "#f7768e" + hl.tab_width_bg = "#ff966c" + hl.nav_fg = "black" + hl.nav_bg = get_hlgroup("String").fg + hl.nav_icon_bg = hl.nav_bg + hl.normal = "#ade8f4" + return hl + end, + attributes = { + mode = { bold = true }, + file_info = { bold = false }, + git_branch = { bold = false }, + diagnostics = { bold = false }, + git_diff = { bold = false }, + lsp = { bold = false }, + }, +} diff --git a/lua/plugins/configs/ui/transparent.lua b/lua/plugins/configs/ui/transparent.lua new file mode 100644 index 0000000..1000a34 --- /dev/null +++ b/lua/plugins/configs/ui/transparent.lua @@ -0,0 +1,39 @@ +return function(opts) + return require("astrocore").extend_tbl(opts, { + -- table: default groups + groups = { + "Normal", + "NormalNC", + "Comment", + "Constant", + "Special", + "Identifier", + "Statement", + "PreProc", + "Type", + "Underlined", + "Todo", + "String", + "Function", + "Conditional", + "Repeat", + "Operator", + "Structure", + "LineNr", + "NonText", + "SignColumn", + "CursorLineNr", + "EndOfBuffer", + }, + -- table: additional groups that should be cleared + extra_groups = { + -- "NormalFloat", + -- "NvimTreeNormal", + -- "NeoTreeNormal", + -- "NeoTreeFloatBorder", + -- "NeoTreeNormalNC", + }, + -- table: groups you don't want to clear + exclude_groups = {}, + }) +end diff --git a/lua/plugins/developments.lua b/lua/plugins/developments.lua new file mode 100644 index 0000000..e16006e --- /dev/null +++ b/lua/plugins/developments.lua @@ -0,0 +1,106 @@ +-- Development Tools and Debugging +return { + -- LSP End hints + { + "chrisgrieser/nvim-lsp-endhints", + event = "LspAttach", + opts = { + icons = { + type = "󰜁 ", + parameter = "󰏪 ", + offspec = " ", -- hint kind not defined in official LSP spec + unknown = " ", -- hint kind is nil + }, + label = { + truncateAtChars = 100, + padding = 1, + marginLeft = 0, + sameKindSeparator = ", ", + }, + extmark = { + priority = 50, + }, + autoEnableHints = true, + }, + }, + + -- DAP UI (disabled) + { + "rcarriga/nvim-dap-ui", + enabled = false, + requires = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" }, + opts = { + eval = true, + mappings = { + edit = "e", + expand = { "", "<2-LeftMouse>" }, + open = "o", + remove = "d", + repl = "r", + toggle = "t", + }, + layouts = { + { + elements = { + { + id = "repl", + size = 0.5, + }, + { + id = "console", + size = 0.5, + }, + }, + position = "left", + size = 40, + }, + { + elements = { + { + id = "scopes", + size = 0.25, + }, + { + id = "breakpoints", + size = 0.25, + }, + }, + position = "bottom", + size = 8, + }, + }, + }, + config = function(_, opts) + local dap = require("dap") + local dapui = require("dapui") + dapui.setup(opts) + dap.listeners.after.event_terminated["dapui"] = function() + -- Do nothing, keeping the UI open + end + dap.listeners.after.event_exited["dapui"] = function() + -- Do nothing, keeping the UI open + end + dap.listeners.after.event_initialized["dapui"] = function() + dapui.open() + end + end, + }, + + -- DAP Virtual Text (disabled) + { + "theHamsta/nvim-dap-virtual-text", + enabled = false, + event = "User AstroFile", + opts = { + commented = false, + enabled = true, + enabled_commands = true, + show_stop_reason = true, + virt_text_pos = "eol", + }, + }, + + -- Disabled development plugins + { "mfussenegger/nvim-dap", enabled = false }, + { "jay-babu/mason-nvim-dap.nvim", enabled = false }, +} diff --git a/lua/plugins/mason.lua b/lua/plugins/mason.lua new file mode 100644 index 0000000..b4a7bb2 --- /dev/null +++ b/lua/plugins/mason.lua @@ -0,0 +1,25 @@ +if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE + +-- Customize Mason + +---@type LazySpec +return { + -- use mason-tool-installer for automatically installing Mason packages + { + "WhoIsSethDaniel/mason-tool-installer.nvim", + -- overrides `require("mason-tool-installer").setup(...)` + opts = { + -- Make sure to use the names found in `:Mason` + ensure_installed = { + -- install language servers + "lua-language-server", + -- install debuggers + "jedi_language_server", + "ruff", + "basedpyright", + -- install any other package + "tree-sitter-cli", + }, + }, + }, +} diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua new file mode 100644 index 0000000..1f20622 --- /dev/null +++ b/lua/plugins/neo-tree.lua @@ -0,0 +1,39 @@ +-- File Explorer and File Management +return { + -- Neo-tree file explorer + { + "nvim-neo-tree/neo-tree.nvim", + opts = { + source_selector = { + winbar = false, + }, + filesystem = { + filtered_items = { + visible = true, + show_hidden_count = true, + hide_dotfiles = false, + hide_gitignored = false, + hide_by_name = {}, + never_show = {}, + never_show_by_pattern = { + "*.zip", + "*.rar", + }, + }, + }, + window = { + mappings = { + ["K"] = false, + ["H"] = false, + }, + }, + enable_git_status = false, + enable_diagnostics = false, + git_status_async = false, + }, + }, + + -- Disabled file explorer plugins + { "s1n7ax/nvim-window-picker", enabled = false }, +} + diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua new file mode 100644 index 0000000..fe1c63d --- /dev/null +++ b/lua/plugins/none-ls.lua @@ -0,0 +1,24 @@ +-- Formatting and Linting +return { + -- None-ls formatting + { + "nvimtools/none-ls.nvim", + dependencies = { + "nvimtools/none-ls-extras.nvim", + "jay-babu/mason-null-ls.nvim", + }, + opts = function(_, opts) + local null_ls = require("null-ls") + opts.sources = { + require("none-ls.formatting.ruff").with({ extra_args = { "--extend-select", "F" } }), + require("none-ls.formatting.ruff_format"), + } + return opts + end, + }, + + -- Disabled formatting plugins + { "rafamadriz/friendly-snippets", enabled = false }, + { "JoosepAlviste/nvim-ts-context-commentstring", enabled = false }, + { "windwp/nvim-ts-autotag", enabled = false }, +} diff --git a/lua/plugins/themes.lua b/lua/plugins/themes.lua new file mode 100644 index 0000000..0e2587d --- /dev/null +++ b/lua/plugins/themes.lua @@ -0,0 +1,14 @@ +return { + { + "ribru17/bamboo.nvim", + lazy = false, + priority = 1000, + config = function() + require("bamboo").setup { + integrations = { mini = true }, + terminal_colors = false + } + require("bamboo").load() + end, + }, +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua new file mode 100644 index 0000000..c630ae5 --- /dev/null +++ b/lua/plugins/treesitter.lua @@ -0,0 +1,34 @@ +-- Customize Treesitter + +---@type LazySpec +return { + { + "nvim-treesitter/nvim-treesitter", + dependencies = {}, + opts = function(_, opts) + -- add more things to the ensure_installed table protecting against community packs modifying it + opts.ignore_install = { "help" } + opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { + -- "lua", + -- "c", + -- "cpp", + "python", + "latex", + -- "javascript", + }) + + opts.highlight = { + enable = true, + disable = { "c", "rust", "tsx", "javascript" }, + additional_vim_regex_highlighting = false, + custom_captures = { + -- Highlight local variables + ["variable.local"] = "Identifier", + }, + } + + vim.api.nvim_set_hl(0, "Identifier", { fg = "#55ffff" }) + end, + }, +} + diff --git a/lua/plugins/user.lua b/lua/plugins/user.lua new file mode 100644 index 0000000..24a4a0f --- /dev/null +++ b/lua/plugins/user.lua @@ -0,0 +1,146 @@ +-- You can also add or configure plugins by creating files in this `plugins/` folder +-- PLEASE REMOVE THE EXAMPLES YOU HAVE NO INTEREST IN BEFORE ENABLING THIS FILE +-- Here are some examples: + +---@type LazySpec +return { + + -- == Examples of Adding Plugins == + + "andweeb/presence.nvim", + { + "ray-x/lsp_signature.nvim", + event = "BufRead", + config = function() require("lsp_signature").setup() end, + }, + + -- == Examples of Overriding Plugins == + + -- customize dashboard options + { + "folke/snacks.nvim", + config = function(_, opts) + require("snacks").setup(opts) + end, + opts = { + dashboard = { + preset = { + header = table.concat(require("plugins.configs.ui.alpha")[10], "\n"), + keys = {}, + }, + }, + scope = { + char = "󰥓" + }, + indent = { + priority = 1, + enabled = true, -- enable indent guides + char = "l", + only_scope = false, -- only show indent guides of the scope + only_current = false, -- only show indent guides in the current window + hl = "SnacksIndent", ---@type string|string[] hl groups for indent guides + animate = { + enabled = vim.fn.has("nvim-0.10") == 1, + style = "out", + easing = "linear", + duration = { + step = 20, -- ms per step + total = 500, -- maximum duration + }, + }, + ---@class snacks.indent.Scope.Config: snacks.scope.Config + scope = { + enabled = true, -- enable highlighting the current scope + priority = 200, + char = "󰥓", + underline = false, -- underline the start of the scope + only_current = false, -- only show scope in the current window + hl = "SnacksIndentScope", ---@type string|string[] hl group for scopes + }, + }, + }, + }, + + -- You can disable default plugins as follows: + { "max397574/better-escape.nvim", enabled = false }, + + -- You can also easily customize additional setup of plugins that is outside of the plugin's setup call + { + "L3MON4D3/LuaSnip", + config = function(plugin, opts) + require "astronvim.plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call + -- add more custom luasnip configuration such as filetype extend or custom snippets + local luasnip = require "luasnip" + luasnip.filetype_extend("javascript", { "javascriptreact" }) + end, + }, + + + { + "altermo/ultimate-autopair.nvim", + event = "InsertEnter", + branch = "v0.6", + opts = { + cmap = false, + extensions = { + cond = { + cond = { + function(fn) + return not fn.in_node("comment") + end, + }, + }, + fly = { + nofilter = true, + }, + }, + config_internal_pairs = { + { '"', '"', fly = true }, + { "'", "'", fly = true }, + { "[", "]", fly = true }, + { "{", "}", fly = true }, + { "(", ")", fly = true }, + }, + }, + dependencies = { + { + "AstroNvim/astrocore", + opts = { + mappings = { + n = { + ["ua"] = { + desc = "Toggle Ultimate Autopair", + function() + local notify = require("astrocore").notify + local function bool2str(bool) + return bool and "on" or "off" + end + local ok, ultimate_autopair = pcall(require, "ultimate-autopair") + if ok then + ultimate_autopair.toggle() + vim.g.ultimate_autopair_enabled = require("ultimate-autopair.core").disable + notify( + string.format( + "ultimate-autopair %s", + bool2str(not vim.g.ultimate_autopair_enabled) + ) + ) + else + notify("ultimate-autopair not available") + end + end, + }, + }, + }, + }, + }, + }, + specs = { + { + "windwp/nvim-autopairs", + optional = true, + enabled = false, + }, + }, + }, +} diff --git a/lua/polish.lua b/lua/polish.lua new file mode 100644 index 0000000..642719f --- /dev/null +++ b/lua/polish.lua @@ -0,0 +1,5 @@ +if true then return end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE + +-- This will run last in the setup process. +-- This is just pure lua so anything that doesn't +-- fit in the normal config locations above can go here diff --git a/neovim.yml b/neovim.yml new file mode 100644 index 0000000..b9235ab --- /dev/null +++ b/neovim.yml @@ -0,0 +1,6 @@ +--- +base: lua51 + +globals: + vim: + any: true diff --git a/selene.toml b/selene.toml new file mode 100644 index 0000000..e7005c3 --- /dev/null +++ b/selene.toml @@ -0,0 +1,8 @@ +std = "neovim" + +[rules] +global_usage = "allow" +if_same_then_else = "allow" +incorrect_standard_library_use = "allow" +mixed_table = "allow" +multiple_statements = "allow"