From 4fb9a7aaf4640c03cc62b862cba6044a660c686c Mon Sep 17 00:00:00 2001 From: Max Richter Date: Wed, 17 Nov 2021 13:57:13 +0100 Subject: [PATCH] some shit --- configs/alacritty/alacritty.yml | 2 +- configs/nvim/init.lua | 2 +- configs/nvim/lua/.pnpm-debug.log | 14 ++++++++++++ configs/nvim/lua/keymappings.lua | 37 +++++++++++++++++++++----------- 4 files changed, 40 insertions(+), 15 deletions(-) create mode 100644 configs/nvim/lua/.pnpm-debug.log diff --git a/configs/alacritty/alacritty.yml b/configs/alacritty/alacritty.yml index d1e0055..8915b12 100644 --- a/configs/alacritty/alacritty.yml +++ b/configs/alacritty/alacritty.yml @@ -429,7 +429,7 @@ colors: #working_directory: None # Send ESC (\x1b) before characters when alt is pressed. -#alt_send_esc: true +alt_send_esc: true #mouse: # Click settings diff --git a/configs/nvim/init.lua b/configs/nvim/init.lua index 35801c1..c5be891 100644 --- a/configs/nvim/init.lua +++ b/configs/nvim/init.lua @@ -15,7 +15,7 @@ if u.has_plugin("cmp") then o.tabstop = 2 o.shiftwidth = 2 -- Indents will have a width of 4 o.softtabstop = 2 -- Sets the number of columns for a TAB - o.expandtab = false -- Dont expand TABs to spaces + o.expandtab = true -- Dont expand TABs to spaces o.autoindent = true o.showmatch = true -- show matching brackets o.swapfile = false diff --git a/configs/nvim/lua/.pnpm-debug.log b/configs/nvim/lua/.pnpm-debug.log new file mode 100644 index 0000000..cdd38b9 --- /dev/null +++ b/configs/nvim/lua/.pnpm-debug.log @@ -0,0 +1,14 @@ +{ + "0 debug pnpm:scope": { + "selected": 1 + }, + "1 error pnpm": { + "code": "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND", + "err": { + "name": "pnpm", + "message": "No package.json (or package.yaml, or package.json5) was found in \"/home/jim/.dotfiles/configs/nvim/lua\".", + "code": "ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND", + "stack": "pnpm: No package.json (or package.yaml, or package.json5) was found in \"/home/jim/.dotfiles/configs/nvim/lua\".\n at readProjectManifest (/home/jim/.asdf/installs/nodejs/16.11.0/pnpm-global/5/node_modules/.pnpm/pnpm@6.17.2/node_modules/pnpm/dist/pnpm.cjs:40641:13)\n at async Object.readProjectManifestOnly (/home/jim/.asdf/installs/nodejs/16.11.0/pnpm-global/5/node_modules/.pnpm/pnpm@6.17.2/node_modules/pnpm/dist/pnpm.cjs:40645:28)\n at async Object.readProjectManifestOnly (/home/jim/.asdf/installs/nodejs/16.11.0/pnpm-global/5/node_modules/.pnpm/pnpm@6.17.2/node_modules/pnpm/dist/pnpm.cjs:40864:24)\n at async Object.handler (/home/jim/.asdf/installs/nodejs/16.11.0/pnpm-global/5/node_modules/.pnpm/pnpm@6.17.2/node_modules/pnpm/dist/pnpm.cjs:129763:24)\n at async /home/jim/.asdf/installs/nodejs/16.11.0/pnpm-global/5/node_modules/.pnpm/pnpm@6.17.2/node_modules/pnpm/dist/pnpm.cjs:133951:20\n at async run (/home/jim/.asdf/installs/nodejs/16.11.0/pnpm-global/5/node_modules/.pnpm/pnpm@6.17.2/node_modules/pnpm/dist/pnpm.cjs:133926:34)\n at async runPnpm (/home/jim/.asdf/installs/nodejs/16.11.0/pnpm-global/5/node_modules/.pnpm/pnpm@6.17.2/node_modules/pnpm/dist/pnpm.cjs:134137:5)\n at async /home/jim/.asdf/installs/nodejs/16.11.0/pnpm-global/5/node_modules/.pnpm/pnpm@6.17.2/node_modules/pnpm/dist/pnpm.cjs:134129:7" + } + } +} \ No newline at end of file diff --git a/configs/nvim/lua/keymappings.lua b/configs/nvim/lua/keymappings.lua index d1c71f7..29fc9b4 100644 --- a/configs/nvim/lua/keymappings.lua +++ b/configs/nvim/lua/keymappings.lua @@ -1,5 +1,6 @@ local map = vim.api.nvim_set_keymap local g = vim.g +local cmd = vim.cmd; local options = {noremap = true} local remap = {noremap = false} @@ -12,21 +13,19 @@ map("n", "", ":Telescope find_files", options) --map("n", "", ":Telescope grep_string", options) map("n", "", ":Telescope live_grep", options) -map("n", "c", ":CodeActionMenu", remap) -- LSP Functionality - map("n", "gD", "lua vim.lsp.buf.declaration()", options) - map("n", "gd", "lua vim.lsp.buf.definition()", options) - map("n", "gr", "lua vim.lsp.buf.references()", options) - map("n", "gi", "lua vim.lsp.buf.implementation()", options) - map("n", "K", "lua vim.lsp.buf.hover()", options) - map("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", options) - map("n", "rn", "lua vim.lsp.buf.rename()", options) - map("n", "", "lua vim.lsp.buf.code_action()", options) - map("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", options) - map("n", "]d", "lua vim.lsp.diagnostic.goto_next()", options) - - +map("n", "gD", "lua vim.lsp.buf.declaration()", options) +map("n", "gd", "lua vim.lsp.buf.definition()", options) +map("n", "gr", "lua vim.lsp.buf.references()", options) +map("n", "gi", "lua vim.lsp.buf.implementation()", options) +map("n", "K", "lua vim.lsp.buf.hover()", options) +map("n", "e", "lua vim.lsp.diagnostic.show_line_diagnostics()", options) +map("n", "rn", "lua vim.lsp.buf.rename()", options) +map("n", "c", "lua vim.lsp.buf.code_action()", options) +map("n", "", "lua vim.lsp.buf.formatting()", options) +map("n", "[d", "lua vim.lsp.diagnostic.goto_prev()", options) +map("n", "]d", "lua vim.lsp.diagnostic.goto_next()", options) -- Navigate Buffers map("n", "", "h", options) @@ -34,6 +33,18 @@ map("n", "", "j", options) map("n", "", "k", options) map("n", "", "l", options) +map("n", "Y", "yy", options) +map("n", "k", "{",options) +map("n", "j", "}",options) + +map("n", "", "move +1", options) +map("n", "", "move -2", options) + +-- Faster git merge +map("n", "gd", ":Gvdiffsplit!", options) +map("n", "gdl", ":diffget //3", options) +map("n", "gdh", ":diffget //2", options) + -- Find file in NvimTree map("n", "f", ":NvimTreeFindFile", options)