From d810f83140724775b355f5301de8db3371ea6668 Mon Sep 17 00:00:00 2001 From: kkard2 Date: Tue, 2 Apr 2024 11:27:43 +0200 Subject: stream cleanup --- idea/.ideavimrc | 10 +++------- nvim/init.lua | 30 +++++++++++++++++++++++++++--- 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/idea/.ideavimrc b/idea/.ideavimrc index 3e2506b..e01d24b 100644 --- a/idea/.ideavimrc +++ b/idea/.ideavimrc @@ -28,11 +28,7 @@ set ideajoin nnoremap xif\ -" i want to try this -nnoremap ; : -nnoremap : ; -vnoremap ; : -vnoremap : ; +nmap w :w " Focus sth (e.g. Focus Search) nmap f; (ActivateTerminalToolWindow) @@ -47,8 +43,8 @@ nmap fx (HideAllWindows) " lsp ig? nmap lr (RenameElement) nmap lf (ReformatCode) -nmap (GotoNextError) -nmap (GotoPreviousError) +nmap ]d (GotoNextError) +nmap [d (GotoPreviousError) nmap gh (ShowErrorDescription) " system clipboard diff --git a/nvim/init.lua b/nvim/init.lua index bf19c2d..389e6cd 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -12,8 +12,28 @@ vim.opt.expandtab = true vim.opt.smartindent = true vim.opt.wrap = false +vim.opt.swapfile = false +vim.opt.backup = false +vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" +vim.opt.undofile = true + +vim.opt.hlsearch = true +vim.opt.incsearch = true + +vim.opt.scrolloff = 2 + +vim.opt.colorcolumn = "80,100,120" + +vim.g.netrw_bufsettings = "noma nomod nu nobl nowrap ro" +vim.g.netrw_banner = 0 + +vim.opt.signcolumn = "yes" +vim.opt.list = true + vim.o.exrc = true +vim.keymap.set("n", "w", vim.cmd.write) + vim.keymap.set("n", "ff", vim.cmd.Ex) vim.keymap.set({ "n", "v" }, "y", [["+y]]) @@ -52,7 +72,6 @@ end) vim.keymap.set("n", "tt", function() -- idk it works - ---@diagnostic disable-next-line: undefined-field if vim.opt.expandtab:get() then vim.opt.expandtab = false else @@ -176,7 +195,12 @@ require("lazy").setup({ map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition") map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences") map("gi", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation") - map("gt", require('telescope.builtin').lsp_type_definitions, "Type [D]efinition") + map("gt", require("telescope.builtin").lsp_type_definitions, "Type [D]efinition") + map("gh", vim.diagnostic.open_float, "[G]oto [H]ighlight Error (idk)") + + map("[d", vim.diagnostic.goto_next, "Next [D]iagnostic") + map("]d", vim.diagnostic.goto_prev, "Prev [D]iagnostic") + map("lr", vim.lsp.buf.rename, "[L]SP [R]ename") map("", vim.lsp.buf.code_action, "Code Action") map("K", vim.lsp.buf.hover, "Hover Documentation") @@ -238,7 +262,7 @@ require("lazy").setup({ dependencies = { "nvim-lua/plenary.nvim" }, config = function() local harpoon = require("harpoon") - harpoon:setup() + harpoon:setup({}) vim.keymap.set("n", "a", function() harpoon:list():append() end) vim.keymap.set("n", "s", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end) -- cgit v1.3.1