From a0f144ae2063409d16ec8582c957ba7f9822383c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Wed, 18 Oct 2023 18:59:04 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(nvim):=20changed?= =?UTF-8?q?=20package=20info=20as=20a=20cmp=20dependency,=20and=20nvim=20u?= =?UTF-8?q?pdates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lazy-lock.json | 5 ++-- .config/nvim/lua/plugins/cmp.lua | 7 ++++++ .config/nvim/lua/plugins/lint.lua | 15 +----------- .config/nvim/lua/plugins/package-info.lua | 28 ----------------------- .config/nvim/lua/plugins/telescope.lua | 1 + 5 files changed, 11 insertions(+), 45 deletions(-) delete mode 100644 .config/nvim/lua/plugins/package-info.lua diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 87f66068..d74f5715 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,7 +1,7 @@ { "LazyVim": { "branch": "main", "commit": "ae77bfda89067c36291365c0e2b4d4db7bbc3aac" }, "LuaSnip": { "branch": "master", "commit": "80a8528f084a97b624ae443a6f50ff8074ba486b" }, - "SchemaStore.nvim": { "branch": "main", "commit": "417c413278c369d2c5f52d0509f7e8ba0ada6418" }, + "SchemaStore.nvim": { "branch": "main", "commit": "a8fa6a36f09f00d32577fae0b3cee2f25ffc5c74" }, "actions-preview.nvim": { "branch": "master", "commit": "5650c76abfb84d6498330dd045657ba630ecdbba" }, "alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" }, "animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" }, @@ -73,7 +73,7 @@ "nvim-devdocs": { "branch": "master", "commit": "7414d200c829acb05c1850264ba90232c1726079" }, "nvim-jdtls": { "branch": "master", "commit": "a09f8cdd75c546eb024d0f0b5b3ad185f05b738f" }, "nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" }, - "nvim-lint": { "branch": "master", "commit": "c232cbfbe759b448a8c4a3eca5bde17de8c5ca00" }, + "nvim-lint": { "branch": "master", "commit": "7c8b50a2bb62b544eb91434fd008a34c4b51fd6d" }, "nvim-lspconfig": { "branch": "master", "commit": "e49b1e90c1781ce372013de3fa93a91ea29fc34a" }, "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" }, "nvim-numbertoggle": { "branch": "main", "commit": "9ab95e60ea5ec138e1b2332e0fc18b8e5de464c6" }, @@ -97,7 +97,6 @@ "persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" }, "persistent-breakpoints.nvim": { "branch": "main", "commit": "db2ad5974b0435cb806cd287e7525219d6ac4bd3" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, - "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "b160af1d2a2a616718c4b01cd88105a8f4c88a73" }, "rayso.nvim": { "branch": "main", "commit": "debedaa7f0ed754ab16a292a45bbae8dcc3410c5" }, diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua index 9309861c..51260402 100644 --- a/.config/nvim/lua/plugins/cmp.lua +++ b/.config/nvim/lua/plugins/cmp.lua @@ -3,6 +3,13 @@ local cmp = require("cmp") return { { "hrsh7th/nvim-cmp", + dependencies = { + { + "vuki656/package-info.nvim", + event = { "BufRead package.json" }, + opts = {}, + }, + }, opts = { mapping = cmp.mapping.preset.insert({ [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), diff --git a/.config/nvim/lua/plugins/lint.lua b/.config/nvim/lua/plugins/lint.lua index a6134000..091dc12a 100644 --- a/.config/nvim/lua/plugins/lint.lua +++ b/.config/nvim/lua/plugins/lint.lua @@ -8,25 +8,12 @@ return { linters_by_ft = { fish = { "fish" }, markdown = { "markdownlint" }, - python = { "pylint" }, + -- python = { "pylint" }, dockerfile = { "hadolint" }, css = { "stylelint" }, sass = { "stylelint" }, scss = { "stylelint" }, }, - -- LazyVim extension to easily override linter options - -- or add custom linters. - ---@type table - linters = { - -- -- Example of using selene only when a selene.toml file is present - -- selene = { - -- -- `condition` is another LazyVim extension that allows you to - -- -- dynamically enable/disable linters based on the context. - -- condition = function(ctx) - -- return vim.fs.find({ "selene.toml" }, { path = ctx.filename, upward = true })[1] - -- end, - -- }, - }, }, }, } diff --git a/.config/nvim/lua/plugins/package-info.lua b/.config/nvim/lua/plugins/package-info.lua deleted file mode 100644 index f7c93d17..00000000 --- a/.config/nvim/lua/plugins/package-info.lua +++ /dev/null @@ -1,28 +0,0 @@ -return { - { - "vuki656/package-info.nvim", - requires = "MunifTanjim/nui.nvim", - event = "BufRead", - opts = { - colors = { - up_to_date = "#3C4048", -- Text color for up to date dependency virtual text - outdated = "#d19a66", -- Text color for outdated dependency virtual text - }, - icons = { - enable = true, -- Whether to display icons - style = { - up_to_date = "|  ", -- Icon for up to date dependencies - outdated = "|  ", -- Icon for outdated dependencies - }, - }, - autostart = true, -- Whether to autostart when `package.json` is opened - hide_up_to_date = false, -- It hides up to date versions when displaying virtual text - hide_unstable_versions = false, -- It hides unstable versions from version list e.g next-11.1.3-canary3 - -- Can be `npm`, `yarn`, or `pnpm`. Used for `delete`, `install` etc... - -- The plugin will try to auto-detect the package manager based on - -- `yarn.lock` or `package-lock.json`. If none are found it will use the - -- provided one, if nothing is provided it will use `yarn` - package_manager = "npm", - }, - }, -} diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index b5fed24b..71f30e48 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -423,6 +423,7 @@ return { }, extensions = { undo = { + use_delta = true, side_by_side = true, layout_strategy = "vertical", layout_config = {