Skip to content

Commit

Permalink
chore: remove unnecessary things
Browse files Browse the repository at this point in the history
- Beautify fzf search in .zshrc
  • Loading branch information
HynDuf committed Sep 14, 2022
1 parent a51bae6 commit b5d400d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 32 deletions.
25 changes: 4 additions & 21 deletions .config/nvim/ftplugin/java.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
-- load nvim-jdtls
if not vim.g.loaded_jdtls then
vim.g.loaded_jdtls = true
require("packer").loader "nvim-jdtls"
Expand All @@ -8,7 +9,6 @@ local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":p:h:t")
local workspace_dir = "/home/hynduf/.cache/nvim-jdtls/workspace/" .. project_name
local extendedClientCapabilities = jdtls.extendedClientCapabilities
extendedClientCapabilities.resolveAdditionalTextEditsSupport = true
-- See `:help vim.lsp.start_client` for an overview of the supported `config` options.
local config = {
-- The command that starts the language server
-- See: https://github.com/eclipse/eclipse.jdt.ls#running-from-the-command-line
Expand All @@ -31,17 +31,10 @@ local config = {

"-jar",
"/home/hynduf/.local/share/nvim/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar",
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^
-- Must point to the Change this to
-- eclipse.jdt.ls installation the actual version

"-configuration",
"/home/hynduf/.local/share/nvim/mason/packages/jdtls/config_linux",
-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^
-- Must point to the Change to one of `linux`, `win` or `mac`
-- eclipse.jdt.ls installation Depending on your system.

-- See `data directory configuration` section in the README
"-data",
workspace_dir,
},
Expand Down Expand Up @@ -71,21 +64,11 @@ local config = {
end

-- Mappings
-- Load mappings of lspconfig
require("core.utils").load_mappings("lspconfig", { buffer = bufnr })
local opts = { noremap = true, silent = true }
-- buf_set_keymap("n", "gD", "<Cmd>lua vim.lsp.buf.declaration()<CR>", opts)
-- buf_set_keymap("n", "gd", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
-- buf_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
-- buf_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
-- buf_set_keymap("n", "<leader>ra", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
-- buf_set_keymap("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
-- buf_set_keymap("n", "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts)
-- buf_set_keymap("n", "[d", "<cmd>lua vim.diagnostic.goto_prev()<CR>", opts)
-- buf_set_keymap("n", "]d", "<cmd>lua vim.diagnostic.goto_next()<CR>", opts)
-- buf_set_keymap("n", "<leader>q", "<cmd>lua vim.diagnostic.setloclist()<CR>", opts)
-- buf_set_keymap("n", "<leader>ff", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)

-- Java specific
-- nvim-jdtls specific
local opts = { noremap = true, silent = true }
buf_set_keymap("n", "<leader>di", "<Cmd>lua require'jdtls'.organize_imports()<CR>", opts)
buf_set_keymap("n", "<leader>dt", "<Cmd>lua require'jdtls'.test_class()<CR>", opts)
buf_set_keymap("n", "<leader>dn", "<Cmd>lua require'jdtls'.test_nearest_method()<CR>", opts)
Expand Down
2 changes: 1 addition & 1 deletion .config/nvim/lua/custom/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ vim.keymap.set("x", "p", function()
end, { remap = false, expr = true })

vim.opt.clipboard = "unnamedplus"
vim.opt.tabstop = 4
vim.opt.clipboard = 4
vim.opt.shiftwidth = 4

12 changes: 2 additions & 10 deletions .config/nvim/lua/custom/mappings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ M.disabled = {
n = {
["<leader>fm"] = "",
["ZZ"] = "",
["<A-j>"] = "",
["<A-k>"] = "",
},
i = {
["<A-j>"] = "",
["<A-k>"] = "",
},
}

Expand Down Expand Up @@ -86,14 +80,12 @@ M.general = {
end,
"lsp formatting",
},

["."] = { "<Plug>Lightspeed_;_ft", "Repeat lightspeed" },
},

v = {
-- move selected lines up/down
["<C-j>"] = { ":m '>+1<CR>gv=gv", " vmove lines down" },
["<C-k>"] = { ":m '<-2<CR>gv=gv", " vmove lines up" },
["<A-j>"] = { ":m '>+1<CR>gv=gv", " vmove lines down" },
["<A-k>"] = { ":m '<-2<CR>gv=gv", " vmove lines up" },
},
}

Expand Down
6 changes: 6 additions & 0 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
export FZF_DEFAULT_COMMAND="find \! \( -path '*/.git' -prune \) -printf '%P\n'"
export FZF_DEFAULT_OPTS='
--color fg:#a9b1d6,bg:#11111b
--color bg+:#2f263d,fg+:#a9b1d6,hl:#7aa2f7,hl+:#ff9e64,gutter:#3a404c
--color pointer:#373d49,prompt:#ff7a93,info:#606672,spinner:#9ece6a
--height 15'
export FZF_CTRL_T_COMMAND="find \! \( -path '*/.git' -prune \) -printf '%P\n'"
export FZF_ALT_C_COMMAND='find . -type d'

ZSH_THEME="pacman"

plugins=(git
fzf-tab
archlinux
zsh-syntax-highlighting
colorize
Expand Down

0 comments on commit b5d400d

Please sign in to comment.