Explorar o código

chore: pin cmp related plugins (#1917)

Christian Chiarulli %!s(int64=3) %!d(string=hai) anos
pai
achega
3cd9e4c982

+ 1 - 1
lua/lvim/config/init.lua

@@ -57,7 +57,7 @@ local function handle_deprecated_settings()
       setting
     )
     vim.schedule(function()
-      vim.notify(msg, vim.log.levels.WARN)
+      Log:warn(msg)
     end)
   end
 

+ 1 - 0
lua/lvim/lsp/null-ls/formatters.lua

@@ -22,6 +22,7 @@ function M.list_available(filetype)
     end
   end
 
+  table.sort(formatters)
   return formatters
 end
 

+ 1 - 1
lua/lvim/lsp/null-ls/linters.lua

@@ -21,7 +21,7 @@ function M.list_available(filetype)
       table.insert(linters, provider.name)
     end
   end
-
+  table.sort(linters)
   return linters
 end
 

+ 31 - 10
lua/lvim/plugins.lua

@@ -27,6 +27,12 @@ local commit = {
   dap = "dd778f65dc95323f781f291fb7c5bf3c17d057b1",
   dap_install = "dd09e9dd3a6e29f02ac171515b8a089fb82bb425",
   toggleterm = "5f9ba91157a25be5ee7395fbc11b1a8f25938365",
+  luasnip = "bab7cc2c32fba00776d2f2fc4704bed4eee2d082",
+  cmp_luasnip = "16832bb50e760223a403ffa3042859845dd9ef9d",
+  cmp_buffer = "d1ca295ce584ec80763a6dc043080874b57ccffc",
+  cmp_nvim_lsp = "accbe6d97548d8d3471c04d512d36fa61d0e4be8",
+  cmp_path = "97661b00232a2fe145fe48e295875bc3299ed1f7",
+  cmp_nvim_lua = "d276254e7198ab7d00f117e88e223b4bd8c02d21",
 }
 
 return {
@@ -71,14 +77,6 @@ return {
     config = function()
       require("lvim.core.cmp").setup()
     end,
-    requires = {
-      "L3MON4D3/LuaSnip",
-      "saadparwaiz1/cmp_luasnip",
-      "hrsh7th/cmp-buffer",
-      "hrsh7th/cmp-nvim-lsp",
-      "hrsh7th/cmp-path",
-      "hrsh7th/cmp-nvim-lua",
-    },
     run = function()
       -- cmp's config requires cmp to be installed to run the first time
       if not lvim.builtin.cmp then
@@ -92,6 +90,30 @@ return {
     -- event = "InsertCharPre",
     -- disable = not lvim.builtin.compe.active,
   },
+  {
+    "L3MON4D3/LuaSnip",
+    commit = commit.luasnip,
+  },
+  {
+    "saadparwaiz1/cmp_luasnip",
+    commit = commit.cmp_luasnip,
+  },
+  {
+    "hrsh7th/cmp-buffer",
+    commit = commit.cmp_buffer,
+  },
+  {
+    "hrsh7th/cmp-nvim-lsp",
+    commit = commit.cmp_nvim_lsp,
+  },
+  {
+    "hrsh7th/cmp-path",
+    commit = commit.cmp_path,
+  },
+  {
+    "hrsh7th/cmp-nvim-lua",
+    commit = commit.cmp_nvim_lua,
+  },
 
   -- Autopairs
   {
@@ -125,8 +147,7 @@ return {
     "kyazdani42/nvim-tree.lua",
     -- event = "BufWinOpen",
     -- cmd = "NvimTreeToggle",
-    -- commit = commit.nvim_tree,
-    commit = "f92b7e7627c5a36f4af6814c408211539882c4f3",
+    commit = commit.nvim_tree,
     config = function()
       require("lvim.core.nvimtree").setup()
     end,

+ 14 - 4
utils/installer/config.example.lua

@@ -118,9 +118,13 @@ lvim.builtin.treesitter.highlight.enabled = true
 -- -- set a formatter, this will override the language server formatting capabilities (if it exists)
 -- local formatters = require "lvim.lsp.null-ls.formatters"
 -- formatters.setup {
---   { exe = "black" },
+--   { exe = "black", filetypes = { "python" } },
+--   { exe = "isort", filetypes = { "python" } },
 --   {
 --     exe = "prettier",
+--     ---@usage arguments to pass to the formatter
+--     -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}`
+--     args = { "--print-with", "100" },
 --     ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports.
 --     filetypes = { "typescript", "typescriptreact" },
 --   },
@@ -129,11 +133,17 @@ lvim.builtin.treesitter.highlight.enabled = true
 -- -- set additional linters
 -- local linters = require "lvim.lsp.null-ls.linters"
 -- linters.setup {
---   { exe = "black" },
+--   { exe = "flake8", filetypes = { "python" } },
 --   {
---     exe = "eslint_d",
+--     exe = "shellcheck",
+--     ---@usage arguments to pass to the formatter
+--     -- these cannot contain whitespaces, options such as `--line-width 80` become either `{'--line-width', '80'}` or `{'--line-width=80'}`
+--     args = { "--severity", "warning" },
+--   },
+--   {
+--     exe = "codespell",
 --     ---@usage specify which filetypes to enable. By default a providers will attach to all the filetypes it supports.
---     filetypes = { "javascript", "javascriptreact" },
+--     filetypes = { "javascript", "python" },
 --   },
 -- }