diff --git a/init.lua b/init.lua index b7edb12..e088bc8 100644 --- a/init.lua +++ b/init.lua @@ -155,6 +155,8 @@ local config = { mappings = { -- first key is the mode n = { + ["ft"] = false, + ["fT"] = { function() require("telescope.builtin").colorscheme { enable_preview = true } end, desc = "Find themes" }, -- second key is the lefthand side of the map -- mappings seen under group name "Buffer" ["bb"] = { "tabnew", desc = "New tab" }, @@ -210,6 +212,7 @@ local config = { ["du"] = { function() require("dapui").toggle() end, desc = "Toggle Debugger UI" }, ["dh"] = { function() require("dap.ui.widgets").hover() end, desc = "Debugger Hover" }, -- Mardown preview + ["m"] = { name = "Markdown" }, ["mp"] = { "MarkdownPreview", desc = "Markdown preview" }, ["ms"] = { "MarkdownPreviewStop", desc = "Markdown preview stop" }, ["mt"] = { "MarkdownPreviewToggle", desc = "Markdown preview toggle" }, @@ -237,10 +240,11 @@ local config = { ["xX"] = { "VimtexReloadState", desc = "Reload the state for the current buffer" }, ["xs"] = { "VimtexToggleMain", desc = "Set current file as 'current project'" }, ["xa"] = { "VimtexContextMenu", desc = "Show context menu" }, + + ["ft"] = { name = "Trouble, Tagbar" }, -- Taglist - ["fT"] = { "TlistToggle", desc = "Tagbar toggle " }, + ["ftT"] = { "TlistToggle", desc = "Tagbar toggle " }, -- Trouble - -- ["ft"] = { name = "Trouble" }, ["ftx"] = { "TroubleToggle", desc = "Toggle Trouble" }, ["ftw"] = { "TroubleToggle workspace_diagnostics", desc = "Workspace diagnostics" }, ["ftd"] = { "TroubleToggle document_diagnostics", desc = "Document diagnostics" }, @@ -248,11 +252,12 @@ local config = { ["ftl"] = { "TroubleToggle loclist", desc = "Loc List" }, ["ftR"] = { "TroubleToggle lsp_references", desc = "Lsp references" }, -- ["ftt"] = { "TodoTrouble", desc = "Todo Trouble" }, + -- -- Autosave [""] = { "ASToggle", desc = "Toggle autosave" }, ["fs"] = { "ASToggle", desc = "Toggle autosave" }, -- Carbon code sharing - ["S"] = { "CarbonNow", desc = "Share code on Carbon", silent = true }, + ["s"] = { "CarbonNow", desc = "Share code on Carbon", silent = true }, }, v = { -- Carbon code sharing @@ -331,20 +336,20 @@ local config = { -- end, -- }, -- By adding to the which-key config and using our helper function you can add more which-key registered bindings - { - "folke/which-key.nvim", - config = function(plugin, opts) - require "plugins.configs.which-key" (plugin, opts) - -- Add bindings which show up as group name - local wk = require "which-key" - wk.register({ - m = { name = "Markdown" }, - ft = { name = "Trouble" }, - b = { name = "Buffers" }, - }, { mode = "n", prefix = "" }) - end, - }, - -- + -- { + -- "folke/which-key.nvim", + -- config = function(plugin, opts) + -- require "plugins.configs.which-key" (plugin, opts) + -- -- Add bindings which show up as group name + -- local wk = require "which-key" + -- wk.register({ + -- m = { name = "Markdown" }, + -- ft = { name = "Trouble" }, + -- b = { name = "Buffers" }, + -- }, { mode = "n", prefix = "" }) + -- end, + -- }, + { -- override nvim-cmp plugin @@ -378,7 +383,7 @@ local config = { -- Editorconfig { "editorconfig/editorconfig-vim", - event = "BufRead" + event = "User AstroFile" }, -- You can also add new plugins here as well: @@ -421,7 +426,7 @@ local config = { -- Comments { "folke/todo-comments.nvim", - event = "BufEnter", + event = "User AstroFile", }, -- Show todo comments, warnings, errors, ... { @@ -473,7 +478,7 @@ local config = { -- Basic editor functionality { "Pocco81/auto-save.nvim", - event = "UIEnter", + event = "User AstroFile", config = function() require("auto-save").setup() end,