Selaa lähdekoodia

Merge branch 'rolling' of github.com:LunarVim/LunarVim

ChristianChiarulli 3 vuotta sitten
vanhempi
commit
71ef119319

+ 0 - 0
lua/lvim/lualine/themes/onedarker.lua → lua/lualine/themes/onedarker.lua


+ 1 - 0
lua/lvim/core/cmp.lua

@@ -169,6 +169,7 @@ M.config = function()
       native_menu = false,
       native_menu = false,
     },
     },
     formatting = {
     formatting = {
+      fields = { "kind", "abbr", "menu" },
       kind_icons = {
       kind_icons = {
         Class = " ",
         Class = " ",
         Color = " ",
         Color = " ",

+ 21 - 0
lua/lvim/core/telescope.lua

@@ -2,12 +2,17 @@ local M = {}
 
 
 function M.config()
 function M.config()
   -- Define this minimal config so that it's available if telescope is not yet available.
   -- Define this minimal config so that it's available if telescope is not yet available.
+
   lvim.builtin.telescope = {
   lvim.builtin.telescope = {
     ---@usage disable telescope completely [not recommeded]
     ---@usage disable telescope completely [not recommeded]
     active = true,
     active = true,
     on_config_done = nil,
     on_config_done = nil,
   }
   }
 
 
+  local ok, actions = pcall(require, "telescope.actions")
+  if not ok then
+    return
+  end
   lvim.builtin.telescope = vim.tbl_extend("force", lvim.builtin.telescope, {
   lvim.builtin.telescope = vim.tbl_extend("force", lvim.builtin.telescope, {
     defaults = {
     defaults = {
       prompt_prefix = " ",
       prompt_prefix = " ",
@@ -33,6 +38,22 @@ function M.config()
         "--smart-case",
         "--smart-case",
         "--hidden",
         "--hidden",
       },
       },
+      mappings = {
+        i = {
+          ["<C-n>"] = actions.move_selection_next,
+          ["<C-p>"] = actions.move_selection_previous,
+          ["<C-c>"] = actions.close,
+          ["<C-j>"] = actions.cycle_history_next,
+          ["<C-k>"] = actions.cycle_history_prev,
+          ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
+          ["<CR>"] = actions.select_default + actions.center,
+        },
+        n = {
+          ["<C-n>"] = actions.move_selection_next,
+          ["<C-p>"] = actions.move_selection_previous,
+          ["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
+        },
+      },
       file_ignore_patterns = {},
       file_ignore_patterns = {},
       path_display = { shorten = 5 },
       path_display = { shorten = 5 },
       winblend = 0,
       winblend = 0,

+ 11 - 2
lua/lvim/core/treesitter.lua

@@ -16,8 +16,17 @@ M.config = function()
       disable = { "latex" },
       disable = { "latex" },
     },
     },
     context_commentstring = {
     context_commentstring = {
-      enable = false,
-      config = { css = "// %s" },
+      enable = true,
+      config = {
+        -- Languages that have a single comment style
+        typescript = "// %s",
+        css = "/* %s */",
+        scss = "/* %s */",
+        html = "<!-- %s -->",
+        svelte = "<!-- %s -->",
+        vue = "<!-- %s -->",
+        json = "",
+      },
     },
     },
     -- indent = {enable = true, disable = {"python", "html", "javascript"}},
     -- indent = {enable = true, disable = {"python", "html", "javascript"}},
     -- TODO seems to be broken
     -- TODO seems to be broken

+ 83 - 9
lua/lvim/plugins.lua

@@ -1,24 +1,76 @@
+
+local commit = {
+  packer = "7f62848f3a92eac61ae61def5f59ddb5e2cc6823",
+  lsp_config = "6224c54a9945a52bf43a8bc1a42a112084590c0b",
+  nlsp_settings = "29f49afe27b43126d45a05baf3161a28b929f2f1",
+  null_ls = "64b269b51c7490660dcb2008f59ae260f2cdbbe4",
+  fix_cursor_hold = "0e4e22d21975da60b0fd2d302285b3b603f9f71e",
+  lsp_installer = "6cb24638a42f6f750f1bac40cf9f18dcb0d0d489",
+  nvim_notify = "ee79a5e2f8bde0ebdf99880a98d1312da83a3caa",
+  structlog = "6f1403a192791ff1fa7ac845a73de9e860f781f1",
+  popup = "f91d80973f80025d4ed00380f2e06c669dfda49d",
+  plenary = "96e821e8001c21bc904d3c15aa96a70c11462c5f",
+  telescope = "078a48db9e0720b07bfcb8b59342c5305a1d1fdc",
+  telescope_fzf_native = "59e38e1661ffdd586cb7fc22ca0b5a05c7caf988",
+  nvim_cmp = "1774ff0f842146521c63707245d3de5db2bb3732",
+  friendly_snippets = "94f1d917435c71bc6494d257afa90d4c9449aed2",
+  autopairs = "f858ab38b532715dbaf7b2773727f8622ba04322",
+  treesitter = "47cfda2c6711077625c90902d7722238a8294982",
+  context_commentstring = "159c5b9a2cdb8a8fe342078b7ac8139de76bad62",
+  nvim_tree = "f92b7e7627c5a36f4af6814c408211539882c4f3",
+  gitsigns = "61a81b0c003de3e12555a5626d66fb6a060d8aca",
+  which_key = "d3032b6d3e0adb667975170f626cb693bfc66baa",
+  comment = "620445b87a0d1640fac6991f9c3338af8dec1884",
+  project = "3a1f75b18f214064515ffba48d1eb7403364cc6a",
+  nvim_web_devicons = "ee101462d127ed6a5561ce9ce92bfded87d7d478",
+  lualine = "3f5cdc51a08c437c7705e283eebd4cf9fbb18f80",
+  barbar = "6e638309efcad2f308eb9c5eaccf6f62b794bbab",
+  dap = "dd778f65dc95323f781f291fb7c5bf3c17d057b1",
+  dap_install = "dd09e9dd3a6e29f02ac171515b8a089fb82bb425",
+  toggleterm = "5f9ba91157a25be5ee7395fbc11b1a8f25938365"
+}
+
 return {
 return {
   -- Packer can manage itself as an optional plugin
   -- Packer can manage itself as an optional plugin
-  { "wbthomason/packer.nvim" },
-  { "neovim/nvim-lspconfig" },
-  { "tamago324/nlsp-settings.nvim" },
-  { "jose-elias-alvarez/null-ls.nvim" },
-  { "antoinemadec/FixCursorHold.nvim" }, -- Needed while issue https://github.com/neovim/neovim/issues/12587 is still open
+  { "wbthomason/packer.nvim",
+    commit = commit.packer,
+  },
+  { "neovim/nvim-lspconfig",
+    commit = commit.lsp_config,
+
+  },
+  { "tamago324/nlsp-settings.nvim",
+    commit = commit.nlsp_settings,
+  },
+  { "jose-elias-alvarez/null-ls.nvim",
+    commit = commit.null_ls,
+  },
+  { "antoinemadec/FixCursorHold.nvim",
+    commit = commit.fix_cursor_hold,
+  }, -- Needed while issue https://github.com/neovim/neovim/issues/12587 is still open
   {
   {
     "williamboman/nvim-lsp-installer",
     "williamboman/nvim-lsp-installer",
+    commit = commit.lsp_installer,
   },
   },
   {
   {
     "rcarriga/nvim-notify",
     "rcarriga/nvim-notify",
+    commit = commit.nvim_notify,
     disable = not lvim.builtin.notify.active,
     disable = not lvim.builtin.notify.active,
   },
   },
-  { "Tastyep/structlog.nvim" },
+  { "Tastyep/structlog.nvim",
+    commit = commit.structlog,
+  },
 
 
-  { "nvim-lua/popup.nvim" },
-  { "nvim-lua/plenary.nvim" },
+  { "nvim-lua/popup.nvim",
+    commit = commit.popup,
+  },
+  { "nvim-lua/plenary.nvim",
+    commit = commit.plenary,
+  },
   -- Telescope
   -- Telescope
   {
   {
     "nvim-telescope/telescope.nvim",
     "nvim-telescope/telescope.nvim",
+    commit = commit.telescope,
     config = function()
     config = function()
       require("lvim.core.telescope").setup()
       require("lvim.core.telescope").setup()
     end,
     end,
@@ -26,12 +78,14 @@ return {
   },
   },
   {
   {
     "nvim-telescope/telescope-fzf-native.nvim",
     "nvim-telescope/telescope-fzf-native.nvim",
+    commit = commit.telescope_fzf_native,
     run = "make",
     run = "make",
     disable = not lvim.builtin.telescope.active,
     disable = not lvim.builtin.telescope.active,
   },
   },
   -- Install nvim-cmp, and buffer source as a dependency
   -- Install nvim-cmp, and buffer source as a dependency
   {
   {
     "hrsh7th/nvim-cmp",
     "hrsh7th/nvim-cmp",
+    commit = commit.nvim_cmp,
     config = function()
     config = function()
       require("lvim.core.cmp").setup()
       require("lvim.core.cmp").setup()
     end,
     end,
@@ -52,6 +106,7 @@ return {
   },
   },
   {
   {
     "rafamadriz/friendly-snippets",
     "rafamadriz/friendly-snippets",
+    commit = commit.friendly_snippets,
     -- event = "InsertCharPre",
     -- event = "InsertCharPre",
     -- disable = not lvim.builtin.compe.active,
     -- disable = not lvim.builtin.compe.active,
   },
   },
@@ -59,6 +114,7 @@ return {
   -- Autopairs
   -- Autopairs
   {
   {
     "windwp/nvim-autopairs",
     "windwp/nvim-autopairs",
+    commit = commit.autopairs,
     -- event = "InsertEnter",
     -- event = "InsertEnter",
     config = function()
     config = function()
       require("lvim.core.autopairs").setup()
       require("lvim.core.autopairs").setup()
@@ -69,18 +125,25 @@ return {
   -- Treesitter
   -- Treesitter
   {
   {
     "nvim-treesitter/nvim-treesitter",
     "nvim-treesitter/nvim-treesitter",
+    commit = commit.treesitter,
     branch = "0.5-compat",
     branch = "0.5-compat",
     -- run = ":TSUpdate",
     -- run = ":TSUpdate",
     config = function()
     config = function()
       require("lvim.core.treesitter").setup()
       require("lvim.core.treesitter").setup()
     end,
     end,
   },
   },
+  {
+    "JoosepAlviste/nvim-ts-context-commentstring",
+    commit = commit.context_commentstring,
+    event = "BufReadPost",
+  },
 
 
   -- NvimTree
   -- NvimTree
   {
   {
     "kyazdani42/nvim-tree.lua",
     "kyazdani42/nvim-tree.lua",
     -- event = "BufWinOpen",
     -- event = "BufWinOpen",
     -- cmd = "NvimTreeToggle",
     -- cmd = "NvimTreeToggle",
+    -- commit = commit.nvim_tree,
     commit = "f92b7e7627c5a36f4af6814c408211539882c4f3",
     commit = "f92b7e7627c5a36f4af6814c408211539882c4f3",
     config = function()
     config = function()
       require("lvim.core.nvimtree").setup()
       require("lvim.core.nvimtree").setup()
@@ -90,6 +153,7 @@ return {
 
 
   {
   {
     "lewis6991/gitsigns.nvim",
     "lewis6991/gitsigns.nvim",
+    commit = commit.gitsigns,
 
 
     config = function()
     config = function()
       require("lvim.core.gitsigns").setup()
       require("lvim.core.gitsigns").setup()
@@ -101,6 +165,7 @@ return {
   -- Whichkey
   -- Whichkey
   {
   {
     "folke/which-key.nvim",
     "folke/which-key.nvim",
+    commit = commit.which_key,
     config = function()
     config = function()
       require("lvim.core.which-key").setup()
       require("lvim.core.which-key").setup()
     end,
     end,
@@ -111,6 +176,7 @@ return {
   -- Comments
   -- Comments
   {
   {
     "numToStr/Comment.nvim",
     "numToStr/Comment.nvim",
+    commit = commit.comment,
     event = "BufRead",
     event = "BufRead",
     config = function()
     config = function()
       require("lvim.core.comment").setup()
       require("lvim.core.comment").setup()
@@ -121,6 +187,7 @@ return {
   -- project.nvim
   -- project.nvim
   {
   {
     "ahmedkhalf/project.nvim",
     "ahmedkhalf/project.nvim",
+    commit = commit.project,
     config = function()
     config = function()
       require("lvim.core.project").setup()
       require("lvim.core.project").setup()
     end,
     end,
@@ -128,12 +195,15 @@ return {
   },
   },
 
 
   -- Icons
   -- Icons
-  { "kyazdani42/nvim-web-devicons" },
+  { "kyazdani42/nvim-web-devicons",
+    commit = commit.nvim_web_devicons,
+  },
 
 
   -- Status Line and Bufferline
   -- Status Line and Bufferline
   {
   {
     -- "hoob3rt/lualine.nvim",
     -- "hoob3rt/lualine.nvim",
     "nvim-lualine/lualine.nvim",
     "nvim-lualine/lualine.nvim",
+    commit = commit.lualine,
     -- "Lunarvim/lualine.nvim",
     -- "Lunarvim/lualine.nvim",
     config = function()
     config = function()
       require("lvim.core.lualine").setup()
       require("lvim.core.lualine").setup()
@@ -143,6 +213,7 @@ return {
 
 
   {
   {
     "romgrk/barbar.nvim",
     "romgrk/barbar.nvim",
+    commit = commit.barbar,
     config = function()
     config = function()
       require("lvim.core.bufferline").setup()
       require("lvim.core.bufferline").setup()
     end,
     end,
@@ -153,6 +224,7 @@ return {
   -- Debugging
   -- Debugging
   {
   {
     "mfussenegger/nvim-dap",
     "mfussenegger/nvim-dap",
+    commit = commit.dap,
     -- event = "BufWinEnter",
     -- event = "BufWinEnter",
     config = function()
     config = function()
       require("lvim.core.dap").setup()
       require("lvim.core.dap").setup()
@@ -163,6 +235,7 @@ return {
   -- Debugger management
   -- Debugger management
   {
   {
     "Pocco81/DAPInstall.nvim",
     "Pocco81/DAPInstall.nvim",
+    commit = commit.dap_install,
     -- event = "BufWinEnter",
     -- event = "BufWinEnter",
     -- event = "BufRead",
     -- event = "BufRead",
     disable = not lvim.builtin.dap.active,
     disable = not lvim.builtin.dap.active,
@@ -181,6 +254,7 @@ return {
   -- Terminal
   -- Terminal
   {
   {
     "akinsho/toggleterm.nvim",
     "akinsho/toggleterm.nvim",
+    commit = commit.toggleterm,
     event = "BufWinEnter",
     event = "BufWinEnter",
     config = function()
     config = function()
       require("lvim.core.terminal").setup()
       require("lvim.core.terminal").setup()