Pārlūkot izejas kodu

fix losing dashboard command add whichkey binding for lunarconfig

christianchiarulli 4 gadi atpakaļ
vecāks
revīzija
d6b00cec25
3 mainītis faili ar 15 papildinājumiem un 5 dzēšanām
  1. 4 4
      lua/lv-dashboard/init.lua
  2. 10 0
      lua/lv-which-key/init.lua
  3. 1 1
      lua/plugins.lua

+ 4 - 4
lua/lv-dashboard/init.lua

@@ -28,10 +28,10 @@ M.config = function()
       description = { "  Settings           " },
       command = ":e " .. CONFIG_PATH .. "/lv-config.lua",
     },
-    f = {
-      description = { "  Neovim Config Files" },
-      command = "Telescope find_files cwd=" .. CONFIG_PATH,
-    },
+    -- f = {
+    --   description = { "  Neovim Config Files" },
+    --   command = "Telescope find_files cwd=" .. CONFIG_PATH,
+    -- },
     -- e = {description = {'  Marks              '}, command = 'Telescope marks'}
   }
   vim.cmd "let g:dashboard_session_directory = $HOME..'/.config/nvim/.sessions'"

+ 10 - 0
lua/lv-which-key/init.lua

@@ -84,13 +84,23 @@ vim.api.nvim_set_keymap("v", "<leader>/", ":CommentToggle<CR>", { noremap = true
 -- close buffer
 vim.api.nvim_set_keymap("n", "<leader>c", ":BufferClose<CR>", { noremap = true, silent = true })
 
+-- open lv-config
+vim.api.nvim_set_keymap(
+  "n",
+  "<leader>.",
+  ":e " .. CONFIG_PATH .. "/lv-config.lua<CR>",
+  { noremap = true, silent = true }
+)
+
 local mappings = {
 
+  ["."] = "LunarConfig",
   ["/"] = "Comment",
   ["c"] = "Close Buffer",
   ["e"] = "Explorer",
   ["f"] = "Find File",
   ["h"] = "No Highlight",
+  [";"] = "Dashboard",
   b = {
     name = "Buffers",
     j = { "<cmd>BufferPick<cr>", "jump to buffer" },

+ 1 - 1
lua/plugins.lua

@@ -127,7 +127,7 @@ return require("packer").startup(function(use)
   use {
     "ChristianChiarulli/dashboard-nvim",
     event = "BufWinEnter",
-    cmd = { "Dashboard", "DashboardNewFile", "DashboardJumpMarks" },
+    -- cmd = { "Dashboard", "DashboardNewFile", "DashboardJumpMarks" },
     config = function()
       require("lv-dashboard").config()
     end,