This commit is contained in:
chilborne 2023-12-18 09:13:24 +01:00
parent 00d2f2fcf5
commit c699c93497
30 changed files with 31 additions and 7 deletions

0
.gitignore vendored Normal file → Executable file
View File

0
init.lua Normal file → Executable file
View File

2
lua/custom/configs/jdtls.lua Normal file → Executable file
View File

@ -15,7 +15,7 @@ local features = {
-- change this to `true` if you have `nvim-dap`, -- change this to `true` if you have `nvim-dap`,
-- `java-test` and `java-debug-adapter` installed -- `java-test` and `java-debug-adapter` installed
debugger = false, debugger = true,
} }
local function get_jdtls_paths() local function get_jdtls_paths()

15
lua/custom/configs/remaps.lua Normal file → Executable file
View File

@ -1,8 +1,8 @@
-- thanks https://github.com/ThePrimeagen/init.lua/blob/master/lua/theprimeagen/remap.lua -- thanks https://github.com/ThePrimeagen/init.lua/blob/master/lua/theprimeagen/remap.lua
-- move hightlighted code -- move hightlighted code
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv") vim.keymap.set("v", "C-P", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv") vim.keymap.set("v", "C-N", ":m '<-2<CR>gv=gv")
-- J appends line below to current line but cursor doesn't move -- J appends line below to current line but cursor doesn't move
vim.keymap.set("n", "J", "mzJ`z") vim.keymap.set("n", "J", "mzJ`z")
@ -14,8 +14,9 @@ vim.keymap.set("n", "n", "nzzzv")
vim.keymap.set("n", "N", "Nzzzv") vim.keymap.set("n", "N", "Nzzzv")
-- greatest remap ever -- greatest remap ever
-- paste without adding deleted text to buffer -- paste without adding deleted text to register
vim.keymap.set("x", "<leader>p", [["_dP]]) vim.keymap.set("x", "<leader>p", [["_dP]])
-- delete without adding deleted text to register
vim.keymap.set("x", "<leader>d", [["_d]]) vim.keymap.set("x", "<leader>d", [["_d]])
-- next greatest remap ever : asbjornHaland -- next greatest remap ever : asbjornHaland
@ -37,3 +38,11 @@ vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]]) vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
-- make script executable -- make script executable
vim.keymap.set("n", "<leader>+", "<cmd>!chmod +x %<CR>", { silent = true }) vim.keymap.set("n", "<leader>+", "<cmd>!chmod +x %<CR>", { silent = true })
--trouble.nvim
vim.keymap.set("n", "<leader>xx", function() require("trouble").toggle() end)
vim.keymap.set("n", "<leader>xw", function() require("trouble").toggle("workspace_diagnostics") end)
vim.keymap.set("n", "<leader>xd", function() require("trouble").toggle("document_diagnostics") end)
vim.keymap.set("n", "<leader>xq", function() require("trouble").toggle("quickfix") end)
vim.keymap.set("n", "<leader>xl", function() require("trouble").toggle("loclist") end)
vim.keymap.set("n", "gR", function() require("trouble").toggle("lsp_references") end)

3
lua/custom/configs/set.lua Normal file → Executable file
View File

@ -15,3 +15,6 @@ vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@") vim.opt.isfname:append("@-@")
vim.opt.updatetime = 50 vim.opt.updatetime = 50
-- Define a command to write with sudo
vim.cmd("command! -nargs=0 W execute 'w !sudo tee % > /dev/null' | edit!")

0
lua/custom/init.lua Normal file → Executable file
View File

4
lua/custom/plugins/autoformat.lua Normal file → Executable file
View File

@ -35,8 +35,6 @@ return {
group = vim.api.nvim_create_augroup('kickstart-lsp-attach-format', { clear = true }), group = vim.api.nvim_create_augroup('kickstart-lsp-attach-format', { clear = true }),
-- This is where we attach the autoformatting for reasonable clients -- This is where we attach the autoformatting for reasonable clients
callback = function(args) callback = function(args)
-- dont reformat anything
if true then return end
local client_id = args.data.client_id local client_id = args.data.client_id
local client = vim.lsp.get_client_by_id(client_id) local client = vim.lsp.get_client_by_id(client_id)
local bufnr = args.buf local bufnr = args.buf
@ -48,7 +46,7 @@ return {
-- Tsserver usually works poorly. Sorry you work with bad languages -- Tsserver usually works poorly. Sorry you work with bad languages
-- You can remove this line if you know what you're doing :) -- 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 return
end end

0
lua/custom/plugins/debug.lua Normal file → Executable file
View File

0
lua/custom/plugins/nvim-tree.lua Normal file → Executable file
View File

5
lua/custom/plugins/suda.lua Executable file
View File

@ -0,0 +1,5 @@
return {
{
"lambdalisue/suda.vim"
}
}

0
lua/custom/plugins/themes.lua Normal file → Executable file
View File

0
lua/custom/plugins/tmux-nvim.lua Normal file → Executable file
View File

View File

@ -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
},
}

0
lua/custom/plugins/util.lua Normal file → Executable file
View File

0
lua/custom/statusline/init.lua Normal file → Executable file
View File

0
lua/custom/statusline/statusline.lua Normal file → Executable file
View File

0
lua/custom/statusline/theme.lua Normal file → Executable file
View File

0
lua/custom/statusline/themes/catppuccin.lua Normal file → Executable file
View File

0
lua/custom/statusline/themes/chadracula.lua Normal file → Executable file
View File

0
lua/custom/statusline/themes/github_dark.lua Normal file → Executable file
View File

0
lua/custom/statusline/themes/gruvbox.lua Normal file → Executable file
View File

0
lua/custom/statusline/themes/melange.lua Normal file → Executable file
View File

0
lua/custom/statusline/themes/nord.lua Normal file → Executable file
View File

0
lua/custom/statusline/themes/onedark.lua Normal file → Executable file
View File

0
lua/custom/statusline/themes/onenord.lua Normal file → Executable file
View File

0
lua/custom/statusline/themes/penumbra_dark.lua Normal file → Executable file
View File

0
lua/custom/statusline/themes/solarized_dark.lua Normal file → Executable file
View File

0
lua/custom/statusline/themes/tokyodark.lua Normal file → Executable file
View File

0
lua/custom/statusline/themes/tokyonight.lua Normal file → Executable file
View File

0
lua/custom/statusline/themes/tundra.lua Normal file → Executable file
View File