diff --git a/colorscheme.lua b/colorscheme.lua deleted file mode 100644 index 6bcd6e1..0000000 --- a/colorscheme.lua +++ /dev/null @@ -1 +0,0 @@ -return "astrobox" diff --git a/highlights/init.lua b/highlights/init.lua deleted file mode 100644 index 06a16b6..0000000 --- a/highlights/init.lua +++ /dev/null @@ -1,12 +0,0 @@ -return function() - -- Remove italic in documentation comments - local docComment = vim.api.nvim_get_hl(0, { name = "Comment" }) - docComment.italic = false - docComment.nocombine = true -- Don't merge missing attributes from inherited highlight group - return { - ["@comment.doc"] = docComment, - ["@comment.documentation"] = docComment, - ["@lsp.mod.documentation"] = docComment, - } -end - diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..fe3576b --- /dev/null +++ b/init.lua @@ -0,0 +1,4 @@ +-- bootstrap lazy.nvim, AstroNvim, and user plugins +require("config.lazy") +-- run polish file at the very end +pcall(require, "config.polish") diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..685ad4b --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,66 @@ +{ + "AstroNvim": { "branch": "v4", "commit": "865c34d9be8dff1ce7277085459fd1050c07b81b" }, + "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, + "LuaSnip": { "branch": "master", "commit": "954c81b53989097faaff0fabc11c29575288c3e1" }, + "aerial.nvim": { "branch": "master", "commit": "ef08437108247d8805ae388f2699537eac2fd810" }, + "alpha-nvim": { "branch": "main", "commit": "29074eeb869a6cbac9ce1fbbd04f5f5940311b32" }, + "astrocommunity": { "branch": "v4", "commit": "f58e86d0391e44d4847de749840a42c08c3b4039" }, + "astrocore": { "branch": "main", "commit": "e5d3846e82bc32aa2ddcd124466373a29112cb2d" }, + "astrolsp": { "branch": "main", "commit": "d875f27c60b313f3de3c7d092026d8c9380a6039" }, + "astrotheme": { "branch": "main", "commit": "208d85fcc2fa19351d55b584666ea0b2ddf9db4e" }, + "astroui": { "branch": "main", "commit": "3bdab235369ce132aa022f2aa81a4ccc038e2920" }, + "better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "34c8eaa12be192e83cd4865ce2375e9f53e728f2" }, + "cmake-tools.nvim": { "branch": "master", "commit": "4e9d9f24c29dfd05f928a81b57ef5458c2e74ab0" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-dap": { "branch": "master", "commit": "d16f14a210cd28988b97ca8339d504533b7e09a4" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "crates.nvim": { "branch": "main", "commit": "b8ea20fda2e1029fbbb1bae7a9eab35c84037ca0" }, + "dressing.nvim": { "branch": "master", "commit": "8b7ae53d7f04f33be3439a441db8071c96092d19" }, + "ferris.nvim": { "branch": "main", "commit": "ecc3b463ca8b138ce6a1eaab56c9b9e36d8fb29f" }, + "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, + "gitsigns.nvim": { "branch": "main", "commit": "87640f5a877b18bdd49884dbcac220fed924b867" }, + "guess-indent.nvim": { "branch": "main", "commit": "b8ae749fce17aa4c267eec80a6984130b94f80b2" }, + "heirline.nvim": { "branch": "master", "commit": "170e1b1fd7c11db00e46d802165fb277db601ae7" }, + "indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" }, + "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, + "lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, + "mason-null-ls.nvim": { "branch": "main", "commit": "d1f7258f80867f718d643d88eee66959671a4bef" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "5b4db7c0d6873436b42bcda0ba7cd4efa9206745" }, + "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, + "mini.align": { "branch": "main", "commit": "c5ab28809c630b65ffe069b564ce1d473bbcb332" }, + "mini.bufremove": { "branch": "main", "commit": "f53c7f27e36009fe61563c11cde154b94a0e5b94" }, + "mini.indentscope": { "branch": "main", "commit": "c8fdafa7bf603d758986a27eb546c55a5c73b1a3" }, + "neo-tree.nvim": { "branch": "main", "commit": "9298c1b7a52e63ed4fd977fd792a0d4afe9260d5" }, + "neoconf.nvim": { "branch": "main", "commit": "64437787dba70fce50dad7bfbb97d184c5bc340f" }, + "neodev.nvim": { "branch": "main", "commit": "c4ce017bd4bacf60bf59330cec9e93c5d5e104a6" }, + "none-ls.nvim": { "branch": "main", "commit": "45d0e8fa9094dcc3fabad9065a5822af9cf099c7" }, + "nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" }, + "nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" }, + "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, + "nvim-dap": { "branch": "master", "commit": "bbe2c6f3438542a37cc2141a8e385f7dfe07d87d" }, + "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, + "nvim-lspconfig": { "branch": "master", "commit": "511609ae0311abfcfaed3c398429a147e895ce2c" }, + "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" }, + "nvim-treesitter": { "branch": "master", "commit": "7958ff9ec7a2baea2842323d0e7ac67a509da4d2" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, + "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" }, + "nvim-ufo": { "branch": "main", "commit": "9fa77fb7e4365a053a5303b773aaf5eaf806d1f4" }, + "nvim-web-devicons": { "branch": "master", "commit": "8b2e5ef9eb8a717221bd96cb8422686d65a09ed5" }, + "nvim-window-picker": { "branch": "main", "commit": "e7b6699fbd007bbe61dc444734b9bade445b2984" }, + "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, + "promise-async": { "branch": "main", "commit": "94f6f03c6c1e2aab551aacdf0c1e597a7269abb6" }, + "resession.nvim": { "branch": "master", "commit": "7fa6614c0e4568a9d6f6c37fda72c79ad64817bb" }, + "smart-splits.nvim": { "branch": "master", "commit": "c970c7a3cc7ba635fd73d43c81b40f04c00f5058" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, + "telescope.nvim": { "branch": "master", "commit": "6213322ab56eb27356fdc09a5078e41e3ea7f3bc" }, + "toggleterm.nvim": { "branch": "main", "commit": "cbd041d91b90cd3c02df03fe6133208888f8e008" }, + "vim-abolish": { "branch": "master", "commit": "dcbfe065297d31823561ba787f51056c147aa682" }, + "vimwiki": { "branch": "dev", "commit": "0bb1b4945bb205a076a35b66174e5d66be8eaafe" }, + "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } +} \ No newline at end of file diff --git a/lsp/formatting.lua b/lsp/formatting.lua deleted file mode 100644 index d70e816..0000000 --- a/lsp/formatting.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - -- control auto formatting on save - format_on_save = { - enabled = false, -- enable or disable format on save globally - }, -} diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua new file mode 100644 index 0000000..9b8608a --- /dev/null +++ b/lua/config/lazy.lua @@ -0,0 +1,41 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.g.astronvim_first_install = true -- lets AstroNvim know that this is an initial installation + vim.fn.system { + "git", + "clone", + "--depth=1", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", + lazypath, + } +end +vim.opt.rtp:prepend(vim.env.LAZY or lazypath) + +-- TODO: set to true on release +-- Whether or not to use stable releases of AstroNvim +local USE_STABLE = false + +require("lazy").setup { + spec = { + -- TODO: remove branch v4 on release + { "AstroNvim/AstroNvim", branch = "v4", version = USE_STABLE and "^4" or nil, import = "astronvim.plugins" }, + -- pin plugins to known working versions + { import = "astronvim.lazy_snapshot", cond = USE_STABLE }, + { import = "plugins" }, + }, + install = { colorscheme = { "astrodark", "habamax" } }, + performance = { + rtp = { + -- disable some rtp plugins, add more to your liking + disabled_plugins = { + "gzip", + "netrwPlugin", + "tarPlugin", + "tohtml", + "zipPlugin", + }, + }, + }, +} diff --git a/lua/config/options.lua b/lua/config/options.lua new file mode 100644 index 0000000..4dac77c --- /dev/null +++ b/lua/config/options.lua @@ -0,0 +1,22 @@ +vim.opt.background = "dark" +vim.opt.clipboard = "" +vim.opt.cmdheight = 1 +vim.opt.expandtab = true +vim.opt.foldmethod = "syntax" +vim.opt.foldnestmax = 150 +vim.opt.grepprg = vim.fn.executable("rg") and "rg --vimgrep" or nil +vim.opt.guifont = { "VictorMono NF", "Hack Nerd Font Mono", ":h10" } +vim.opt.listchars = { tab = "> ", extends = ">", precedes = "<", space = "·" } +vim.opt.number = true +vim.opt.relativenumber = false +vim.opt.shiftwidth = 4 +vim.opt.signcolumn = "auto" +vim.opt.spell = false +vim.opt.tabstop = 4 +vim.opt.textwidth = 120 +vim.opt.wrap = true + +vim.opt.path:append("**") -- recursive search for find + +-- Globals +vim.g.rust_recommended_style = 0 diff --git a/lua/config/polish.lua b/lua/config/polish.lua new file mode 100644 index 0000000..e69de29 diff --git a/lua/plugins/00-core.lua b/lua/plugins/00-core.lua new file mode 100644 index 0000000..6d00fac --- /dev/null +++ b/lua/plugins/00-core.lua @@ -0,0 +1,14 @@ +return { + -- Disable core plugins + -- { "goolord/alpha-nvim", enabled = false }, + -- Which-key + -- { + -- "folke/which-key.nvim", + -- opts = { + -- plugins = { + -- registers = false, + -- }, + -- }, + -- } + +} diff --git a/lua/plugins/05-community.lua b/lua/plugins/05-community.lua new file mode 100644 index 0000000..e469ba0 --- /dev/null +++ b/lua/plugins/05-community.lua @@ -0,0 +1,26 @@ +local home = vim.fn.hostname() == "comanche" +local work = not home + +return { + { "AstroNvim/astrocommunity", branch = "v4" }, + -- Language packs + { enabled = true, import = "astrocommunity.pack.cpp" }, + { enabled = true, import = "astrocommunity.pack.lua" }, + { enabled = true, import = "astrocommunity.pack.markdown" }, + { enabled = home, import = "astrocommunity.pack.rust" }, + { enabled = home, import = "astrocommunity.pack.bash" }, + { enabled = work, import = "astrocommunity.pack.cs" }, + { enabled = work, import = "astrocommunity.pack.ps1" }, + { enabled = false, import = "astrocommunity.pack.html-css" }, + { enabled = false, import = "astrocommunity.pack.java" }, + { enabled = false, import = "astrocommunity.pack.wgsl" }, -- WebGLShaderLanguage + + -- DAP + -- Figure out if needed when you finaly try to use the DAP + -- { import = "astrocommunity.debugging.telescope-dap-nvim" }, + -- { import = "astrocommunity.debugging.nvim-dap-virtual-text" }, + -- { import = "astrocommunity.debugging.nvim-dap-repl-highlights" }, + + -- Others + -- { import = "astrocommunity.debugging.nvim-bqf" }, +} diff --git a/lua/plugins/10-colorscheme.lua b/lua/plugins/10-colorscheme.lua new file mode 100644 index 0000000..3102586 --- /dev/null +++ b/lua/plugins/10-colorscheme.lua @@ -0,0 +1,17 @@ +return { + { + "AstroNvim/astroui", + dependencies = { "astrobox" }, + opts = { + colorscheme = "astrobox", + }, + }, + { + name = "astrobox", + -- dir = "~/Workspace/astrobox/", + url = "https://git.niverton.tk/niverton/Astrobox.git", + opts = { + contrast = "hard" + } + }, +} diff --git a/lua/plugins/15-mappings.lua b/lua/plugins/15-mappings.lua new file mode 100644 index 0000000..9b7c30b --- /dev/null +++ b/lua/plugins/15-mappings.lua @@ -0,0 +1,16 @@ +-- return { +-- "AstroNvim/astrocore", +-- ---@type AstroCoreOpts +-- opts = { +-- mappings = { +-- t = { +-- [""] = [[]], +-- [""] = [[h]], +-- [""] = [[j]], +-- [""] = [[k]], +-- [""] = [[l]], +-- }, +-- }, +-- }, +-- } +return {} diff --git a/lua/plugins/16-commands.lua b/lua/plugins/16-commands.lua new file mode 100644 index 0000000..5584cc7 --- /dev/null +++ b/lua/plugins/16-commands.lua @@ -0,0 +1,15 @@ +return { + "AstroNvim/astrocore", + ---@type AstroCoreOpts + opts = { + commands = { + TermOpen = { + function() + vim.bo.number = false + vim.bo.spell = false + end, + desc = "Remove linenumber in term buffers", + }, + }, + }, +} diff --git a/lua/plugins/20-lsp.lua b/lua/plugins/20-lsp.lua new file mode 100644 index 0000000..6fac48a --- /dev/null +++ b/lua/plugins/20-lsp.lua @@ -0,0 +1,18 @@ +return { + "AstroNvim/astrolsp", + ---@type AstroLSPOpts + opts = { + features = { + autoformat = false, + inlay_hints = true, + }, + formatting = { + format_on_save = { + enabled = false, + }, + timeout_ms = 1000, + }, + -- mappings to be set up on attaching of a language server + mappings = {}, + }, +} diff --git a/lua/plugins/30-cvs.lua b/lua/plugins/30-cvs.lua new file mode 100644 index 0000000..7d3ebd8 --- /dev/null +++ b/lua/plugins/30-cvs.lua @@ -0,0 +1,12 @@ +return { + --[[ + { + "lewis6991/gitsigns.nvim", + opts = { + signcolumn = false, + numhl = true, + current_line_blame_opts = { ignore_whitespace = true }, + }, + }, + ]] +} diff --git a/plugins/heirline.lua b/lua/plugins/40-heirline.lua similarity index 83% rename from plugins/heirline.lua rename to lua/plugins/40-heirline.lua index bcef601..8a05caa 100644 --- a/plugins/heirline.lua +++ b/lua/plugins/40-heirline.lua @@ -1,7 +1,8 @@ return { "rebelot/heirline.nvim", + optional = true, opts = function(_, opts) - local status = require "astronvim.utils.status" + local status = require("astroui.status") opts.statusline = { hl = { fg = "fg", bg = "bg" }, @@ -9,23 +10,23 @@ return { status.component.file_info { filetype = false, filename = { - modify = ":~:." + modify = ":~:.", }, - file_modified = {} + file_modified = {}, }, status.component.diagnostics(), status.component.fill(), status.component.cmd_info(), status.component.fill(), status.component.lsp(), - status.component.treesitter{ padding = { right = 1 } }, -- Extra space to separate from next component + status.component.treesitter { padding = { right = 1 } }, -- Extra space to separate from next component status.component.git_diff(), status.component.git_branch(), status.component.nav { scrollbar = false }, } local get_file_path = status.provider.filename { - modify = ":~:.:h" -- Relative path and cut filename + modify = ":~:.:h", -- Relative path and cut filename } -- Fix path separation on windows local path_func = get_file_path @@ -42,8 +43,7 @@ return { { condition = function() return not status.condition.is_active() end, { - -- Set display priority to hide when component is too big to - -- fit + -- Set display priority to hide when component is too big to fit flexible = 1, status.component.separated_path { flexible = 2, @@ -62,11 +62,11 @@ return { }, { -- Hide - provider = "" - } + provider = "", + }, }, status.component.file_info { - file_icon = { hl = status.hl.file_icon "winbar", padding = { left = 0 } }, + file_icon = { hl = status.hl.file_icon("winbar"), padding = { left = 0 } }, file_modified = false, file_read_only = false, hl = status.hl.get_attributes("winbarnc", true), diff --git a/lua/plugins/45-vimwiki.lua b/lua/plugins/45-vimwiki.lua new file mode 100644 index 0000000..38e13ec --- /dev/null +++ b/lua/plugins/45-vimwiki.lua @@ -0,0 +1,55 @@ +return { + { + "vimwiki/vimwiki", + init = function() + local default_settings = { + syntax = "markdown", + ext = ".md", + links_space_char = "_", + auto_tags = 1, + auto_diary_index = 1, + auto_generate_links = 1, + auto_generate_tags = 1, + } + local ext = vim.fn.extend + vim.g.vimwiki_list = { + ext({ path = "~/wiki/main/" }, default_settings), + ext({ path = "~/wiki/jdr/" }, default_settings), + ext({ path = "~/wiki/work/" }, default_settings), + } + -- vim.g.vimwiki_ext2syntax = { [".md"] = "markdown", [".markdown"] = "markdown", [".mdown"] = "markdown" } + vim.g.vimwiki_markdown_link_ext = 1 + vim.g.vimwiki_conceal_pre = 0 + vim.g.vimwiki_diary_months = { + ["1"] = "Janvier", + ["2"] = "Février", + ["3"] = "Mars", + ["4"] = "Avril", + ["5"] = "Mai", + ["6"] = "Juin", + ["7"] = "Juillet", + ["8"] = "Août", + ["9"] = "Septembre", + ["10"] = "Octobre", + ["11"] = "Novembre", + ["12"] = "Décembre", + } + end, + config = function() end, + keys = { + "ww", + "wt", + "ws", + }, + cmd = { + "VimwikiIndex", + "VimwikiTabIndex", + "VimwikiUISelect", + "VimwikiDiaryIndex", + "VimwikiMakeDiaryNote", + "VimwikiTabMakeDiaryNote", + "VimwikiMakeYesterdayDiaryNote", + "VimwikiMakeTomorrowDiaryNote", + }, + }, +} diff --git a/lua/plugins/50-user.lua b/lua/plugins/50-user.lua new file mode 100644 index 0000000..1d55929 --- /dev/null +++ b/lua/plugins/50-user.lua @@ -0,0 +1,4 @@ +return { + { "echasnovski/mini.align", event = "User AstroFile", config = function() require("mini.align").setup {} end }, + { "tpope/vim-abolish", event = "User AstroFile" }, +} diff --git a/mappings.lua b/mappings.lua deleted file mode 100644 index 94a99ef..0000000 --- a/mappings.lua +++ /dev/null @@ -1,19 +0,0 @@ -return { - n = { - [""] = { - function() - vim.cmd([[cclose]]) - vim.cmd([[pclose]]) - vim.fn.setreg('/', '') - end, - desc = "Clean up" - } - }, - t = { - [''] = [[]], - [''] = [[h]], - [''] = [[j]], - [''] = [[k]], - [''] = [[l]], - }, -} diff --git a/options.lua b/options.lua deleted file mode 100644 index fd6580f..0000000 --- a/options.lua +++ /dev/null @@ -1,35 +0,0 @@ -return { - opt = { - -- laststatus = 2, - background = "dark", - clipboard = "", - cmdheight = 1, - expandtab = true, - foldenable = true, - foldlevelstart = 100, - foldmethod = "syntax", - foldnestmax = 150, - grepprg = "rg --vimgrep", - guifont = "VictorMono Nerd Font, Hack Nerd Font Mono:h10", - listchars = { tab = '> ', extends = '>', precedes = '<', space = '·' }, - number = true, - relativenumber = false, - scrolloff = 0, - shiftwidth = 4, - signcolumn = "auto", - spell = false, - tabstop = 4, - textwidth = 80, - wrap = true, - }, - g = { - autoformat_enabled = false, - autopairs_enabled = true, - cmp_enabled = true, - diagnostics_enabled = true, - icons_enabled = true, - inlay_hints_enabled = true, - mapleader = " ", - status_diagnostics_enabled = true, - }, -} diff --git a/plugins/colors.lua b/plugins/colors.lua deleted file mode 100644 index ca2e2be..0000000 --- a/plugins/colors.lua +++ /dev/null @@ -1,60 +0,0 @@ -local function int_lerp(a, b, c) - return math.floor((1 - c) * a + c * b + 0.5) -end - -local function rgb_lerp(a, b, c) - return { - int_lerp(a[1], b[1], c), - int_lerp(a[2], b[2], c), - int_lerp(a[3], b[3], c), - } -end - -local function hex_to_rgb(hex) - local ret = {} - for i = 2,6,2 do -- Skip '#' - local s = hex:sub(i, i + 1) - table.insert(ret, tonumber(s, 16)) - end - return ret -end - -local function rgb_to_hex(rgb) - return string.format("#%x%x%x", unpack(rgb)) -end - -local function hex_lerp(a, b, c) - a = hex_to_rgb(a); - b = hex_to_rgb(b); - return rgb_to_hex(rgb_lerp(a, b, c)) -end - -return { - { - "AstroNvim/astrotheme", - optional = true, - opts = { - style = { - simple_syntax_colors = true, - inactive = false, - }, - palettes = { - astrobox = {}, - }, - highlights = { - global = { - modify_hl_groups = function(hl, c) - hl.DiffAdd = { bg = hex_lerp(hl.DiffAdd.bg, c.ui.base, 0.8)} - hl.DiffDelete = { bg = hex_lerp(hl.DiffDelete.bg, c.ui.base, 0.8)} - hl.DiffChange = { bg = hex_lerp(c.ui.blue, c.ui.base, 0.8)} - hl.DiffText = { bg = hex_lerp(hl.DiffText.bg, c.ui.base, 0.8)} - end, - }, - astrobox = {}, - }, - }, - }, - { - url = "https://git.niverton.tk/niverton/Astrobox.git" - }, -} diff --git a/plugins/community.lua b/plugins/community.lua deleted file mode 100644 index e66b26c..0000000 --- a/plugins/community.lua +++ /dev/null @@ -1,29 +0,0 @@ --- Filter by hostname -local home = vim.fn.hostname() == "comanche" -local work = not home - -return { - "AstroNvim/astrocommunity", - - -- Language packs - { enabled = true, import = "astrocommunity.pack.cpp" }, - { enabled = true, import = "astrocommunity.pack.lua" }, - { enabled = true, import = "astrocommunity.pack.markdown" }, - -- { enabled = true, import = "astrocommunity.pack.rust" }, - { enabled = home, import = "astrocommunity.pack.bash" }, - { enabled = home, import = "astrocommunity.pack.html-css" }, - { enabled = home, import = "astrocommunity.pack.java" }, - { enabled = work, import = "astrocommunity.pack.cs" }, - { enabled = work, import = "astrocommunity.pack.ps1" }, - -- { enable = home, import = "astrocommunity.pack.wgsl" }, -- WebGLShaderLanguage - - -- DAP - { import = "astrocommunity.debugging.telescope-dap-nvim" }, - { import = "astrocommunity.debugging.nvim-dap-virtual-text" }, - { import = "astrocommunity.debugging.nvim-dap-repl-highlights" }, - - -- Others - -- TODO usefull? - { import = "astrocommunity.debugging.nvim-bqf" }, - -} diff --git a/plugins/init.lua b/plugins/init.lua deleted file mode 100644 index 960daf2..0000000 --- a/plugins/init.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - { "echasnovski/mini.align", event = "User AstroFile", config = function() require("mini.align").setup {} end }, - { - "serenevoid/kiwi.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, - opts = { - { name = "main", path = "~/kiwi/main" }, - }, - keys = { - { "ww", ':lua require("kiwi").open_wiki_index()', desc = "Open Wiki index" }, - { "t", ':lua require("kiwi").todo.toggle()', desc = "Toggle Markdown Task" }, - }, - lazy = true, - }, - { "tpope/vim-abolish", event = "User AstroFile" }, -} diff --git a/plugins/luasnip.lua b/plugins/luasnip.lua deleted file mode 100644 index be1d8f8..0000000 --- a/plugins/luasnip.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - { - "L3MON4D3/LuaSnip", - optional = true, - config = function(plugin, opts) - require "plugins.configs.luasnip"(plugin, opts) - require("luasnip.loaders.from_vscode").lazy_load { paths = { "./lua/user/snippets" } } - end, - } -} diff --git a/polish.lua b/polish.lua deleted file mode 100644 index 48bf818..0000000 --- a/polish.lua +++ /dev/null @@ -1,33 +0,0 @@ -return function() - --[[ - local function treesitter_is_parser_installed(filetype) - if not filetype then return false end - - local ok, parsers = pcall(require, "nvim-treesitter.parsers") - if not ok then return false end - local name = parsers.filetype_to_parsername[filetype] - return name and #vim.api.nvim_get_runtime_file("parser/" .. name .. ".so", false) > 0 - end - - -- Set foldmethod to treesitter only on BufEnter if we do have a parser and we're not in diffmode - vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWinEnter' }, { - group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}), - callback = function() - if vim.wo.diff then return end - if treesitter_is_parser_installed(vim.bo.filetype) then - vim.wo.foldmethod = 'expr' - vim.wo.foldexpr = 'nvim_treesitter#foldexpr()' - end - end - }) - --]] - - -- TODO Move to filetype plugin? - vim.api.nvim_create_autocmd("TermOpen", { - group = vim.api.nvim_create_augroup("term", { clear = true }), - callback = function() - vim.wo.number = false - vim.wo.spell = false - end - }) -end diff --git a/snippets/package.json b/snippets/package.json deleted file mode 100644 index 4b74e07..0000000 --- a/snippets/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "user snippets", - "engines": { - "vscode": "^1.11.0" - }, - "contributes": { - "snippets": [ - { - "language": "rust", - "path": "./rust.json" - } - ] - } -} diff --git a/snippets/rust.json b/snippets/rust.json deleted file mode 100644 index ae483db..0000000 --- a/snippets/rust.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "New Yew function component": { - "prefix": "yewfc", - "body": [ - "#[derive(PartialEq, Properties)]", - "pub struct ${1:ComponentName}Props {}", - "", - "#[function_component]", - "pub fn $1(props: &${1}Props) -> Html {", - " let ${1}Props {} = props;", - " html! {", - " <${2:div}>$0", - " }", - "}" - ], - "description": "Create a minimal Yew function component" - }, - "New Yew struct component": { - "prefix": "yewsc", - "body": [ - "pub struct ${1:ComponentName};", - "", - "pub enum ${1}Msg {", - "}", - "", - "impl Component for ${1} {", - " type Message = ${1}Msg;", - " type Properties = ();", - "", - " fn create(ctx: &Context) -> Self {", - " Self", - " }", - "", - " fn view(&self, ctx: &Context) -> Html {", - " html! {", - " $0", - " }", - " }", - "}" - ], - "description": "Create a new Yew component with a message enum" - } -} diff --git a/stylua.toml b/stylua.toml new file mode 100644 index 0000000..6ea0e6b --- /dev/null +++ b/stylua.toml @@ -0,0 +1,8 @@ +column_width = 120 +line_endings = "Unix" +indent_type = "Spaces" +call_parentheses = "NoSingleTable" +collapse_simple_statement = "Always" + +[sort_requires] +enabled = true diff --git a/updater.lua b/updater.lua deleted file mode 100644 index 89b4e71..0000000 --- a/updater.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - remote = "origin", - channel = "nightly", - version = "latest", - branch = "main", - commit = nil, - pin_plugins = nil, - skip_prompts = false, - show_changelog = true, - auto_reload = false, - auto_quit = false, -}