diff --git a/lazy-lock.json b/lazy-lock.json index 28510a2..6ce65f2 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -12,10 +12,12 @@ "material.nvim": { "branch": "main", "commit": "0c725897bc3d22c45fbf25a602002ee02f06f619" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "20c2f2f5ba083bbb1e37b8bc3d590621434f31e9" }, "neodev.nvim": { "branch": "main", "commit": "2daabebac1b0b2ab7abba298c1a8f07a542866a6" }, + "noice.nvim": { "branch": "main", "commit": "f5178da0097e964b37951a0ebc078fdcc14280f3" }, "nui.nvim": { "branch": "main", "commit": "698e75814cd7c56b0dd8af4936bcef2d13807f3c" }, "null-ls.nvim": { "branch": "main", "commit": "77e53bc3bac34cc273be8ed9eb9ab78bcf67fa48" }, "nvim-dap": { "branch": "master", "commit": "56118cee6af15cb9ddba9d080880949d8eeb0c9f" }, "nvim-lspconfig": { "branch": "master", "commit": "1c13e529bd5683b54a39b633a560d2f00fcb25af" }, + "nvim-notify": { "branch": "master", "commit": "f3024b912073774111202f5fa6518b0cd2a74432" }, "nvim-treesitter": { "branch": "master", "commit": "f2778bd1a28b74adf5b1aa51aa57da85adfa3d16" }, "nvim-ts-autotag": { "branch": "main", "commit": "40615e96075c743ef47aaf9de966dc348bec6459" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bf8fbc2ca8f8cdb6efbd0a9e32740d7a991e4c3" }, @@ -27,4 +29,4 @@ "telescope.nvim": { "branch": "master", "commit": "40c31fdde93bcd85aeb3447bb3e2a3208395a868" }, "vim-autoswap": { "branch": "master", "commit": "e587e4b14a605d8921942ba65a37583813289272" }, "which-key.nvim": { "branch": "main", "commit": "e271c28118998c93a14d189af3395812a1aa646c" } -} \ No newline at end of file +} diff --git a/lua/user/README.md b/lua/user/README.md new file mode 100644 index 0000000..8be4273 --- /dev/null +++ b/lua/user/README.md @@ -0,0 +1,5 @@ +# Plugins to look into +- https://github.com/andythigpen/nvim-coverage +- https://github.com/lukas-reineke/indent-blankline.nvim +- https://github.com/johmsalas/text-case.nvim + diff --git a/lua/user/rest-http.lua b/lua/user/http_rest.lua similarity index 100% rename from lua/user/rest-http.lua rename to lua/user/http_rest.lua diff --git a/lua/user/ide_lsp_mason.lua b/lua/user/ide_lsp_mason.lua new file mode 100644 index 0000000..bb9377d --- /dev/null +++ b/lua/user/ide_lsp_mason.lua @@ -0,0 +1,127 @@ +-- npm install -g cspell@latest + +local output = vim.fn.system { + "which", + "cspell", +} +if output == nil or output == "" then + -- if v:shell_error != 0 then + vim.fn.system { + "npm", + "install", + "-g", + "cspell@latest", + } +end + +return { + { + -- universal JSON schema store, where schemas for popular JSON documents can be found. + "b0o/SchemaStore.nvim", + commit = "15f37630d3abfb98607dd8e4625b731a8558b96d", + }, + { + "neovim/nvim-lspconfig", + commit = "1c13e529bd5683b54a39b633a560d2f00fcb25af", + dependencies = { + "williamboman/mason-lspconfig.nvim", + } + }, + -- NULL LS + { + "jose-elias-alvarez/null-ls.nvim", + commit = "77e53bc3bac34cc273be8ed9eb9ab78bcf67fa48", + opts = function(_, config) + -- config variable is the default definitions table for the setup function call + 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.rustfmt, + -- null_ls.builtins.code_actions.proselint, -- TODO looks interesting + null_ls.builtins.code_actions.cspell.with { + config = { + find_json = function() return vim.fn.findfile("cspell.json", vim.fn.environ().HOME .. "/.config/nvim/lua/user/;") end, + }, + }, + null_ls.builtins.diagnostics.cspell.with { + extra_args = { "--config", "~/.config/nvim/lua/user/cspell.json" }, + }, + } + + config.update_in_insert = true + + return config -- return final config table + end, + }, + -- MASON + { + "williamboman/mason.nvim", + build = ":MasonUpdate", -- :MasonUpdate updates registry contents + commit = "08b2fd308e0107eab9f0b59d570b69089fd0b522", + cmd = { + "Mason", + "MasonInstall", + "MasonUninstall", + "MasonUninstallAll", + "MasonLog", + "MasonUpdate", -- AstroNvim extension here as well + "MasonUpdateAll", -- AstroNvim specific + }, + opts = { + ui = { + icons = { + package_installed = "✓", + package_uninstalled = "✗", + package_pending = "⟳", + }, + }, + }, + --config = function(_, opts) + --require('mason').setup(opts) + --for _, plugin in ipairs { "mason-lspconfig", "mason-null-ls", "mason-nvim-dap" } do + -- pcall(require, plugin) + --end + --end + }, + { + "williamboman/mason-lspconfig.nvim", + dependencies = { + "williamboman/mason.nvim", + }, + commit = "c55d18f3947562e699d34d89681edbf9f0e250d3", + cmd = { "LspInstall", "LspUninstall" }, + opts = { + ensure_installed = { "lua_ls", "rust_analyzer", "tsserver", "pyright", "cssls", "cssmodules_ls" }, + }, + }, + { + "jay-babu/mason-null-ls.nvim", + commit = "54d702020bf94e4eefd357f0b738317af30217eb", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + "williamboman/mason.nvim", + "jose-elias-alvarez/null-ls.nvim", + }, + opts = { + ensure_installed = { "prettier", "stylua", "black", "rust_fmt" }, + }, + }, + { + "jay-babu/mason-nvim-dap.nvim", + commit = "c836e511e796d2b6a25ad9f164f5b25d8b9ff705", + dependencies = { + "williamboman/mason.nvim", + "mfussenegger/nvim-dap", + }, + opts = { + ensure_installed = { "codelldb" }, + }, + }, + +} diff --git a/lua/user/layout-msg-popups_noice.lua b/lua/user/layout-msg-popups_noice.lua new file mode 100644 index 0000000..aa5f8e9 --- /dev/null +++ b/lua/user/layout-msg-popups_noice.lua @@ -0,0 +1,9 @@ +return { + "folke/noice.nvim", + commit = "f5178da0097e964b37951a0ebc078fdcc14280f3", + dependencies = { + "MunifTanjim/nui.nvim", + "rcarriga/nvim-notify", + }, + event = "VeryLazy" +} diff --git a/lua/user/neo-tree.lua b/lua/user/layout-side-bar_neo-tree.lua similarity index 100% rename from lua/user/neo-tree.lua rename to lua/user/layout-side-bar_neo-tree.lua diff --git a/lua/user/telescope.lua b/lua/user/layout_telescope.lua similarity index 100% rename from lua/user/telescope.lua rename to lua/user/layout_telescope.lua diff --git a/lua/user/lsp.lua b/lua/user/lsp.lua deleted file mode 100644 index bcfd393..0000000 --- a/lua/user/lsp.lua +++ /dev/null @@ -1,28 +0,0 @@ -return { - { - "b0o/SchemaStore.nvim", - commit = "15f37630d3abfb98607dd8e4625b731a8558b96d", - }, - { - "folke/neodev.nvim", - commit = "2daabebac1b0b2ab7abba298c1a8f07a542866a6", - opts = { - override = function(root_dir, library) - for _, astronvim_config in ipairs(astronvim.supported_configs) do - if root_dir:match(astronvim_config) then - library.plugins = true - break - end - end - vim.b.neodev_enabled = library.enabled - end, - }, - }, - { - "neovim/nvim-lspconfig", - commit = "1c13e529bd5683b54a39b633a560d2f00fcb25af", - dependencies = { - "williamboman/mason-lspconfig.nvim", - } - } -} diff --git a/lua/user/glow-markdown.lua b/lua/user/markdown-preview_glow.lua similarity index 100% rename from lua/user/glow-markdown.lua rename to lua/user/markdown-preview_glow.lua diff --git a/lua/user/mason.lua b/lua/user/mason.lua deleted file mode 100644 index ec65824..0000000 --- a/lua/user/mason.lua +++ /dev/null @@ -1,65 +0,0 @@ -return { - { - "williamboman/mason.nvim", - build = ":MasonUpdate", -- :MasonUpdate updates registry contents - commit = "08b2fd308e0107eab9f0b59d570b69089fd0b522", - cmd = { - "Mason", - "MasonInstall", - "MasonUninstall", - "MasonUninstallAll", - "MasonLog", - "MasonUpdate", -- AstroNvim extension here as well - "MasonUpdateAll", -- AstroNvim specific - }, - opts = { - ui = { - icons = { - package_installed = "✓", - package_uninstalled = "✗", - package_pending = "⟳", - }, - }, - }, - --config = function(_, opts) - --require('mason').setup(opts) - --for _, plugin in ipairs { "mason-lspconfig", "mason-null-ls", "mason-nvim-dap" } do - -- pcall(require, plugin) - --end - --end - }, - { - "williamboman/mason-lspconfig.nvim", - dependencies = { - "williamboman/mason.nvim", - }, - commit = "c55d18f3947562e699d34d89681edbf9f0e250d3", - cmd = { "LspInstall", "LspUninstall" }, - opts = { - ensure_installed = { "lua_ls", "rust_analyzer", "tsserver", "pyright", "cssls", "cssmodules_ls" }, - }, - }, - { - "jay-babu/mason-null-ls.nvim", - commit = "54d702020bf94e4eefd357f0b738317af30217eb", - event = { "BufReadPre", "BufNewFile" }, - dependencies = { - "williamboman/mason.nvim", - "jose-elias-alvarez/null-ls.nvim", - }, - opts = { - ensure_installed = { "prettier", "stylua", "black", "rust_fmt" }, - }, - }, - { - "jay-babu/mason-nvim-dap.nvim", - commit = "c836e511e796d2b6a25ad9f164f5b25d8b9ff705", - dependencies = { - "williamboman/mason.nvim", - "mfussenegger/nvim-dap", - }, - opts = { - ensure_installed = { "codelldb" }, - }, - }, -} diff --git a/lua/user/null-ls.lua b/lua/user/null-ls.lua deleted file mode 100644 index 41c6635..0000000 --- a/lua/user/null-ls.lua +++ /dev/null @@ -1,47 +0,0 @@ --- npm install -g cspell@latest - -local output = vim.fn.system { - "which", - "cspell", -} -if output == nil or output == "" then - -- if v:shell_error != 0 then - vim.fn.system { - "npm", - "install", - "-g", - "cspell@latest", - } -end - -return { - "jose-elias-alvarez/null-ls.nvim", - commit = "77e53bc3bac34cc273be8ed9eb9ab78bcf67fa48", - opts = function(_, config) - -- config variable is the default definitions table for the setup function call - 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.rustfmt, - -- null_ls.builtins.code_actions.proselint, -- TODO looks interesting - null_ls.builtins.code_actions.cspell.with { - config = { - find_json = function() return vim.fn.findfile("cspell.json", vim.fn.environ().HOME .. "/.config/nvim/lua/user/;") end, - }, - }, - null_ls.builtins.diagnostics.cspell.with { - extra_args = { "--config", "~/.config/nvim/lua/user/cspell.json" }, - }, - } - - config.update_in_insert = true - - return config -- return final config table - end, -} diff --git a/lua/user/treesitter.lua b/lua/user/syntax-highlighting_treesitter.lua similarity index 100% rename from lua/user/treesitter.lua rename to lua/user/syntax-highlighting_treesitter.lua diff --git a/lua/user/text-case.lua b/lua/user/text-case.lua deleted file mode 100644 index 38a3533..0000000 --- a/lua/user/text-case.lua +++ /dev/null @@ -1 +0,0 @@ -return {} -- TODO try out https://github.com/johmsalas/text-case.nvim diff --git a/lua/user/material.lua b/lua/user/theme_material.lua similarity index 100% rename from lua/user/material.lua rename to lua/user/theme_material.lua diff --git a/lua/user/plenary.lua b/lua/user/util-plenary.lua similarity index 100% rename from lua/user/plenary.lua rename to lua/user/util-plenary.lua diff --git a/lua/user/which-key.lua b/lua/user/util_which-key.lua similarity index 100% rename from lua/user/which-key.lua rename to lua/user/util_which-key.lua diff --git a/lua/user/alpha.lua b/lua/user/welcome-screen_alpha.lua similarity index 100% rename from lua/user/alpha.lua rename to lua/user/welcome-screen_alpha.lua