From a3690ed8ca90823787fbaddb72f0a1874f1e999d Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Wed, 17 Nov 2021 22:24:43 +0100 Subject: Add lunarvim update to lsp/general --- .config/nvim/config.lua | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) (limited to '.config/nvim/config.lua') diff --git a/.config/nvim/config.lua b/.config/nvim/config.lua index ca28fa4..b391cf5 100644 --- a/.config/nvim/config.lua +++ b/.config/nvim/config.lua @@ -20,6 +20,7 @@ options.builtin.telescope.active = true options.builtin.bufferline.active = true options.builtin.lualine.active = true options.builtin.lualine.style = "dark" +options.builtin.project.patterns = { ".git" } -- Whichkey options.builtin.which_key.mappings.l.d = { "TroubleToggle", "Diagnostics" } @@ -58,6 +59,26 @@ options.builtin.treesitter.autotag.enable = false options.builtin.treesitter.playground.enable = false options.builtin.treesitter.indent.disable = { "python" } +options.builtin.which_key.mappings["z"] = { "ZenMode", "Zen" } +options.builtin.which_key.mappings["r"] = { + name = "Replace", + r = { "lua require('spectre').open()", "Replace" }, + w = { + "lua require('spectre').open_visual({select_word=true})", + "Replace Word", + }, + f = { "lua require('spectre').open_file_search()", "Replace Buffer" }, +} + +options.builtin.telescope.on_config_done = function() + local actions = require "telescope.actions" + options.builtin.telescope.defaults.mappings.i[""] = actions.move_selection_next + options.builtin.telescope.defaults.mappings.i[""] = + actions.move_selection_previous + options.builtin.telescope.defaults.mappings.i[""] = actions.cycle_history_next + options.builtin.telescope.defaults.mappings.i[""] = actions.cycle_history_prev +end + -- Extra plugings options.plugins = { @@ -82,13 +103,13 @@ options.plugins = { end, }, - { - "pwntester/octo.nvim", - event = "BufRead", - config = function() - require("extra.octo").config() - end, - }, + -- { + -- "pwntester/octo.nvim", + -- event = "BufRead", + -- config = function() + -- require("extra.octo").config() + -- end, + -- }, { "unblevable/quick-scope", -- cgit v1.2.3-70-g09d2