diff options
| author | eric.marin <maarin.eric@gmail.com> | 2024-10-16 21:45:26 +0200 |
|---|---|---|
| committer | eric.marin <maarin.eric@gmail.com> | 2024-10-16 21:45:26 +0200 |
| commit | b0cfdab1e93f660fda8f9398e30c9c996a1760f3 (patch) | |
| tree | 0b64ae82383491383be6570cfd8198db9f765a01 | |
| parent | ab2dadca189217eb152a2bd157c651e9e3f3145b (diff) | |
| download | dotfiles-b0cfdab1e93f660fda8f9398e30c9c996a1760f3.tar.gz dotfiles-b0cfdab1e93f660fda8f9398e30c9c996a1760f3.zip | |
nvim change
installed neorg
removed trouble
modified lspsaga
| -rw-r--r-- | ags/config.js | 39 | ||||
| -rw-r--r-- | ags/style.scss | 5 | ||||
| -rw-r--r-- | hypr/hyprland.conf | 2 | ||||
| -rw-r--r-- | nvim/lazy-lock.json | 18 | ||||
| -rw-r--r-- | nvim/lua/config/options.lua | 1 | ||||
| -rw-r--r-- | nvim/lua/plugins/dashboard-nvim.lua | 5 | ||||
| -rw-r--r-- | nvim/lua/plugins/lspsaga.lua | 43 | ||||
| -rw-r--r-- | nvim/lua/plugins/neorg.lua | 105 | ||||
| -rw-r--r-- | nvim/lua/plugins/noice.lua | 2 | ||||
| -rw-r--r-- | nvim/lua/plugins/nvim-cmp.lua | 6 | ||||
| -rw-r--r-- | nvim/lua/plugins/nvim-lspconfig.lua | 70 | ||||
| -rw-r--r-- | nvim/lua/plugins/nvim-treesitter.lua | 3 | ||||
| -rw-r--r-- | nvim/lua/plugins/telescope.lua | 25 | ||||
| -rw-r--r-- | nvim/lua/plugins/todo-comments.lua | 18 | ||||
| -rw-r--r-- | nvim/lua/plugins/trouble.lua | 24 | ||||
| -rw-r--r-- | nvim/lua/plugins/which-key.lua | 25 |
16 files changed, 285 insertions, 106 deletions
diff --git a/ags/config.js b/ags/config.js index 2a5b7e3..bc50aa8 100644 --- a/ags/config.js +++ b/ags/config.js @@ -1,14 +1,41 @@ -const { speaker } = await Service.import("audio") +// @ts-ignore +const battery = await Service.import("battery") -const child = Widget.Slider({ - value: speaker.bind("volume"), - onChange: ({ value }) => speaker.volume = value, +const BatteryPercent = () => Widget.Label() + .hook(battery, self => { + self.label = `${battery.percent}%` + self.visible = battery.available + }, "changed") + +const MyButton = () => Widget.Button() + .on("clicked", self => { + print(self, "is clicked") + }) + +const MyDate = () => Widget.Label({ + css: "color:blue; padding: 1em;", }) + .poll(1000, self => { + self.label = Utils.exec("date +'%_H:%_M:%S'") + }) + +const MyKeybind = () => Widget.Button() + .keybind(["MOD1", "CONTROL"], "a", (_self, _event) => { + print("alt+control+a was pressed") + }) const Bar = () => Widget.Window({ name: 'bar', anchor: ['top', 'left', 'right'], - child: child, + child: MyDate(), +}) + +const scss = `${App.configDir}/style.scss` +const css = "/tmp/my-style.css" +Utils.exec(`sassc ${scss} ${css}`) + +App.config({ + style: css, + windows: [Bar()], }) -App.config({ windows: [Bar()] }) diff --git a/ags/style.scss b/ags/style.scss new file mode 100644 index 0000000..df7b071 --- /dev/null +++ b/ags/style.scss @@ -0,0 +1,5 @@ +$base-color: #c6538c; + +window { + background-color: $base-color; +} diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 240805a..7303e00 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -115,7 +115,7 @@ xwayland { # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more windowrulev2 = tile, title: ^(Godot)$ windowrulev2 = float, class: steam, title: ^(?!(Steam)$).*$ -windowrulev2 = fullscreen, class: tic80 +windowrulev2 = fullscreen, class: oolite # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 88b6a84..0a76756 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -3,27 +3,31 @@ "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "dashboard-nvim": { "branch": "master", "commit": "06f0cad2716f28830bc02850382ed859620dac21" }, + "dashboard-nvim": { "branch": "master", "commit": "19e89f88c83c386d19a0c9b8816638a365ccbfac" }, "indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" }, "lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" }, "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, "lspkind.nvim": { "branch": "master", "commit": "59c3f419af48a2ffb2320cea85e44e5a95f71664" }, - "lspsaga.nvim": { "branch": "main", "commit": "f0b5d2ce3912a9d84fae8083cb9cab90def39f3e" }, + "lspsaga.nvim": { "branch": "main", "commit": "3c1af059348350b0bbb81c5ca3c1f8f573dbd64a" }, + "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, + "mini.icons": { "branch": "main", "commit": "a2742459f0ee32806c2438ca06b4d8b331f3f4d4" }, + "neorg": { "branch": "main", "commit": "81ee90cb2d72ac43bfadb7dd276646f34c8f85be" }, "noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, - "nvim-lspconfig": { "branch": "master", "commit": "ff69ecca55d83ffc70657f260a799f79a5637831" }, + "nvim-lspconfig": { "branch": "master", "commit": "541f3a2781de481bb84883889e4d9f0904250a56" }, + "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-parinfer": { "branch": "master", "commit": "5ca09287ab3f4144f78ff7977fabc27466f71044" }, - "nvim-treesitter": { "branch": "master", "commit": "9b1e607298dd5fc2ee6549488324cc92dafb99c0" }, - "nvim-web-devicons": { "branch": "master", "commit": "56f17def81478e406e3a8ec4aa727558e79786f3" }, - "oil.nvim": { "branch": "master", "commit": "ccab9d5e09e2d0042fbbe5b6bd05e82426247067" }, + "nvim-treesitter": { "branch": "master", "commit": "92725df6222614307c4712eb9982e5287f21aa11" }, + "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, + "oil.nvim": { "branch": "master", "commit": "39dbf875861449cf09e936fa80073f3413e9439c" }, + "pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "telescope.nvim": { "branch": "master", "commit": "df534c3042572fb958586facd02841e10186707c" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "137d06fb103952a0fb567882bb8527e2f92d327d" }, - "trouble.nvim": { "branch": "main", "commit": "254145ffd528b98eb20be894338e2d5c93fa02c2" }, "vim-highlightedyank": { "branch": "master", "commit": "afb0f262b490706c23e94012c2ab9fa67c0481ce" }, "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, "which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }, diff --git a/nvim/lua/config/options.lua b/nvim/lua/config/options.lua index 1629194..d79c664 100644 --- a/nvim/lua/config/options.lua +++ b/nvim/lua/config/options.lua @@ -17,6 +17,7 @@ opt.signcolumn = "yes" opt.cmdheight = 1 opt.scrolloff = 10 opt.completeopt = "menuone,noinsert,noselect" +opt.conceallevel = 3 -- Search opt.incsearch = true diff --git a/nvim/lua/plugins/dashboard-nvim.lua b/nvim/lua/plugins/dashboard-nvim.lua index ea071df..287bf21 100644 --- a/nvim/lua/plugins/dashboard-nvim.lua +++ b/nvim/lua/plugins/dashboard-nvim.lua @@ -189,6 +189,11 @@ Quotes = { "", "Quiet people have the loudest minds.", "~ Stephen Hawking", + }, + { + "", + "An idiot admires complexity, a genius admires simplicity.", + "~ Terry Davis", } } diff --git a/nvim/lua/plugins/lspsaga.lua b/nvim/lua/plugins/lspsaga.lua index e486799..d6faadc 100644 --- a/nvim/lua/plugins/lspsaga.lua +++ b/nvim/lua/plugins/lspsaga.lua @@ -1,24 +1,33 @@ +local config = function() + require("lspsaga").setup({ + ui = { + code_action = "", + }, + outline = { + keys = { + toggle_or_jump = "<Enter>" + } + }, + finder = { + keys = { + toggle_or_open = "<Enter>", + shuttle = "<Tab>", + } + }, + diagnostic = { + diagnostic_only_current = true, + } + }) + vim.diagnostic.config({ + virtual_text = false + }) +end + return { "nvimdev/lspsaga.nvim", lazy = true, event = { "BufReadPost", "BufWritePost", "BufNewFile" }, - config = function() - require("lspsaga").setup({ - -- keybinds for navigation in lspsaga window - move_in_saga = { prev = "<C-k>", next = "<C-j>" }, - -- use enter to open file with finder - finder_action_keys = { - open = "<Enter>" - }, - -- use enter to open file with definition preview - definition_action_keys = { - edit = "<Enter>" - }, - ui = { - code_action = "", - }, - }) - end, + config = config, dependencies = { "nvim-treesitter/nvim-treesitter", -- optional "nvim-tree/nvim-web-devicons", -- optional diff --git a/nvim/lua/plugins/neorg.lua b/nvim/lua/plugins/neorg.lua new file mode 100644 index 0000000..be2f7e2 --- /dev/null +++ b/nvim/lua/plugins/neorg.lua @@ -0,0 +1,105 @@ +local config = function() + -- remap keybinds + vim.keymap.set("v", "<", "<Plug>(neorg.promo.demote.range)", { buffer = true }) + vim.keymap.set("v", ">", "<Plug>(neorg.promo.promote.range)", { buffer = true }) + vim.keymap.set("n", "<Space>ma", "<Plug>(neorg.qol.todo-items.todo.task-ambiguous)", { buffer = true }) + vim.keymap.set("n", "<Space>mc", "<Plug>(neorg.qol.todo-items.todo.task-cancelled)", { buffer = true }) + vim.keymap.set("n", "<Space>md", "<Plug>(neorg.qol.todo-items.todo.task-done)", { buffer = true }) + vim.keymap.set("n", "<Space>mh", "<Plug>(neorg.qol.todo-items.todo.task-on-hold)", { buffer = true }) + vim.keymap.set("n", "<Space>mi", "<Plug>(neorg.qol.todo-items.todo.task-important)", { buffer = true }) + vim.keymap.set("n", "<Space>mp", "<Plug>(neorg.qol.todo-items.todo.task-pending)", { buffer = true }) + vim.keymap.set("n", "<Space>mr", "<Plug>(neorg.qol.todo-items.todo.task-recurring)", { buffer = true }) + vim.keymap.set("n", "<Space>mu", "<Plug>(neorg.qol.todo-items.todo.task-undone)", { buffer = true }) + + require("neorg").setup({ + load = { + ["core.defaults"] = { + config = { + disable = { + "core.esupports.metagen", + "core.journal", + } + } + }, + ["core.completion"] = { + config = { + engine = "nvim-cmp" + } + }, + ["core.journal"] = { + config = { + journal_folder = "neorg/journal/" + } + }, + ["core.esupports.metagen"] = { + config = { + timezone = "implicit-local", + type = "empty" + } + }, + ["core.concealer"] = { + config = { + icons = { + heading = { + icons = { "", "", "", "", "", "" }, + }, + todo = { + cancelled = { icon = "" }, + pending = { icon = "" }, + uncertain = { icon = "" }, + urgent = { icon = "" }, + }, + code_block = { + conceal = true, + width = "content", + padding = { + right = 1, + } + } + } + } + }, + ["core.highlights"] = { + config = { + highlights = { + headings = { + ["1"] = { + prefix = "+RenderMarkdownH1", + title = "+RenderMarkdownH1" + }, + ["2"] = { + prefix = "+RenderMarkdownH2", + title = "+RenderMarkdownH2" + }, + ["3"] = { + prefix = "+RenderMarkdownH3", + title = "+RenderMarkdownH3" + }, + ["4"] = { + prefix = "+RenderMarkdownH4", + title = "+RenderMarkdownH4" + }, + ["5"] = { + prefix = "+RenderMarkdownH5", + title = "+RenderMarkdownH5" + }, + ["6"] = { + prefix = "+RenderMarkdownH6", + title = "+RenderMarkdownH6" + } + } + } + } + } + } + }) +end + +return { + "nvim-neorg/neorg", + lazy = true, + ft = "norg", + cmd = "Neorg", + version = "*", -- Pin Neorg to the latest stable release + config = config, +} diff --git a/nvim/lua/plugins/noice.lua b/nvim/lua/plugins/noice.lua index 7aa127c..aa4d482 100644 --- a/nvim/lua/plugins/noice.lua +++ b/nvim/lua/plugins/noice.lua @@ -14,7 +14,7 @@ local config = function() command_palette = true, -- position the cmdline and popupmenu together long_message_to_split = true, -- long messages will be sent to a split inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = false, -- add a border to hover docs and signature help + lsp_doc_border = true, -- add a border to hover docs and signature help }, }) end diff --git a/nvim/lua/plugins/nvim-cmp.lua b/nvim/lua/plugins/nvim-cmp.lua index d997a2c..800391d 100644 --- a/nvim/lua/plugins/nvim-cmp.lua +++ b/nvim/lua/plugins/nvim-cmp.lua @@ -35,13 +35,15 @@ local config = function() }, sources = cmp.config.sources( { + { name = "lazydev", group_index = 0 } + }, { + { name = "neorg" } + }, { { name = "nvim_lsp" }, }, { { name = "buffer" }, }, { { name = "path" }, - }, { - { name = "lazydev", group_index = 0 } } ) }) diff --git a/nvim/lua/plugins/nvim-lspconfig.lua b/nvim/lua/plugins/nvim-lspconfig.lua index d5729bf..5be314c 100644 --- a/nvim/lua/plugins/nvim-lspconfig.lua +++ b/nvim/lua/plugins/nvim-lspconfig.lua @@ -11,15 +11,28 @@ local config = function() local on_attach = function(client, bufnr) local keymap = vim.keymap - local opts = { noremap = true, silent = true, buffer = bufnr } + local lsp = vim.lsp + local opts = { noremap = true, silent = true, buffer = bufnr, desc = "" } -- setting custom keymaps - keymap.set("n", "<Space>lf", ":Lspsaga finder<Enter>", opts) -- go to definition - keymap.set("n", "<Space>lp", ":Lspsaga peek_definition<Enter>", opts) -- peak definition - keymap.set("n", "<Space>lg", ":Lspsaga goto_definition<Enter>", opts) -- go to definition - keymap.set("n", "<Space>la", ":Lspsaga code_action<Enter>", opts) -- see available code actions - keymap.set("n", "<Space>lr", ":Lspsaga rename<Enter>", opts) -- smart rename - keymap.set("n", "<Space>ld", ":Lspsaga hover_doc<Enter>", opts) -- show documentation for what is under cursor + opts.desc = "Finder" + keymap.set("n", "<Space>lf", ":Lspsaga finder<Enter>", opts) -- go to definition + opts.desc = "Peek Definition (Lspsaga)" + keymap.set("n", "<Space>lp", ":Lspsaga peek_definition<Enter>", opts) -- peak definition + opts.desc = "Goto Definition (Lspsaga)" + keymap.set("n", "<Space>lg", ":Lspsaga goto_definition<Enter>", opts) -- go to definition + opts.desc = "Code Action (Lspsaga)" + keymap.set("n", "<Space>la", ":Lspsaga code_action<Enter>", opts) -- see available code actions + opts.desc = "Rename (Lspsaga)" + keymap.set("n", "<Space>lr", ":Lspsaga rename<Enter>", opts) -- smart rename + opts.desc = "Hover Documentation (Lspsaga)" + keymap.set("n", "<Space>lk", lsp.buf.hover, opts) -- show documentation for what is under cursor + opts.desc = "Outline (Lspsaga)" + keymap.set("n", "<Space>lo", ":Lspsaga outline<Enter>", opts) -- show outline + opts.desc = "Diagnostic (Lspsaga)" + keymap.set("n", "<Space>ld", ":Lspsaga show_workspace_diagnostics<Enter>", opts) -- show diagnostics + + keymap.del("n", "K", { buffer = bufnr }) -- enable auto formatting on save if client.supports_method("textDocument/formatting") then @@ -33,16 +46,16 @@ local config = function() end -- efm server configuration - lspconfig.efm.setup({ - init_options = { - documentFormatting = true, - documentRangeFormatting = true, - hover = true, - documentSymbol = true, - codeAction = true, - completion = true, - }, - }) + -- lspconfig.efm.setup({ + -- init_options = { + -- documentFormatting = true, + -- documentRangeFormatting = true, + -- hover = true, + -- documentSymbol = true, + -- codeAction = true, + -- completion = true, + -- }, + -- }) -- clangd server configuration lspconfig.clangd.setup({ on_attach = on_attach, @@ -63,21 +76,32 @@ local config = function() on_attach = on_attach, capabilities = capabilities, }) - -- lua-language-server + -- lua-language-server configuration lspconfig.lua_ls.setup({ on_attach = on_attach, capabilities = capabilities, }) -- nixd configuration - -- lspconfig.nixd.setup({ - -- on_attach = on_attach, - -- capabilities = capabilities, - -- }) - -- typescript-language-server + lspconfig.nixd.setup({ + on_attach = on_attach, + capabilities = capabilities, + }) + -- typescript-language-server configuration lspconfig.ts_ls.setup({ on_attach = on_attach, capabilities = capabilities, }) + -- cssls-language-server configuration + lspconfig.cssls.setup({ + on_attach = on_attach, + capabilities = capabilities, + }) + -- vacuum configuration + lspconfig.vacuum.setup({ + on_attach = on_attach, + capabilities = capabilities, + filetypes = { "yaml", "json" } + }) end return { diff --git a/nvim/lua/plugins/nvim-treesitter.lua b/nvim/lua/plugins/nvim-treesitter.lua index 800df42..ffb8824 100644 --- a/nvim/lua/plugins/nvim-treesitter.lua +++ b/nvim/lua/plugins/nvim-treesitter.lua @@ -19,7 +19,8 @@ local config = function() "rust", "haskell", "nix", - "javascript" + "javascript", + "norg", }, auto_install = false, highlight = { diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua index da57922..cb17298 100644 --- a/nvim/lua/plugins/telescope.lua +++ b/nvim/lua/plugins/telescope.lua @@ -1,17 +1,18 @@ local init = function() local keymap = vim.keymap - keymap.set("n", "<Space>tk", ":Telescope keymaps<Enter>", - { noremap = true, silent = true, desc = "Keymaps (Telescope)" }) -- Keymaps - keymap.set("n", "<Space>th", ":Telescope help_tags<Enter>", - { noremap = true, silent = true, desc = "Help (Telescope)" }) -- Help - keymap.set("n", "<Space>tf", ":Telescope find_files<Enter>", - { noremap = true, silent = true, desc = "Find files (Telescope)" }) -- Find files - keymap.set("n", "<Space>ta", ":Telescope<Enter>", - { noremap = true, silent = true, desc = "All commands (Telescope)" }) -- All commands - keymap.set("n", "<Space>tg", ":Telescope live_grep<Enter>", - { noremap = true, silent = true, desc = "Find words (Telescope)" }) -- Find words - keymap.set("n", "<Space>tb", ":Telescope buffers<Enter>", - { noremap = true, silent = true, desc = "Buffers (Telescope)" }) -- Buffers + local opts = { noremap = true, silent = true, desc = "" } + opts.desc = "Keymaps (Telescope)" + keymap.set("n", "<Space>tk", ":Telescope keymaps<Enter>", opts) -- Keymaps + opts.desc = "Help (Telescope)" + keymap.set("n", "<Space>th", ":Telescope help_tags<Enter>", opts) -- Help + opts.desc = "Find files (Telescope)" + keymap.set("n", "<Space>tf", ":Telescope find_files<Enter>", opts) -- Find files + opts.desc = "All commands (Telescope)" + keymap.set("n", "<Space>ta", ":Telescope<Enter>", opts) -- All commands + opts.desc = "Find words (Telescope)" + keymap.set("n", "<Space>tg", ":Telescope live_grep<Enter>", opts) -- Find words + opts.desc = "Buffers (Telescope)" + keymap.set("n", "<Space>tb", ":Telescope buffers<Enter>", opts) -- Buffers end local config = function() diff --git a/nvim/lua/plugins/todo-comments.lua b/nvim/lua/plugins/todo-comments.lua index 34da0fe..85e8090 100644 --- a/nvim/lua/plugins/todo-comments.lua +++ b/nvim/lua/plugins/todo-comments.lua @@ -1,9 +1,5 @@ -return { - "folke/todo-comments.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, - lazy = true, - event = { "BufReadPost", "BufWritePost", "BufNewFile" }, - opts = { +local config = function() + require("todo-comments").setup({ keywords = { FIX = { icon = "", color = "error", alt = { "FIXME", "BUG", "FIXIT", "ISSUE" } }, TODO = { icon = "", color = "info" }, @@ -22,7 +18,15 @@ return { hack = "#F5A97F", perf = "#C6A0F6" } - } + }) +end + +return { + "folke/todo-comments.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + lazy = true, + event = { "BufReadPost", "BufWritePost", "BufNewFile" }, + config = config } -- FIX: ciao diff --git a/nvim/lua/plugins/trouble.lua b/nvim/lua/plugins/trouble.lua deleted file mode 100644 index a49d906..0000000 --- a/nvim/lua/plugins/trouble.lua +++ /dev/null @@ -1,24 +0,0 @@ -local init = function() - local keymap = vim.keymap - keymap.set("n", "<Space>rd", ":Trouble diagnostics toggle<Enter>", - { noremap = true, silent = true, desc = "Diagnostics (Trouble)" }) -- Diagnostics - keymap.set("n", "<Space>rt", ":Trouble todo toggle<Enter>", - { noremap = true, silent = true, desc = "Todos (Trouble)" }) -- Todos - keymap.set("n", "<Space>ro", ":Trouble symbols toggle<Enter>", - { noremap = true, silent = true, desc = "Outline (Trouble)" }) -- Outline -end - -local config = function() - require("trouble").setup({ - use_diagnostic_signs = true - }) -end - -return { - "folke/trouble.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - lazy = true, - cmd = "Trouble", - init = init, - config = config -} diff --git a/nvim/lua/plugins/which-key.lua b/nvim/lua/plugins/which-key.lua index 5b1383e..4e391f9 100644 --- a/nvim/lua/plugins/which-key.lua +++ b/nvim/lua/plugins/which-key.lua @@ -1,10 +1,25 @@ +local config = function() + require("which-key").setup() + vim.o.timeout = true + vim.o.timeoutlen = 500 +end + return { "folke/which-key.nvim", lazy = true, event = "VeryLazy", - init = function() - vim.o.timeout = true - vim.o.timeoutlen = 500 - end, - opts = {} + config = config, + keys = { + { + "<leader>?", + function() + require("which-key").show({ global = false }) + end, + desc = "Buffer Local Keymaps (which-key)", + }, + }, + dependencies = { + "echasnovski/mini.icons", + "nvim-tree/nvim-web-devicons", -- optional + }, } |
