From cd6ac65f014f916a416579a61904842d119b6bff Mon Sep 17 00:00:00 2001 From: Daryl Ronningen Date: Mon, 8 Jul 2024 16:10:18 -0700 Subject: [PATCH] Revert "make pretterd and typescript-tools deletus" This reverts commit 3b9798fb3faece9edabfc2c54fb077d2620074cc. --- lazy-lock.json | 2 +- lua/community.lua | 3 ++ lua/plugins/astrolsp.lua | 18 ++------ lua/plugins/html-css.lua | 37 ---------------- lua/plugins/none-ls.lua | 6 ++- lua/plugins/typescript.lua | 91 -------------------------------------- lua/plugins/yaml.lua | 51 --------------------- 7 files changed, 12 insertions(+), 196 deletions(-) delete mode 100644 lua/plugins/html-css.lua delete mode 100644 lua/plugins/typescript.lua delete mode 100644 lua/plugins/yaml.lua diff --git a/lazy-lock.json b/lazy-lock.json index e598409..3d2e005 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -24,7 +24,7 @@ "guess-indent.nvim": { "branch": "main", "commit": "6cd61f7a600bb756e558627cd2e740302c58e32d" }, "heirline.nvim": { "branch": "master", "commit": "0d797435e54645a5f98bad7ad6046aac1ef95c1e" }, "indent-blankline.nvim": { "branch": "master", "commit": "65e20ab94a26d0e14acac5049b8641336819dfc7" }, - "lazy.nvim": { "branch": "main", "commit": "1870238cf9c579c5d7eb8ea8b296f10b81978d34" }, + "lazy.nvim": { "branch": "main", "commit": "f918318d21956b0874a65ab35ce3d94d9057aabf" }, "lsp-lens.nvim": { "branch": "main", "commit": "48bb1a7e271424c15f3d588d54adc9b7c319d977" }, "lsp_signature.nvim": { "branch": "master", "commit": "a38da0a61c172bb59e34befc12efe48359884793" }, "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, diff --git a/lua/community.lua b/lua/community.lua index 86e01b3..9ce70f0 100644 --- a/lua/community.lua +++ b/lua/community.lua @@ -5,11 +5,14 @@ ---@type LazySpec return { "AstroNvim/astrocommunity", + { import = "astrocommunity.pack.typescript" }, { import = "astrocommunity.pack.lua" }, { import = "astrocommunity.pack.python" }, + { import = "astrocommunity.pack.html-css" }, { import = "astrocommunity.pack.vue" }, { import = "astrocommunity.pack.rust" }, { import = "astrocommunity.pack.sql" }, + { import = "astrocommunity.pack.yaml" }, { import = "astrocommunity.editing-support.ultimate-autopair-nvim" }, { import = "astrocommunity.indent.indent-blankline-nvim" }, { import = "astrocommunity.indent.mini-indentscope" }, diff --git a/lua/plugins/astrolsp.lua b/lua/plugins/astrolsp.lua index 3efb40d..d7f0aa6 100644 --- a/lua/plugins/astrolsp.lua +++ b/lua/plugins/astrolsp.lua @@ -15,23 +15,11 @@ return { semantic_tokens = true, }, formatting = { - format_on_save = { - enabled = true, - }, disabled = { "sqls", - }, - }, - config = { - eslint = { - settings = { - eslint = { - format = { - enable = true, - }, - autoFixOnSave = true, - }, - }, + "typescript-tools", + "tsserver", + "eslint", }, }, }, diff --git a/lua/plugins/html-css.lua b/lua/plugins/html-css.lua deleted file mode 100644 index f152526..0000000 --- a/lua/plugins/html-css.lua +++ /dev/null @@ -1,37 +0,0 @@ -return { - { import = "astrocommunity.pack.json" }, - { - "nvim-treesitter/nvim-treesitter", - optional = true, - opts = function(_, opts) - if opts.ensure_installed ~= "all" then - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "html", "css" }) - end - end, - }, - { - "williamboman/mason-lspconfig.nvim", - optional = true, - opts = function(_, opts) - opts.ensure_installed = - require("astrocore").list_insert_unique(opts.ensure_installed, { "html", "cssls", "emmet_ls" }) - end, - }, - { - "AstroNvim/astrolsp", - opts = { - config = { - html = { init_options = { provideFormatter = false } }, - cssls = { init_options = { provideFormatter = false } }, - }, - }, - }, - { - "WhoIsSethDaniel/mason-tool-installer.nvim", - optional = true, - opts = function(_, opts) - opts.ensure_installed = - require("astrocore").list_insert_unique(opts.ensure_installed, { "html-lsp", "css-lsp", "emmet-ls" }) - end, - }, -} diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua index 7b0eb3e..3770cb3 100644 --- a/lua/plugins/none-ls.lua +++ b/lua/plugins/none-ls.lua @@ -5,7 +5,11 @@ return { "nvimtools/none-ls.nvim", dependencies = { "nvimtools/none-ls-extras.nvim" }, opts = function(_, config) - config.sources = {} + config.sources = { + require "none-ls.diagnostics.eslint_d", + require "none-ls.formatting.eslint_d", + require "none-ls.code_actions.eslint_d", + } return config -- return final config table end, } diff --git a/lua/plugins/typescript.lua b/lua/plugins/typescript.lua deleted file mode 100644 index 7708750..0000000 --- a/lua/plugins/typescript.lua +++ /dev/null @@ -1,91 +0,0 @@ -return { - "AstroNvim/astrocommunity", - { import = "astrocommunity.pack.json" }, - { import = "astrocommunity.lsp.nvim-lsp-file-operations" }, - { - "nvim-treesitter/nvim-treesitter", - optional = true, - opts = function(_, opts) - if opts.ensure_installed ~= "all" then - opts.ensure_installed = - require("astrocore").list_insert_unique(opts.ensure_installed, { "javascript", "typescript", "tsx", "jsdoc" }) - end - end, - }, - { - "williamboman/mason-lspconfig.nvim", - opts = function(_, opts) - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "tsserver", "eslint" }) - end, - }, - { - "jay-babu/mason-nvim-dap.nvim", - optional = true, - opts = function(_, opts) - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "js" }) - end, - }, - { - "WhoIsSethDaniel/mason-tool-installer.nvim", - optional = true, - opts = function(_, opts) - opts.ensure_installed = require("astrocore").list_insert_unique( - opts.ensure_installed, - { "typescript-language-server", "eslint-lsp", "js-debug-adapter" } - ) - end, - }, - { - "vuki656/package-info.nvim", - dependencies = { "MunifTanjim/nui.nvim" }, - opts = {}, - event = "BufRead package.json", - }, - { - "dmmulroy/tsc.nvim", - cmd = "TSC", - opts = {}, - }, - { - "mfussenegger/nvim-dap", - optional = true, - config = function() - local dap = require "dap" - dap.adapters["pwa-node"] = { - type = "server", - host = "localhost", - port = "${port}", - executable = { - command = "node", - args = { - require("mason-registry").get_package("js-debug-adapter"):get_install_path() - .. "/js-debug/src/dapDebugServer.js", - "${port}", - }, - }, - } - local js_config = { - { - type = "pwa-node", - request = "launch", - name = "Launch file", - program = "${file}", - cwd = "${workspaceFolder}", - }, - { - type = "pwa-node", - request = "attach", - name = "Attach", - processId = require("dap.utils").pick_process, - cwd = "${workspaceFolder}", - }, - } - - if not dap.configurations.javascript then - dap.configurations.javascript = js_config - else - require("astrocore").extend_tbl(dap.configurations.javascript, js_config) - end - end, - }, -} diff --git a/lua/plugins/yaml.lua b/lua/plugins/yaml.lua deleted file mode 100644 index 3556bf6..0000000 --- a/lua/plugins/yaml.lua +++ /dev/null @@ -1,51 +0,0 @@ -return { - { - "b0o/SchemaStore.nvim", - lazy = true, - dependencies = { - { - "AstroNvim/astrolsp", - optional = true, - ---@type AstroLSPOpts - opts = { - ---@diagnostic disable: missing-fields - config = { - yamlls = { - on_new_config = function(config) - config.settings.yaml.schemas = vim.tbl_deep_extend( - "force", - config.settings.yaml.schemas or {}, - require("schemastore").yaml.schemas() - ) - end, - settings = { yaml = { schemaStore = { enable = false, url = "" } } }, - }, - }, - }, - }, - }, - }, - { - "nvim-treesitter/nvim-treesitter", - optional = true, - opts = function(_, opts) - if opts.ensure_installed ~= "all" then - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "yaml" }) - end - end, - }, - { - "williamboman/mason-lspconfig.nvim", - optional = true, - opts = function(_, opts) - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "yamlls" }) - end, - }, - { - "WhoIsSethDaniel/mason-tool-installer.nvim", - optional = true, - opts = function(_, opts) - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "yaml-language-server" }) - end, - }, -}