diff --git a/init.lua b/init.lua index 7bcce61..b41b90d 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,23 @@ return { colorscheme = "material", - lsp = { formatting = { format_on_save = false } }, + lsp = { + formatting = { format_on_save = false }, + -- skip_setup = { "rust_analyzer" }, + setup_handlers = { + -- add custom handler + rust_analyzer = function(_, opts) require("rust-tools").setup { server = opts } end, + }, + -- server_registration = function(server, opts) + -- if server == "rust_analyzer" then + -- require("rust-tools").setup { server = opts } + -- return + -- end + -- + -- require("lspconfig")[server].setup(opts) + -- end, + }, + diagnostics = { + virtual_text = true, + underline = true, + }, } diff --git a/opt.lua b/opt.lua new file mode 100644 index 0000000..614e361 --- /dev/null +++ b/opt.lua @@ -0,0 +1,13 @@ +return { + -- shell = "zsh -l", -- sets vim.opt.shell, + -- completeopt = { "menuone", "noselect", "noinsert" }, + -- shortmess = vim.opt.shortmess + { c = true }, + -- function() + -- vim.api.nvim_set_option("updatetime", 300) + +-- vim.cmd [[ +-- set signcolumn=yes +-- autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false }) +-- ]] + -- end, +} diff --git a/options.lua b/options.lua deleted file mode 100644 index a5e744b..0000000 --- a/options.lua +++ /dev/null @@ -1,6 +0,0 @@ --- set vim options here (vim.. = value) -return { - opt = { - -- shell = "zsh -l", -- sets vim.opt.shell - }, -} diff --git a/plugins/alpha-nvim.lua b/plugins/alpha-nvim.lua new file mode 100644 index 0000000..91eff92 --- /dev/null +++ b/plugins/alpha-nvim.lua @@ -0,0 +1,41 @@ +return { + { + "goolord/alpha-nvim", + opts = function(_, opts) + opts.section.header.val = { + " ▒▒▒▒▒▒ ", + " ▒▒▓▓▓▓▒▒▒▒▒▒▒▒ ", + " ▓▓▒▒▒▒▒▒▒▒░░ ▓▓ ", + " ▒▒▓▓▓▓▓▓▓▓▓▓▓▓░░░░ ▒▒▒▒▓▓▒▒▒▒ ", + " ▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░ ▒▒▓▓▓▓▓▓▒▒▒▒▒▒ ", + " ▓▓▓▓▓▓▓▓▓▓ ██▓▓▓▓▓▓▓▓ ▒▒▒▒ ██ ", + " ██▓▓▓▓ ▓▓████▓▓▓▓ ▒▒▒▒▒▒▒▒▓▓██▓▓ ▒▒▒▒▒▒ ", + " ██ ██ ▒▒▒▒▒▒░░░░ ▒▒▒▒▒▒ ▓▓▓▓▓▓ ▒▒▒▒▓▓▓▓██▓▓▒▒▒▒██▒▒▒▒▒▒▒▒▒▒ ", + " ▒▒▒▒▓▓ ▒▒▒▒▓▓▓▓▓▓▓▓▓▓▒▒░░ ░░▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒ ▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒ ██▓▓ ▓▓▓▓▓▓▓▓▒▒▒▒ ▓▓ ▒▒ ", + " ▒▒▓▓▓▓██▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░░██▓▓ ██▓▓ ▒▒ ▒▒▒▒▓▓▒▒▒▒▓▓ ▒▒ ▒▒ ", + " ▒▒▓▓▓▓▓▓██▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ▒▒ ▒▒▒▒▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓██▓▓▓▓██▓▓▓▓▓▓▓▓ ████▓▓▓▓▓▓▒▒ ██▒▒██▒▒▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓██▓▓ ", + " ▓▓▓▓▓▓▓▓██▓▓██ ████ ▓▓▓▓▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒ ▒▒▓▓▒▒ ▒▒▒▒▒▒ ░░██ ▓▓▓▓▓▓▓▓██▓▓ ▓▓██▓▓ ▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒ ██▓▓ ██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▒▒▓▓▓▓▒▒▓▓", + " ░░▓▓▓▓░░░░████████░░ ░░▓▓▓▓░░ ░░▒▒▒▒▒▒▒▒░░▒▒▓▓▒▒░░▒▒▒▒░░ ░░██ ▓▓░░▓▓░░░░▓▓ ▓▓░░▓▓▒▒▓▓ ▒▒▓▓▓▓▓▓▓▓▒▒▒▒░░▒▒▓▓░░ ██▓▓▓▓▓▓██▓▓██░░██▓▓▓▓▓▓▒▒▓▓", + " ░░░░ ░░██▓▓░░ ░░░░ ░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ░░██ ▓▓ ▓▓ ▓▓ ░░ ▓▓▓▓░░░░ ░░░░░░░░░░▓▓▓▓▒▒██░░ ░░░░░░ ▒▒░░▓▓▓▓▓▓██░░██▒▒░░▓▓██▓▓▓▓░░", + " ██▓▓ ▒▒ ▒▒▒▒▒▒▒▒ ▓▓▓▓▒▒▒▒▒▒▒▒ ░░ ▓▓ ▓▓ ██ ▓▓▓▓▓▓ ▓▓ ▓▓██▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒ ██░░██ ██▓▓████ ░░ ", + " ██▓▓ ░░ ▒▒░░▓▓░░ ▓▓▒▒░░▒▒░░▒▒ ▓▓ ██ ░░ ▒▒▓▓░░▓▓ ▓▓ ░░░░████▒▒▓▓▓▓▓▓▒▒▒▒░░ ░░ ░░ ██▓▓░░░░ ", + " ██▓▓ ▒▒▒▒▒▒ ▓▓ ██▓▓ ██ ██ ████▓▓██ ▓▓ ▓▓▒▒ ████ ", + " ▓▓▓▓██▓▓▓▓▓▓ ▓▓▒▒ ▓▓▓▓ ██▓▓ ▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓ ", + " ████▓▓██████▓▓▓▓████ ▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓██▓▓ ████████▓▓▓▓████████ ██████▓▓████ ██▒▒▓▓▓▓██████▓▓▓▓▒▒██ ", + " ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ▓▓▒▒▓▓██████▓▓▓▓▓▓▓▓▒▒██ ▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓▓▓ ▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒██ ", + " ██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒ ▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒ ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ", + " ▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▒▒▒▒▓▓ ▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓ ██▓▓▒▒▒▒▓▓▒▒▒▒▒▒▒▒▓▓▒▒▒▒▒▒██ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒██ ", + " ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▒▒▒▒░░░░░░░░░░░░░░░░▓▓ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ ▓▓▓▓▓▓▒▒▒▒▒▒▓▓▒▒▒▒▓▓ ░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ", + " ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░░████████████████████░░ ██▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░ ░░ ████▓▓▓▓▓▓▓▓▓▓████░░", + "", + " ██╗ ██████╗ ███████╗██╗ ██╗", + " ██║██╔═══██╗██╔════╝██║ ██║", + " ██║██║ ██║███████╗███████║", + " ██ ██║██║ ██║╚════██║██╔══██║", + " ╚█████╔╝╚██████╔╝███████║██║ ██║", + " ╚════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝", + } + return opts + end, + }, +} diff --git a/plugins/auto-save.lua b/plugins/auto-save.lua new file mode 100644 index 0000000..bebbafe --- /dev/null +++ b/plugins/auto-save.lua @@ -0,0 +1,4 @@ +return { + "Pocco81/auto-save.nvim", + event = "BufEnter", +} diff --git a/plugins/cmp.lua b/plugins/cmp.lua new file mode 100644 index 0000000..8f1a099 --- /dev/null +++ b/plugins/cmp.lua @@ -0,0 +1,64 @@ +return { +-- "hrsh7th/cmp-nvim-lsp", +-- "hrsh7th/cmp-nvim-lua", +-- "hrsh7th/cmp-nvim-lsp-signature-help", +-- "hrsh7th/cmp-vsnip", +-- "hrsh7th/cmp-path", +-- "hrsh7th/cmp-buffer", +-- "hrsh7th/vim-vsnip", +-- { +-- "hrsh7th/nvim-cmp", +-- config = function() +-- -- Completion Plugin Setup +-- local cmp = require "cmp" +-- cmp.setup { +-- -- Enable LSP snippets +-- snippet = { +-- expand = function(args) vim.fn["vsnip#anonymous"](args.body) end, +-- }, +-- mapping = { +-- [""] = cmp.mapping.select_prev_item(), +-- [""] = cmp.mapping.select_next_item(), +-- -- Add tab support +-- [""] = cmp.mapping.select_prev_item(), +-- [""] = cmp.mapping.select_next_item(), +-- [""] = cmp.mapping.scroll_docs(-4), +-- [""] = cmp.mapping.scroll_docs(4), +-- [""] = cmp.mapping.complete(), +-- [""] = cmp.mapping.close(), +-- [""] = cmp.mapping.confirm { +-- behavior = cmp.ConfirmBehavior.Insert, +-- select = true, +-- }, +-- }, +-- -- Installed sources: +-- sources = { +-- { name = "path" }, -- file paths +-- { name = "nvim_lsp", keyword_length = 3 }, -- from language server +-- { name = "nvim_lsp_signature_help" }, -- display function signatures with current parameter emphasized +-- { name = "nvim_lua", keyword_length = 2 }, -- complete neovim's Lua runtime API such vim.lsp.* +-- { name = "buffer", keyword_length = 2 }, -- source current buffer + -- { name = "vsnip", keyword_length = 2 }, -- nvim-cmp source for vim-vsnip +-- { name = "calc" }, -- source for math calculation +-- }, +-- window = { +-- completion = cmp.config.window.bordered(), +-- documentation = cmp.config.window.bordered(), +-- }, +-- formatting = { +-- fields = { "menu", "abbr", "kind" }, +-- format = function(entry, item) +-- local menu_icon = { +-- nvim_lsp = "λ", +-- vsnip = "⋗", +-- buffer = "Ω", +-- path = "🖫", +-- } +-- item.menu = menu_icon[entry.source.name] +-- return item +-- end, +-- }, +-- } +-- end, +-- }, +} diff --git a/plugins/community.lua b/plugins/community.lua deleted file mode 100644 index 6918be5..0000000 --- a/plugins/community.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - -- Add the community repository of plugin specifications - "AstroNvim/astrocommunity", - -- example of imporing a plugin, comment out to use it or add your own - -- available plugins can be found at https://github.com/AstroNvim/astrocommunity - - -- { import = "astrocommunity.colorscheme.catppuccin" }, - -- { import = "astrocommunity.completion.copilot-lua-cmp" }, -} diff --git a/plugins/core.lua b/plugins/core.lua deleted file mode 100644 index a56d4f2..0000000 --- a/plugins/core.lua +++ /dev/null @@ -1,148 +0,0 @@ -return { - -- customize alpha options - { - "goolord/alpha-nvim", - -- config = function() - -- local alpha = require("alpha") - -- local dashboard = require("alpha.themes.dashboard") - -- require("alpha.term") - -- - -- local header = { - -- type = "terminal", - -- command = "curl -s https://textart.sh/topic/bonsai/more\\?skip\\=$(if command -v jot >/dev/null 2>&l; then jot -r 1 127; else shuf -i 0-271 -n 1; fi)\\&limit\\=1 | sed -n '//p' | sed 's/^.*>//gm'", - -- width = 180, - -- height = 80, - -- opts = { - -- position = "center", - -- hl = "String", - -- }, - -- } - -- - -- local buttons = { - -- type = "group", - -- val = { - -- { type = "text", val = "Joshua Bell :: RingOfStorms", opts = { hl = "SpecialComment", position = "center" } }, - -- { type = "padding", val = 1 }, - -- dashboard.button("SPC n", " " .. " New File"), - -- dashboard.button("SPC f f", " " .. " Find File"), - -- dashboard.button("SPC f w", " " .. " Find Word"), - -- -- dashboard.button("SPC q", " " .. " Quit", ":qa"), - -- }, - -- } - -- - -- local top_padding = vim.fn.max({ 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) }) - -- - -- local config = { - -- layout = { - -- { type = "padding", val = top_padding }, - -- header, - -- { type = "padding", val = 14 }, - -- { type = "padding", val = 2 }, - -- buttons, - -- }, - -- } - -- - -- alpha.setup(config) - -- end, - opts = function(_, opts) - -- customize the dashboard header - opts.section.header.val = { - " ▒▒▒▒▒▒ ", - " ▒▒▓▓▓▓▒▒▒▒▒▒▒▒ ", - " ▓▓▒▒▒▒▒▒▒▒░░ ▓▓ ", - " ▒▒▓▓▓▓▓▓▓▓▓▓▓▓░░░░ ▒▒▒▒▓▓▒▒▒▒ ", - " ▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░ ▒▒▓▓▓▓▓▓▒▒▒▒▒▒ ", - " ▓▓▓▓▓▓▓▓▓▓ ██▓▓▓▓▓▓▓▓ ▒▒▒▒ ██ ", - " ██▓▓▓▓ ▓▓████▓▓▓▓ ▒▒▒▒▒▒▒▒▓▓██▓▓ ▒▒▒▒▒▒ ", - " ██ ██ ▒▒▒▒▒▒░░░░ ▒▒▒▒▒▒ ▓▓▓▓▓▓ ▒▒▒▒▓▓▓▓██▓▓▒▒▒▒██▒▒▒▒▒▒▒▒▒▒ ", - " ▒▒▒▒▓▓ ▒▒▒▒▓▓▓▓▓▓▓▓▓▓▒▒░░ ░░▒▒▒▒▒▒▒▒▒▒ ▒▒▒▒ ▒▒▓▓▓▓▓▓▒▒▒▒▒▒▒▒ ██▓▓ ▓▓▓▓▓▓▓▓▒▒▒▒ ▓▓ ▒▒ ", - " ▒▒▓▓▓▓██▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ▒▒▓▓▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░░██▓▓ ██▓▓ ▒▒ ▒▒▒▒▓▓▒▒▒▒▓▓ ▒▒ ▒▒ ", - " ▒▒▓▓▓▓▓▓██▓▓▓▓▓▓████▓▓▓▓▓▓▓▓▓▓ ▒▒ ▒▒▒▒▒▒▒▒▒▒ ▓▓▓▓▓▓▓▓▓▓██▓▓▓▓██▓▓▓▓▓▓▓▓ ████▓▓▓▓▓▓▒▒ ██▒▒██▒▒▓▓▓▓▒▒▓▓▓▓▒▒▓▓▓▓██▓▓ ", - " ▓▓▓▓▓▓▓▓██▓▓██ ████ ▓▓▓▓▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒ ▒▒▓▓▒▒ ▒▒▒▒▒▒ ░░██ ▓▓▓▓▓▓▓▓██▓▓ ▓▓██▓▓ ▓▓ ▒▒▒▒▒▒▒▒▒▒▒▒ ██▓▓ ██▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▒▒▓▓▓▓▒▒▓▓", - " ░░▓▓▓▓░░░░████████░░ ░░▓▓▓▓░░ ░░▒▒▒▒▒▒▒▒░░▒▒▓▓▒▒░░▒▒▒▒░░ ░░██ ▓▓░░▓▓░░░░▓▓ ▓▓░░▓▓▒▒▓▓ ▒▒▓▓▓▓▓▓▓▓▒▒▒▒░░▒▒▓▓░░ ██▓▓▓▓▓▓██▓▓██░░██▓▓▓▓▓▓▒▒▓▓", - " ░░░░ ░░██▓▓░░ ░░░░ ░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ░░██ ▓▓ ▓▓ ▓▓ ░░ ▓▓▓▓░░░░ ░░░░░░░░░░▓▓▓▓▒▒██░░ ░░░░░░ ▒▒░░▓▓▓▓▓▓██░░██▒▒░░▓▓██▓▓▓▓░░", - " ██▓▓ ▒▒ ▒▒▒▒▒▒▒▒ ▓▓▓▓▒▒▒▒▒▒▒▒ ░░ ▓▓ ▓▓ ██ ▓▓▓▓▓▓ ▓▓ ▓▓██▓▓▓▓ ▒▒▒▒▒▒▒▒▒▒ ██░░██ ██▓▓████ ░░ ", - " ██▓▓ ░░ ▒▒░░▓▓░░ ▓▓▒▒░░▒▒░░▒▒ ▓▓ ██ ░░ ▒▒▓▓░░▓▓ ▓▓ ░░░░████▒▒▓▓▓▓▓▓▒▒▒▒░░ ░░ ░░ ██▓▓░░░░ ", - " ██▓▓ ▒▒▒▒▒▒ ▓▓ ██▓▓ ██ ██ ████▓▓██ ▓▓ ▓▓▒▒ ████ ", - " ▓▓▓▓██▓▓▓▓▓▓ ▓▓▒▒ ▓▓▓▓ ██▓▓ ▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓ ", - " ████▓▓██████▓▓▓▓████ ▓▓▓▓▓▓▓▓▓▓▒▒▓▓▓▓██▓▓ ████████▓▓▓▓████████ ██████▓▓████ ██▒▒▓▓▓▓██████▓▓▓▓▒▒██ ", - " ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▓▓▓ ▓▓▒▒▓▓██████▓▓▓▓▓▓▓▓▒▒██ ▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓▓▓ ▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒██ ", - " ██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒ ▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒ ██▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ ", - " ▓▓▓▓▓▓▓▓▒▒▓▓▓▓▓▓▓▓▒▒▒▒▓▓ ▓▓▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▓▓ ██▓▓▒▒▒▒▓▓▒▒▒▒▒▒▒▒▓▓▒▒▒▒▒▒██ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒██ ", - " ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▒▒▒▒░░░░░░░░░░░░░░░░▓▓ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██ ▓▓▓▓▓▓▒▒▒▒▒▒▓▓▒▒▒▒▓▓ ░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ", - " ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ░░████████████████████░░ ██▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░ ░░ ████▓▓▓▓▓▓▓▓▓▓████░░", - -- " .-------. .-./`) ,---. .--. .-_'''-. ,-----. ________ .-'''-. ,---------. ,-----. .-------. ,---. ,---. .-'''-. ", - -- " | _ _ \\ \\ .-.')| \\ | | '_( )_ \\ .' .-, '. | | / _ \\\\ \\ .' .-, '. | _ _ \\ | \\ / | / _ \\", - -- " | ( ' ) | / `-' \\| , \\ | ||(_ o _)| ' / ,-.| \\ _ \\ | .----' (`' )/`--' `--. ,---'/ ,-.| \\ _ \\ | ( ' ) | | , \\/ , | (`' )/`--'", - -- " |(_ o _) / `-'`\"`| |\\_ \\| |. (_,_)/___| ; \\ '_ / | :| _|____ (_ o _). | \\ ; \\ '_ / | :|(_ o _) / | |\\_ /| |(_ o _). ", - -- " | (_,_).' __ .---. | _( )_\\ || | .-----.| _`,/ \\ _/ ||_( )_ | (_,_). '. :_ _: | _`,/ \\ _/ || (_,_).' __ | _( )_/ | | (_,_). '. ", - -- " | |\\ \\ | || | | (_ o _) |' \\ '- .': ( '\\_/ \\ ;(_ o._)__|.---. \\ : (_I_) : ( '\\_/ \\ ;| |\\ \\ | || (_ o _) | |.---. \\ :", - -- " | | \\ `' /| | | (_,_)\\ | \\ `-'` | \\ `\"/ \\ ) / |(_,_) \\ `-' | (_(=)_) \\ `\"/ \\ ) / | | \\ `' /| (_,_) | |\\ `-' |", - -- " | | \\ / | | | | | | \\ / '. \\_/``\".' | | \\ / (_I_) '. \\_/``\".' | | \\ / | | | | \\ / ", - -- " ''-' `'-' '---' '--' '--' `'-...-' '-----' '---' `-...-' '---' '-----' ''-' `'-' '--' '--' `-...-' ", - "", - " ██╗ ██████╗ ███████╗██╗ ██╗", - " ██║██╔═══██╗██╔════╝██║ ██║", - " ██║██║ ██║███████╗███████║", - " ██ ██║██║ ██║╚════██║██╔══██║", - " ╚█████╔╝╚██████╔╝███████║██║ ██║", - " ╚════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝", - } - return opts - end, - }, - -- 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 "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, - -- }, - -- { - -- "windwp/nvim-autopairs", - -- config = function(plugin, opts) - -- require "plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call - -- -- add more custom autopairs configuration such as custom rules - -- local npairs = require "nvim-autopairs" - -- local Rule = require "nvim-autopairs.rule" - -- local cond = require "nvim-autopairs.conds" - -- npairs.add_rules( - -- { - -- Rule("$", "$", { "tex", "latex" }) - -- -- don't add a pair if the next character is % - -- :with_pair(cond.not_after_regex "%%") - -- -- don't add a pair if the previous character is xxx - -- :with_pair( - -- cond.not_before_regex("xxx", 3) - -- ) - -- -- don't move right when repeat character - -- :with_move(cond.none()) - -- -- don't delete if the next character is xx - -- :with_del(cond.not_after_regex "xx") - -- -- disable adding a newline when you press - -- :with_cr(cond.none()), - -- }, - -- -- disable for .vim files, but it work for another filetypes - -- Rule("a", "a", "-vim") - -- ) - -- end, - -- }, - -- By adding to the which-key config and using our helper function you can add more which-key registered bindings - -- { - -- "folke/which-key.nvim", - -- config = function(plugin, opts) - -- require "plugins.configs.which-key"(plugin, opts) -- include the default astronvim config that calls the setup call - -- -- Add bindings which show up as group name - -- local wk = require "which-key" - -- wk.register({ - -- b = { name = "Buffer" }, - -- }, { mode = "n", prefix = "" }) - -- end, - -- }, -} diff --git a/plugins/glow.lua b/plugins/glow.lua new file mode 100644 index 0000000..721cdeb --- /dev/null +++ b/plugins/glow.lua @@ -0,0 +1,8 @@ +return { + "lnc3l0t/glow.nvim", + branch = "advanced_window", + config = { + default_type = "keep", + }, + cmd = "Glow", +} diff --git a/plugins/inlay-hints.lua b/plugins/inlay-hints.lua new file mode 100644 index 0000000..c602f90 --- /dev/null +++ b/plugins/inlay-hints.lua @@ -0,0 +1,3 @@ +return { + -- "simrat39/inlay-hints.nvim", +} diff --git a/plugins/mason.lua b/plugins/mason.lua index 0ce85f8..626c8c6 100644 --- a/plugins/mason.lua +++ b/plugins/mason.lua @@ -6,6 +6,7 @@ return { -- overrides `require("mason-lspconfig").setup(...)` opts = { -- ensure_installed = { "lua_ls", "rust-analyzer", "rust-fmt", "typescript-language-server" }, + ensure_installed = { "lua_ls", "rust_analyzer", "tsserver", "jedi_language_server" }, }, }, -- use mason-null-ls to configure Formatters/Linter installation for null-ls sources @@ -13,14 +14,14 @@ return { "jay-babu/mason-null-ls.nvim", -- overrides `require("mason-null-ls").setup(...)` opts = { - -- ensure_installed = { "prettier", "stylua" }, + ensure_installed = { "prettier", "stylua", "black", "rust_fmt" }, }, }, { "jay-babu/mason-nvim-dap.nvim", -- overrides `require("mason-nvim-dap").setup(...)` opts = { - -- ensure_installed = { "python" }, + ensure_installed = { "codelldb" }, }, }, } diff --git a/plugins/material.lua b/plugins/material.lua new file mode 100644 index 0000000..87ca598 --- /dev/null +++ b/plugins/material.lua @@ -0,0 +1,18 @@ +return { + "marko-cerovac/material.nvim", + config = function() + vim.g.material_style = "darker" + require("material").setup { + plugins = { + "dashboard", + "gitsigns", + "telescope", + "nvim-tree", + "which-key", + }, + high_visibility = { + darker = true, + }, + } + end, +} diff --git a/plugins/null-ls.lua b/plugins/null-ls.lua index beceeda..84fbe9a 100644 --- a/plugins/null-ls.lua +++ b/plugins/null-ls.lua @@ -2,15 +2,16 @@ return { "jose-elias-alvarez/null-ls.nvim", opts = function(_, config) -- config variable is the default configuration table for the setup function call - -- local null_ls = require "null-ls" + local null_ls = require "null-ls" -- Check supported formatters and linters -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting -- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics config.sources = { -- Set a formatter - -- null_ls.builtins.formatting.stylua, - -- null_ls.builtins.formatting.prettier, + null_ls.builtins.formatting.stylua, + null_ls.builtins.formatting.prettier, + null_ls.builtins.formatting.rustfmt, } return config -- return final config table end, diff --git a/plugins/opengh.lua b/plugins/opengh.lua new file mode 100644 index 0000000..0226355 --- /dev/null +++ b/plugins/opengh.lua @@ -0,0 +1,4 @@ +return { + "Almo7aya/openingh.nvim", + event = "BufEnter", +} diff --git a/plugins/rust-tools.lua b/plugins/rust-tools.lua new file mode 100644 index 0000000..f011039 --- /dev/null +++ b/plugins/rust-tools.lua @@ -0,0 +1,40 @@ +return { + "simrat39/rust-tools.nvim", + after = { "mason-lspconfig.nvim" }, + config = function() + local rt = require "rust-tools" + rt.setup { + tools = { + runnables = { + use_telescope = true, + }, + inlay_hints = { + auto = true, + show_parameter_hints = true, + parameter_hints_prefix = "asdasd ", + other_hints_prefix = "dddd ", + only_current_line = false, + }, + }, + + -- all the opts to send to nvim-lspconfig + -- these override the defaults set by rust-tools.nvim + -- see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#rust_analyzer + -- server = { + -- -- on_attach is a callback called when the language server attachs to the buffer + -- on_attach = on_attach, + -- settings = { + -- -- to enable rust-analyzer settings visit: + -- -- https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_config.adoc + -- ["rust-analyzer"] = { + -- -- enable clippy on save + -- checkOnSave = { + -- command = "clippy", + -- }, + -- }, + -- }, + -- }, + } + rt.inlay_hints.enable() + end, +} diff --git a/plugins/treesitter.lua b/plugins/treesitter.lua index fb2cf8d..22261f0 100644 --- a/plugins/treesitter.lua +++ b/plugins/treesitter.lua @@ -1,4 +1,18 @@ return { "nvim-treesitter/nvim-treesitter", - opts = { "all" }, + opts = { + "all", + -- ensure_installed = "all", + -- auto_install = true, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + ident = { enable = true }, + rainbow = { + enable = true, + extended_mode = true, + max_file_lines = nil, + }, + }, } diff --git a/plugins/user.lua b/plugins/user.lua deleted file mode 100644 index 8be12fd..0000000 --- a/plugins/user.lua +++ /dev/null @@ -1,42 +0,0 @@ -return { - { - "marko-cerovac/material.nvim", - config = function() - vim.g.material_style = "darker" - require("material").setup { - plugins = { - "dashboard", - "gitsigns", - "telescope", - "nvim-tree", - "which-key", - }, - - high_visibility = { - darker = true, - -- lighter = true, - } - } - end, - }, - { - "Pocco81/auto-save.nvim", - event = "BufEnter", - }, - { - "Almo7aya/openingh.nvim", - event = "BufEnter", - }, - { - "gioele/vim-autoswap", - event = "BufEnter", - }, - { - "lnc3l0t/glow.nvim", - branch = "advanced_window", - config = { - default_type = "keep" - }, - cmd = "Glow" - }, -} diff --git a/plugins/vim-autoswap.lua b/plugins/vim-autoswap.lua new file mode 100644 index 0000000..e2e5d3e --- /dev/null +++ b/plugins/vim-autoswap.lua @@ -0,0 +1,4 @@ +return { + "gioele/vim-autoswap", + event = "BufEnter", +}