♻️ refactor(nvim): changed package info as a cmp dependency, and nvim updates

This commit is contained in:
Sergio Laín 2023-10-18 18:59:04 +02:00
parent a4e88b61a6
commit a0f144ae20
No known key found for this signature in database
GPG key ID: E3BC677C07A2C7AC
5 changed files with 11 additions and 45 deletions

View file

@ -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" },

View file

@ -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({
["<C-j>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),

View file

@ -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<string,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,
-- },
},
},
},
}

View file

@ -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",
},
},
}

View file

@ -423,6 +423,7 @@ return {
},
extensions = {
undo = {
use_delta = true,
side_by_side = true,
layout_strategy = "vertical",
layout_config = {