summaryrefslogtreecommitdiff
path: root/.config/nvim/config.lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-11-17 22:24:43 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-11-17 22:24:43 +0100
commita3690ed8ca90823787fbaddb72f0a1874f1e999d (patch)
tree1b79521fdf10c133aa643e6b2e46522ab6b79097 /.config/nvim/config.lua
parente953e2ee53503dcf070a7763743e4a76abb4518d (diff)
Add lunarvim update to lsp/general
Diffstat (limited to '.config/nvim/config.lua')
-rw-r--r--.config/nvim/config.lua35
1 files changed, 28 insertions, 7 deletions
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 = { "<cmd>TroubleToggle<cr>", "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"] = { "<cmd>ZenMode<cr>", "Zen" }
+options.builtin.which_key.mappings["r"] = {
+ name = "Replace",
+ r = { "<cmd>lua require('spectre').open()<cr>", "Replace" },
+ w = {
+ "<cmd>lua require('spectre').open_visual({select_word=true})<cr>",
+ "Replace Word",
+ },
+ f = { "<cmd>lua require('spectre').open_file_search()<cr>", "Replace Buffer" },
+}
+
+options.builtin.telescope.on_config_done = function()
+ local actions = require "telescope.actions"
+ options.builtin.telescope.defaults.mappings.i["<C-j>"] = actions.move_selection_next
+ options.builtin.telescope.defaults.mappings.i["<C-k>"] =
+ actions.move_selection_previous
+ options.builtin.telescope.defaults.mappings.i["<C-n>"] = actions.cycle_history_next
+ options.builtin.telescope.defaults.mappings.i["<C-p>"] = 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",