diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/init.lua b/init.lua old mode 100644 new mode 100755 diff --git a/lua/custom/configs/jdtls.lua b/lua/custom/configs/jdtls.lua old mode 100644 new mode 100755 index f81629ee..1048112a --- a/lua/custom/configs/jdtls.lua +++ b/lua/custom/configs/jdtls.lua @@ -15,7 +15,7 @@ local features = { -- change this to `true` if you have `nvim-dap`, -- `java-test` and `java-debug-adapter` installed - debugger = false, + debugger = true, } local function get_jdtls_paths() diff --git a/lua/custom/configs/remaps.lua b/lua/custom/configs/remaps.lua old mode 100644 new mode 100755 index e03e2958..10294675 --- a/lua/custom/configs/remaps.lua +++ b/lua/custom/configs/remaps.lua @@ -1,8 +1,8 @@ -- thanks https://github.com/ThePrimeagen/init.lua/blob/master/lua/theprimeagen/remap.lua -- move hightlighted code -vim.keymap.set("v", "J", ":m '>+1gv=gv") -vim.keymap.set("v", "K", ":m '<-2gv=gv") +vim.keymap.set("v", "C-P", ":m '>+1gv=gv") +vim.keymap.set("v", "C-N", ":m '<-2gv=gv") -- J appends line below to current line but cursor doesn't move vim.keymap.set("n", "J", "mzJ`z") @@ -14,8 +14,9 @@ vim.keymap.set("n", "n", "nzzzv") vim.keymap.set("n", "N", "Nzzzv") -- greatest remap ever --- paste without adding deleted text to buffer +-- paste without adding deleted text to register vim.keymap.set("x", "p", [["_dP]]) +-- delete without adding deleted text to register vim.keymap.set("x", "d", [["_d]]) -- next greatest remap ever : asbjornHaland @@ -37,3 +38,11 @@ vim.keymap.set("n", "j", "lprevzz") vim.keymap.set("n", "s", [[:%s/\<\>//gI]]) -- make script executable vim.keymap.set("n", "+", "!chmod +x %", { silent = true }) + +--trouble.nvim +vim.keymap.set("n", "xx", function() require("trouble").toggle() end) +vim.keymap.set("n", "xw", function() require("trouble").toggle("workspace_diagnostics") end) +vim.keymap.set("n", "xd", function() require("trouble").toggle("document_diagnostics") end) +vim.keymap.set("n", "xq", function() require("trouble").toggle("quickfix") end) +vim.keymap.set("n", "xl", function() require("trouble").toggle("loclist") end) +vim.keymap.set("n", "gR", function() require("trouble").toggle("lsp_references") end) diff --git a/lua/custom/configs/set.lua b/lua/custom/configs/set.lua old mode 100644 new mode 100755 index c6fb7be9..a6fcb75f --- a/lua/custom/configs/set.lua +++ b/lua/custom/configs/set.lua @@ -15,3 +15,6 @@ vim.opt.signcolumn = "yes" vim.opt.isfname:append("@-@") vim.opt.updatetime = 50 + +-- Define a command to write with sudo +vim.cmd("command! -nargs=0 W execute 'w !sudo tee % > /dev/null' | edit!") diff --git a/lua/custom/init.lua b/lua/custom/init.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/autoformat.lua b/lua/custom/plugins/autoformat.lua old mode 100644 new mode 100755 index 614777bd..8764b67b --- a/lua/custom/plugins/autoformat.lua +++ b/lua/custom/plugins/autoformat.lua @@ -35,8 +35,6 @@ return { group = vim.api.nvim_create_augroup('kickstart-lsp-attach-format', { clear = true }), -- This is where we attach the autoformatting for reasonable clients callback = function(args) - -- dont reformat anything - if true then return end local client_id = args.data.client_id local client = vim.lsp.get_client_by_id(client_id) local bufnr = args.buf @@ -48,7 +46,7 @@ return { -- Tsserver usually works poorly. Sorry you work with bad languages -- You can remove this line if you know what you're doing :) - if client.name == 'tsserver' or client.name == 'jsonls' or client.name == 'html' then + if client.name == 'tsserver' or client.name == 'jsonls' or client.name == 'html' or client.name == 'intelephense' then return end diff --git a/lua/custom/plugins/debug.lua b/lua/custom/plugins/debug.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/nvim-tree.lua b/lua/custom/plugins/nvim-tree.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/suda.lua b/lua/custom/plugins/suda.lua new file mode 100755 index 00000000..1ac49bd9 --- /dev/null +++ b/lua/custom/plugins/suda.lua @@ -0,0 +1,5 @@ +return { + { + "lambdalisue/suda.vim" + } +} diff --git a/lua/custom/plugins/themes.lua b/lua/custom/plugins/themes.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/tmux-nvim.lua b/lua/custom/plugins/tmux-nvim.lua old mode 100644 new mode 100755 diff --git a/lua/custom/plugins/trouble.lua b/lua/custom/plugins/trouble.lua new file mode 100644 index 00000000..7e92648b --- /dev/null +++ b/lua/custom/plugins/trouble.lua @@ -0,0 +1,9 @@ +return { + "folke/trouble.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + }, +} diff --git a/lua/custom/plugins/util.lua b/lua/custom/plugins/util.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/init.lua b/lua/custom/statusline/init.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/statusline.lua b/lua/custom/statusline/statusline.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/theme.lua b/lua/custom/statusline/theme.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/themes/catppuccin.lua b/lua/custom/statusline/themes/catppuccin.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/themes/chadracula.lua b/lua/custom/statusline/themes/chadracula.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/themes/github_dark.lua b/lua/custom/statusline/themes/github_dark.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/themes/gruvbox.lua b/lua/custom/statusline/themes/gruvbox.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/themes/melange.lua b/lua/custom/statusline/themes/melange.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/themes/nord.lua b/lua/custom/statusline/themes/nord.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/themes/onedark.lua b/lua/custom/statusline/themes/onedark.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/themes/onenord.lua b/lua/custom/statusline/themes/onenord.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/themes/penumbra_dark.lua b/lua/custom/statusline/themes/penumbra_dark.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/themes/solarized_dark.lua b/lua/custom/statusline/themes/solarized_dark.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/themes/tokyodark.lua b/lua/custom/statusline/themes/tokyodark.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/themes/tokyonight.lua b/lua/custom/statusline/themes/tokyonight.lua old mode 100644 new mode 100755 diff --git a/lua/custom/statusline/themes/tundra.lua b/lua/custom/statusline/themes/tundra.lua old mode 100644 new mode 100755