Compare commits
4 Commits
14eba6a324
...
0b3ea993ee
Author | SHA1 | Date | |
---|---|---|---|
0b3ea993ee | |||
d0d5307bb2 | |||
d2301f54fc | |||
315bbb3e65 |
@ -1,80 +1,88 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "105b5f7f72c13e682a3aa5d29eac2408ae513b22" },
|
||||
"LuaSnip": { "branch": "master", "commit": "c7984d1cca3d8615e4daefc196597872a0b8d590" },
|
||||
"aerial.nvim": { "branch": "master", "commit": "fb1f08c9f90e8b0c04b2f2c5d95d06288a14c5b2" },
|
||||
"ai.nvim": { "branch": "main", "commit": "d7391d4782b90ad3501f6f716f2b308092981787" },
|
||||
"asyncrun.vim": { "branch": "master", "commit": "7191d0c30dd105e5d7f897b9a6ee19cabe734466" },
|
||||
"auto-session": { "branch": "main", "commit": "21033c6815f249a7839c3a85fc8a6b44d74925c9" },
|
||||
"auto-session": { "branch": "main", "commit": "7afbb149f87be279778689596c781882014f7eef" },
|
||||
"calendar-vim": { "branch": "master", "commit": "a7e73e02c92566bf427b2a1d6a61a8f23542cc21" },
|
||||
"catppuccin": { "branch": "main", "commit": "3ffd2f511f3dc6c01258923d7170ccaf1445634b" },
|
||||
"catppuccin": { "branch": "main", "commit": "a84ee1848bfac4601771805396552bdbaa0a0e91" },
|
||||
"ciderlsp-nvim": { "branch": "main", "commit": "45ee3634c6d4224c6981825da5bde39804addc71" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-calc": { "branch": "main", "commit": "50792f34a628ea6eb31d2c90e8df174671e4e7a0" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
||||
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
|
||||
"cmp-nvim-ciderlsp": { "branch": "main", "commit": "e1b0015a0c090e20d1cbb34e5639e6dd145d3f3e" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||
"cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f0f53f704c08ea501f9d222b23491b0d354644b0" },
|
||||
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
|
||||
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" },
|
||||
"cmp-tabnine": { "branch": "main", "commit": "b93f82ef5150e578677fc2e2b4b328b19eed77e1" },
|
||||
"cmp-treesitter": { "branch": "master", "commit": "389eadd48c27aa6dc0e6b992644704f026802a2e" },
|
||||
"cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||
"conflict-marker.vim": { "branch": "master", "commit": "11a4d42244755505b66b15cd4496a150432eb5e3" },
|
||||
"crates.nvim": { "branch": "main", "commit": "1dffccc0a95f656ebe00cacb4de282473430c5a1" },
|
||||
"formatter.nvim": { "branch": "master", "commit": "fa4f2729cc2909db599169f22d8e55632d4c8d59" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6153166d5a3dcc7e2809ea4f17f9edb34d026026" },
|
||||
"fzf": { "branch": "master", "commit": "547e101f1d6bf326d286bac0fb3272738a92a67f" },
|
||||
"fzf.vim": { "branch": "master", "commit": "1dcdb21db618055134cd611f4f5918f6d00a5df0" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "ea84a710262cb2c286d439070bad37d36fd3db25" },
|
||||
"fzf": { "branch": "master", "commit": "3c09c77269d848f5e7dd8f350a90e8d7ed760845" },
|
||||
"fzf.vim": { "branch": "master", "commit": "e0d131d95364edf940a70127fcb5748b86e6955e" },
|
||||
"git-conflict.nvim": { "branch": "main", "commit": "8d962d83cae924a314965f738ed1e05a4000d682" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "48c3ae8ec74cb83f9570ceb0c5ab8217db7a2220" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "adcf2c7f2f495f5df148683764bf7cba6a70f34c" },
|
||||
"go.nvim": { "branch": "master", "commit": "6550ddf5ce491d17af009c397aceb25310566eaa" },
|
||||
"guihua.lua": { "branch": "master", "commit": "ab8b1f09603cc268770efd057115035dc6cfa83d" },
|
||||
"hg": { "branch": "main", "commit": "1c4bdf80174ec840ba76c4dc7032c4313db62199" },
|
||||
"java-syntax.vim": { "branch": "master", "commit": "9a3d76a8c6cd7765ba93a7bdd9280594167e3f1b" },
|
||||
"kotlin-vim": { "branch": "master", "commit": "53fe045906df8eeb07cb77b078fc93acda6c90b8" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "14d76aac4bd3ff07c1fca074c210f28f766a931e" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "25beed5e2e935ebc00d7e3eed1dc502df3c40e39" },
|
||||
"libp.nvim": { "branch": "main", "commit": "636b1748e92f66022c1763f32b2ded6b8606eda5" },
|
||||
"lsp-lens.nvim": { "branch": "main", "commit": "450736ecde76e4e127a7724ec8f6e260870863f8" },
|
||||
"lsp-lens.nvim": { "branch": "main", "commit": "13d25ad8bd55aa34cc0aa3082e78a4157c401346" },
|
||||
"lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" },
|
||||
"lsp-zero.nvim": { "branch": "v2.x", "commit": "0b4c5966884e80c5100c04790defe1fd72d918aa" },
|
||||
"lsp-zero.nvim": { "branch": "v2.x", "commit": "3638944692d07497f4ae313ba7b68718969ccb27" },
|
||||
"lsp_lines.nvim": { "branch": "main", "commit": "f53af96d4789eef39a082dbcce078d2bfc384ece" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" },
|
||||
"luasnip-google.nvim": { "branch": "main", "commit": "5fd7feb144de0ecea837618c9c9e1bbecc0e3243" },
|
||||
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "796008869e67ef27a5aa5ac44c08ce2a60b89f55" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "828a538ac8419f586c010996aefa5df6eb7c250b" },
|
||||
"mason.nvim": { "branch": "main", "commit": "5ad3e113b0c3fde3caba8630599373046f6197e8" },
|
||||
"mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
|
||||
"neo-tree.nvim": { "branch": "v2.x", "commit": "7f6fa04dbd8e8c79d1af33bc90e856b65d8641da" },
|
||||
"neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" },
|
||||
"nerdcommenter": { "branch": "master", "commit": "ab2ae4d502a26bc591db78a8548823ddd04bbc9c" },
|
||||
"nui.nvim": { "branch": "main", "commit": "d146966a423e60699b084eeb28489fe3b6427599" },
|
||||
"null-ls.nvim": { "branch": "main", "commit": "db09b6c691def0038c456551e4e2772186449f35" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" },
|
||||
"nvim-lightbulb": { "branch": "master", "commit": "6166029a136afd56cf23384fc31e8ba203a6e102" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "f88fc62d9770e70faab132ddfed680e49fb012f3" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "447443a2404adc323ad2efc7c0a346a904ce694c" },
|
||||
"nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" },
|
||||
"nvim-osc52": { "branch": "main", "commit": "3e96035d62290183fe7a11418db2b254fcfcaee3" },
|
||||
"nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "575f5a4b1fcb60c1ac4f560c46a5171454d674ca" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "9ab9b0b894b2388a9dbcdee5f00ce72e25d85bf9" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "bda256fab0eb66a15e8190937e417e6a14ee5d72" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "56b747d1be0aa5cecddf85e6f3ca2aed6797edef" },
|
||||
"nvim-surround": { "branch": "main", "commit": "211eaad7c6d01ef4ac02cba9052b3082ec232101" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "9fa6806b88905d52b5ca36094909630919b432cc" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" },
|
||||
"nvim_figtree": { "branch": "main", "commit": "9bc3025f46e34732382da1019e256a9d8bec1e55" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
|
||||
"refactoring.nvim": { "branch": "master", "commit": "7894b10078a1a70c9b26028f4373bf209968e9bc" },
|
||||
"registers.nvim": { "branch": "main", "commit": "2ab8372bb837f05fae6b43091f10a0b725d113ca" },
|
||||
"rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" },
|
||||
"telekasten.nvim": { "branch": "main", "commit": "4a5e57eee9c5154ed77423bb7fa6619fdb0784cd" },
|
||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "e03ff55962417b69c85ef41424079bb0580546ba" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "276362a8020c6e94c7a76d49aa00d4923b0c02f3" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "d99e2abd10808ef91738ce98a5c767e6a51df449" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "47c755d737702df7a39b640c8d9c473a728be1df" },
|
||||
"telescope_citc": { "branch": "main", "commit": "d6421d5bfe058915ece0daec55e488f8ea05f207" },
|
||||
"telescope_codesearch": { "branch": "main", "commit": "a26077ad3c68cf897ae1c31da903d6516ebb9c92" },
|
||||
"telescope_fig": { "branch": "main", "commit": "90150e1aa368b49a5125689b3a6da573a99e2bda" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "20d1b30d6925213abece21d35858a16e11d1e9fc" },
|
||||
"undotree": { "branch": "master", "commit": "0e11ba7325efbbb3f3bebe06213afa3e7ec75131" },
|
||||
"vcscommand.vim": { "branch": "master", "commit": "2fb32681361f37533455d20aaa7fc6eb11b0fa4b" },
|
||||
"vim-bazel": { "branch": "master", "commit": "31b0d5e4f51da1aeb56d65bf505a744e6de405de" },
|
||||
"vim-better-whitespace": { "branch": "master", "commit": "1b22dc57a2751c7afbc6025a7da39b7c22db635d" },
|
||||
"vim-dirdiff": { "branch": "master", "commit": "84bc8999fde4b3c2d8b228b560278ab30c7ea4c9" },
|
||||
"vim-imp": { "branch": "main", "commit": "394e926ce62010443731f3923031e5afa1279f3e" },
|
||||
"vim-indent-guides": { "branch": "master", "commit": "a1e1390c0136e63e813d051de2003bf0ee18ae30" },
|
||||
"vim-maktaba": { "branch": "master", "commit": "fe95bb10f6bb250943a44632107f6a3d76ce5f28" },
|
||||
"vim-matchup": { "branch": "master", "commit": "17cc05867cb3314761e4baa20115a27120f8e82c" },
|
||||
"vim-ripgrep": { "branch": "master", "commit": "2bb2425387b449a0cd65a54ceb85e123d7a320b8" },
|
||||
"vim-searchindex": { "branch": "master", "commit": "b0788c8213210b3bd23b62847dd5a9ebbe4ad648" },
|
||||
"vim-signify": { "branch": "master", "commit": "7d538b77a5a8806e344b057f8846f6d0c035efa9" },
|
||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||
"vim-tmux": { "branch": "master", "commit": "cfe76281efc29890548cf9eedd42ad51c7a1faf0" },
|
||||
"vim-tmux-focus-events": { "branch": "master", "commit": "b1330e04ffb95ede8e02b2f7df1f238190c67056" },
|
||||
"vim-tmux-navigator": { "branch": "master", "commit": "cdd66d6a37d991bba7997d593586fc51a5b37aa8" },
|
||||
@ -82,5 +90,5 @@
|
||||
"vim-tmux-yank": { "branch": "master", "commit": "8432fd440f61ddead070093be06b3dd6b0b5790e" },
|
||||
"vim-windowswap": { "branch": "master", "commit": "15db3f697aa1fa696d99fcdc920c90cd2cec855e" },
|
||||
"vimux": { "branch": "master", "commit": "616fcb4799674a7a809b14ca2dc155bb6ba25788" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "d871f2b664afd5aed3dc1d1573bef2fb24ce0484" }
|
||||
"which-key.nvim": { "branch": "main", "commit": "38b990f6eabf62014018b4aae70a97d7a6c2eb88" }
|
||||
}
|
@ -11,20 +11,21 @@ windows:
|
||||
- other:
|
||||
- hgd gmscore
|
||||
|
||||
- experimental:
|
||||
- experiments:
|
||||
layout: main-horizontal
|
||||
panes:
|
||||
- main:
|
||||
- hgd experimental
|
||||
- hgd experiments
|
||||
- vim
|
||||
- other:
|
||||
- hgd experimental
|
||||
- hgd experiments
|
||||
|
||||
- notes:
|
||||
panes:
|
||||
- main:
|
||||
- cd ~/zettelkasten
|
||||
- vim ~/zettelkasten/Todo.md
|
||||
|
||||
- dotfiles:
|
||||
layout: main-horizontal
|
||||
panes:
|
||||
|
@ -1,71 +0,0 @@
|
||||
vim.g.catppuccin_flavour = "macchiato" -- latte, frappe, macchiato, mocha
|
||||
local colors = require("catppuccin.palettes").get_palette()
|
||||
|
||||
require("catppuccin").setup({
|
||||
flavour = "macchiato",
|
||||
integrations = {
|
||||
cmp = true,
|
||||
-- coc_nvim = false,
|
||||
dashboard = true,
|
||||
-- fern = false,
|
||||
fidget = true,
|
||||
gitgutter = true,
|
||||
gitsigns = true,
|
||||
-- hop = false,
|
||||
-- illuminate = false,
|
||||
-- leap = false,
|
||||
-- lightspeed = false,
|
||||
-- lsp_saga = false,
|
||||
lsp_trouble = true,
|
||||
mason = true,
|
||||
markdown = true,
|
||||
-- neogit = false,
|
||||
-- neotest = false,
|
||||
neotree = true,
|
||||
notify = true,
|
||||
-- nvimtree = true,
|
||||
-- overseer = false,
|
||||
-- pounce = false,
|
||||
symbols_outline = true,
|
||||
telescope = true,
|
||||
treesitter = true,
|
||||
treesitter_context = false,
|
||||
-- ts_rainbow = false,
|
||||
-- vim_sneak = false,
|
||||
-- vimwiki = false,
|
||||
which_key = true,
|
||||
|
||||
-- Special integrations, see https://github.com/catppuccin/nvim#special-integrations
|
||||
dap = {
|
||||
enabled = false,
|
||||
enable_ui = false,
|
||||
},
|
||||
indent_blankline = {
|
||||
enabled = true,
|
||||
colored_indent_levels = false,
|
||||
},
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
virtual_text = {
|
||||
errors = { "italic" },
|
||||
hints = { "italic" },
|
||||
warnings = { "italic" },
|
||||
information = { "italic" },
|
||||
},
|
||||
underlines = {
|
||||
errors = { "underline" },
|
||||
hints = { "underline" },
|
||||
warnings = { "underline" },
|
||||
information = { "underline" },
|
||||
},
|
||||
},
|
||||
},
|
||||
custom_highlights = {
|
||||
Identifier = { fg = colors.lavender },
|
||||
Statement = { fg = colors.rosewater },
|
||||
-- Identifier = { fg = colors.sapphire },
|
||||
Function = { fg = colors.mauve },
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_command("colorscheme catppuccin")
|
@ -1,206 +0,0 @@
|
||||
local map = require("utils").map
|
||||
|
||||
map("n", "<leader>db", ":lua require'dap'.toggle_breakpoint()<CR>")
|
||||
map("n", "<leader>dsi", ":lua require'dap'.step_into()<CR>")
|
||||
map("n", "<leader>dso", ":lua require'dap'.step_over()<CR>")
|
||||
map("n", "<leader>di", ":lua require'dap'.repl.open()<CR>")
|
||||
|
||||
local on_attach = function(client, bufnr)
|
||||
require("jdtls.setup").add_commands()
|
||||
require("jdtls").setup_dap()
|
||||
require("lsp-status").register_progress()
|
||||
-- require'lspkind'.init()
|
||||
-- require'lspsaga'.init_lsp_saga()
|
||||
|
||||
-- Kommentary
|
||||
vim.api.nvim_set_keymap("n", "<leader>/", "<plug>kommentary_line_default", {})
|
||||
vim.api.nvim_set_keymap("v", "<leader>/", "<plug>kommentary_visual_default", {})
|
||||
|
||||
vim.api.nvim_exec(
|
||||
[[
|
||||
augroup FormatAutogroup
|
||||
autocmd!
|
||||
autocmd BufWritePost *.java FormatWrite
|
||||
augroup end
|
||||
]],
|
||||
true
|
||||
)
|
||||
|
||||
local function buf_set_keymap(...)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, ...)
|
||||
end
|
||||
local function buf_set_option(...)
|
||||
vim.api.nvim_buf_set_option(bufnr, ...)
|
||||
end
|
||||
|
||||
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
|
||||
|
||||
-- Mappings.
|
||||
local opts = { noremap = true, silent = true }
|
||||
-- buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||
-- buf_set_keymap('n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||
-- buf_set_keymap('n', '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
||||
-- buf_set_keymap('n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||
-- buf_set_keymap('n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
-- buf_set_keymap('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
-- buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references() && vim.cmd("copen")<CR>', opts)
|
||||
-- buf_set_keymap('n', '<leader>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||
-- buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||
-- buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
-- buf_set_keymap('n', '<leader>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
-- Java specific
|
||||
-- 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)
|
||||
buf_set_keymap("v", "<leader>de", "<Esc><Cmd>lua require('jdtls').extract_variable(true)<CR>", opts)
|
||||
buf_set_keymap("n", "<leader>de", "<Cmd>lua require('jdtls').extract_variable()<CR>", opts)
|
||||
buf_set_keymap("v", "<leader>dm", "<Esc><Cmd>lua require('jdtls').extract_method(true)<CR>", opts)
|
||||
|
||||
vim.api.nvim_exec(
|
||||
[[
|
||||
hi LspReferenceRead cterm=bold ctermbg=red guibg=LightYellow
|
||||
hi LspReferenceText cterm=bold ctermbg=red guibg=LightYellow
|
||||
hi LspReferenceWrite cterm=bold ctermbg=red guibg=LightYellow
|
||||
augroup lsp_document_highlight
|
||||
autocmd!
|
||||
autocmd CursorHold <buffer> lua vim.lsp.buf.document_highlight()
|
||||
autocmd CursorMoved <buffer> lua vim.lsp.buf.clear_references()
|
||||
augroup END
|
||||
]],
|
||||
false
|
||||
)
|
||||
end
|
||||
|
||||
local root_markers = { "gradlew", "pom.xml", "BUILD" }
|
||||
local root_dir = require("jdtls.setup").find_root(root_markers)
|
||||
local home = os.getenv("HOME")
|
||||
|
||||
local capabilities = {
|
||||
workspace = {
|
||||
configuration = true,
|
||||
},
|
||||
textDocument = {
|
||||
completion = {
|
||||
completionItem = {
|
||||
snippetSupport = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
local workspace_folder = home .. "/.workspace" .. vim.fn.fnamemodify(root_dir, ":p:h:t")
|
||||
local config = {
|
||||
flags = {
|
||||
allow_incremental_sync = true,
|
||||
},
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
}
|
||||
|
||||
config.settings = {
|
||||
["java.format.settings.url"] = home .. "/.config/nvim/language-servers/java-google-formatter.xml",
|
||||
["java.format.settings.profile"] = "GoogleStyle",
|
||||
java = {
|
||||
signatureHelp = { enabled = true },
|
||||
contentProvider = { preferred = "fernflower" },
|
||||
completion = {
|
||||
favoriteStaticMembers = {
|
||||
"org.hamcrest.MatcherAssert.assertThat",
|
||||
"org.hamcrest.Matchers.*",
|
||||
"org.hamcrest.CoreMatchers.*",
|
||||
"org.junit.jupiter.api.Assertions.*",
|
||||
"java.util.Objects.requireNonNull",
|
||||
"java.util.Objects.requireNonNullElse",
|
||||
"org.mockito.Mockito.*",
|
||||
},
|
||||
},
|
||||
sources = {
|
||||
organizeImports = {
|
||||
starThreshold = 9999,
|
||||
staticStarThreshold = 9999,
|
||||
},
|
||||
},
|
||||
codeGeneration = {
|
||||
toString = {
|
||||
template = "${object.className}{${member.name()}=${member.value}, ${otherMembers}}",
|
||||
},
|
||||
},
|
||||
configuration = {
|
||||
runtimes = {
|
||||
{
|
||||
name = "JavaSE-11",
|
||||
path = home .. "/.sdkman/candidates/java/11.0.10-open/",
|
||||
},
|
||||
{
|
||||
name = "JavaSE-14",
|
||||
path = home .. "/.sdkman/candidates/java/14.0.2-open/",
|
||||
},
|
||||
{
|
||||
name = "JavaSE-15",
|
||||
path = home .. "/.sdkman/candidates/java/15.0.1-open/",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
config.cmd = { "javalsp", workspace_folder }
|
||||
config.on_attach = on_attach
|
||||
config.on_init = function(client, _)
|
||||
client.notify("workspace/didChangeConfiguration", { settings = config.settings })
|
||||
end
|
||||
|
||||
local extendedClientCapabilities = require("jdtls").extendedClientCapabilities
|
||||
extendedClientCapabilities.resolveAdditionalTextEditsSupport = true
|
||||
config.init_options = {
|
||||
-- bundles = bundles;
|
||||
extendedClientCapabilities = extendedClientCapabilities,
|
||||
}
|
||||
|
||||
-- UI
|
||||
local finders = require("telescope.finders")
|
||||
local sorters = require("telescope.sorters")
|
||||
local actions = require("telescope.actions")
|
||||
local pickers = require("telescope.pickers")
|
||||
require("jdtls.ui").pick_one_async = function(items, prompt, label_fn, cb)
|
||||
local opts = {}
|
||||
pickers
|
||||
.new(opts, {
|
||||
prompt_title = prompt,
|
||||
finder = finders.new_table({
|
||||
results = items,
|
||||
entry_maker = function(entry)
|
||||
return {
|
||||
value = entry,
|
||||
display = label_fn(entry),
|
||||
ordinal = label_fn(entry),
|
||||
}
|
||||
end,
|
||||
}),
|
||||
sorter = sorters.get_generic_fuzzy_sorter(),
|
||||
attach_mappings = function(prompt_bufnr)
|
||||
actions.goto_file_selection_edit:replace(function()
|
||||
local selection = actions.get_selected_entry(prompt_bufnr)
|
||||
actions.close(prompt_bufnr)
|
||||
|
||||
cb(selection.value)
|
||||
end)
|
||||
|
||||
return true
|
||||
end,
|
||||
})
|
||||
:find()
|
||||
end
|
||||
|
||||
local dap = require("dap")
|
||||
dap.configurations.java = {
|
||||
{
|
||||
type = "java",
|
||||
request = "attach",
|
||||
name = "Debug (Attach) - Remote",
|
||||
hostName = "127.0.0.1",
|
||||
port = 5005,
|
||||
},
|
||||
}
|
||||
|
||||
-- Server
|
||||
require("jdtls").start_or_attach(config)
|
@ -11,7 +11,6 @@ return {
|
||||
"renerocksai/calendar-vim",
|
||||
"google/vim-searchindex",
|
||||
"kosayoda/nvim-lightbulb",
|
||||
"tpope/vim-surround",
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = "make install_jsregexp",
|
||||
@ -94,15 +93,6 @@ return {
|
||||
require("libp").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
lazy = false, -- make sure we load this during startup if it is your main colorscheme
|
||||
priority = 1000, -- make sure to load this before all the other start plugins
|
||||
config = function()
|
||||
require("config.catppuccin")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"ojroques/nvim-osc52",
|
||||
config = function()
|
||||
|
79
vim/.vim/lua/plugins/catppuccin.lua
Normal file
79
vim/.vim/lua/plugins/catppuccin.lua
Normal file
@ -0,0 +1,79 @@
|
||||
return {
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
lazy = false, -- make sure we load this during startup if it is your main colorscheme
|
||||
priority = 1000, -- make sure to load this before all the other start plugins
|
||||
config = function()
|
||||
vim.g.catppuccin_flavour = "macchiato" -- latte, frappe, macchiato, mocha
|
||||
local colors = require("catppuccin.palettes").get_palette()
|
||||
|
||||
require("catppuccin").setup({
|
||||
flavour = "macchiato",
|
||||
integrations = {
|
||||
cmp = true,
|
||||
-- coc_nvim = false,
|
||||
dashboard = true,
|
||||
-- fern = false,
|
||||
fidget = true,
|
||||
gitgutter = true,
|
||||
gitsigns = true,
|
||||
-- hop = false,
|
||||
-- illuminate = false,
|
||||
-- leap = false,
|
||||
-- lightspeed = false,
|
||||
-- lsp_saga = false,
|
||||
lsp_trouble = true,
|
||||
mason = true,
|
||||
markdown = true,
|
||||
-- neogit = false,
|
||||
-- neotest = false,
|
||||
neotree = true,
|
||||
notify = true,
|
||||
-- nvimtree = true,
|
||||
-- overseer = false,
|
||||
-- pounce = false,
|
||||
symbols_outline = true,
|
||||
telescope = true,
|
||||
treesitter = true,
|
||||
treesitter_context = false,
|
||||
-- ts_rainbow = false,
|
||||
-- vim_sneak = false,
|
||||
-- vimwiki = false,
|
||||
which_key = true,
|
||||
|
||||
-- Special integrations, see https://github.com/catppuccin/nvim#special-integrations
|
||||
dap = {
|
||||
enabled = false,
|
||||
enable_ui = false,
|
||||
},
|
||||
indent_blankline = {
|
||||
enabled = true,
|
||||
colored_indent_levels = false,
|
||||
},
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
virtual_text = {
|
||||
errors = { "italic" },
|
||||
hints = { "italic" },
|
||||
warnings = { "italic" },
|
||||
information = { "italic" },
|
||||
},
|
||||
underlines = {
|
||||
errors = { "underline" },
|
||||
hints = { "underline" },
|
||||
warnings = { "underline" },
|
||||
information = { "underline" },
|
||||
},
|
||||
},
|
||||
},
|
||||
custom_highlights = {
|
||||
Identifier = { fg = colors.lavender },
|
||||
Statement = { fg = colors.rosewater },
|
||||
-- Identifier = { fg = colors.sapphire },
|
||||
Function = { fg = colors.mauve },
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_command("colorscheme catppuccin")
|
||||
end,
|
||||
}
|
@ -46,8 +46,8 @@ return {
|
||||
|
||||
local conditionalSources = cmp.config.sources({
|
||||
{ name = "nvim_lsp", priority = 6 },
|
||||
{ name = "nvim_lsp_signature_help", priority = 7 },
|
||||
{ name = "luasnip", priority = 8 },
|
||||
{ name = "nvim_lsp_signature_help", priority = 6 },
|
||||
{ name = "luasnip", priority = 7 },
|
||||
{ name = "calc" },
|
||||
{ name = "crates" },
|
||||
{ name = "nvim_lua" },
|
||||
@ -69,7 +69,7 @@ return {
|
||||
if use_google() then
|
||||
require("cmp_nvim_ciderlsp").setup()
|
||||
table.insert(conditionalSources, { name = "analysislsp" })
|
||||
table.insert(conditionalSources, { name = "nvim_ciderlsp", priority = 9 })
|
||||
table.insert(conditionalSources, { name = "nvim_ciderlsp", priority = 8 })
|
||||
else
|
||||
table.insert(conditionalSources, { name = "cmp_tabnine" })
|
||||
end
|
||||
@ -140,7 +140,7 @@ return {
|
||||
|
||||
sorting = {
|
||||
comparators = {
|
||||
cmp.config.compare.priority,
|
||||
-- cmp.config.compare.priority,
|
||||
cmp.config.compare.offset,
|
||||
cmp.config.compare.exact,
|
||||
cmp.config.compare.score,
|
||||
@ -160,6 +160,8 @@ return {
|
||||
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
with_text = true,
|
||||
|
||||
-- mode = "symbol_text",
|
||||
-- before = function(entry, vim_item)
|
||||
-- if entry.source.name == "nvim_ciderlsp" then
|
||||
@ -172,7 +174,7 @@ return {
|
||||
-- end
|
||||
-- return vim_item
|
||||
-- end,
|
||||
maxwidth = 40, -- half max width
|
||||
maxwidth = 50, -- half max width
|
||||
menu = {
|
||||
nvim_ciderlsp = "",
|
||||
buffer = "",
|
||||
|
@ -1,44 +0,0 @@
|
||||
return {
|
||||
"mhartington/formatter.nvim",
|
||||
config = function()
|
||||
-- Utilities for creating configurations
|
||||
local util = require("formatter.util")
|
||||
|
||||
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
|
||||
require("formatter").setup({
|
||||
-- Enable or disable logging
|
||||
logging = true,
|
||||
-- Set the log level
|
||||
log_level = vim.log.levels.WARN,
|
||||
-- All formatter configurations are opt-in
|
||||
filetype = {
|
||||
-- xml = {
|
||||
-- function()
|
||||
-- return {
|
||||
-- exe = "tidy",
|
||||
-- args = {
|
||||
-- "-quiet",
|
||||
-- "-xml",
|
||||
-- "--indent auto",
|
||||
-- "--indent-spaces 2",
|
||||
-- "--verical-space yes",
|
||||
-- "--tidy-mark no",
|
||||
-- },
|
||||
-- stdin = true,
|
||||
-- try_node_modules = true,
|
||||
-- }
|
||||
-- end,
|
||||
-- },
|
||||
--
|
||||
-- Use the special "*" filetype for defining formatter configurations on
|
||||
-- any filetype
|
||||
},
|
||||
})
|
||||
vim.cmd([[
|
||||
augroup FormatAutogroup
|
||||
autocmd!
|
||||
autocmd BufWritePost * FormatWrite
|
||||
augroup END
|
||||
]])
|
||||
end,
|
||||
}
|
@ -44,15 +44,30 @@ return {
|
||||
{
|
||||
name = "relatedfiles",
|
||||
dir = "/usr/share/vim/google/relatedfiles",
|
||||
dependencies = { "maktaba", "glaive" },
|
||||
dependencies = { "glaive" },
|
||||
config = function()
|
||||
vim.cmd([[ Glaive relatedfiles plugin[mappings] ]])
|
||||
vim.cmd([[Glaive relatedfiles]])
|
||||
end,
|
||||
|
||||
keys = {
|
||||
{
|
||||
"<leader>rb",
|
||||
":exec relatedfiles#selector#JumpToBuild()<CR>",
|
||||
},
|
||||
{
|
||||
"<leader>rt",
|
||||
":exec relatedfiles#selector#JumpToTestFile()<CR>",
|
||||
},
|
||||
{
|
||||
"<leader>rc",
|
||||
":exec relatedfiles#selector#JumpToCodeFile()<CR>",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "codefmt",
|
||||
dir = "/usr/share/vim/google/codefmt",
|
||||
dependencies = { "maktaba", "glaive" },
|
||||
dependencies = { "glaive" },
|
||||
config = function()
|
||||
vim.cmd(
|
||||
[[Glaive codefmt ktfmt_executable=`["/google/bin/releases/kotlin-google-eng/ktfmt/ktfmt_deploy.jar", "--google-style"]`]]
|
||||
@ -62,7 +77,7 @@ return {
|
||||
{
|
||||
name = "imp-google",
|
||||
dir = "/usr/share/vim/google/imp-google",
|
||||
dependencies = { "maktaba", "vim-imp", "glaive" },
|
||||
dependencies = { "vim-imp", "glaive" },
|
||||
config = function()
|
||||
require("config.imp-google")
|
||||
end,
|
||||
|
@ -8,6 +8,22 @@ return {
|
||||
"VonHeikemen/lsp-zero.nvim",
|
||||
"rcarriga/nvim-notify",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>" },
|
||||
{ "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>" },
|
||||
{ "L", "<cmd>lua vim.lsp.buf.hover()<CR>" },
|
||||
{ "g0", "<cmd>lua vim.lsp.buf.document_symbol()<CR>" },
|
||||
{ "gW", "<cmd>lua vim.lsp.buf.workspace_symbol()<CR>" },
|
||||
{ "gd", "<cmd>lua vim.lsp.buf.definition()<CR>" },
|
||||
{ "gD", "<cmd>tab split | lua vim.lsp.buf.definition()<CR>" },
|
||||
{ "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>" },
|
||||
{ "gI", "<cmd>lua vim.lsp.buf.implementation()<CR>" },
|
||||
{ "gR", "<cmd>lua vim.lsp.buf.references()<CR>" },
|
||||
{ "<C-g>", "<cmd>lua vim.lsp.buf.signature_help()<CR>" },
|
||||
{ "gt", "<cmd>lua vim.lsp.buf.type_definition()<CR>" },
|
||||
{ "<C-g>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", mode = "i" },
|
||||
{ "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", mode = "v" },
|
||||
},
|
||||
config = function()
|
||||
local use_google = require("utils").use_google
|
||||
local notify = require("notify")
|
||||
@ -44,6 +60,7 @@ return {
|
||||
configs.ast_grep = {
|
||||
default_config = {
|
||||
cmd = { "sg", "lsp" },
|
||||
offset_encoding = "utf-8",
|
||||
filetypes = {
|
||||
"c",
|
||||
"cpp",
|
||||
@ -70,6 +87,7 @@ return {
|
||||
"--tooltag=nvim-cmp",
|
||||
"--forward_sync_responses",
|
||||
},
|
||||
offset_encoding = "utf-8",
|
||||
filetypes = {
|
||||
"c",
|
||||
"cpp",
|
||||
@ -98,6 +116,7 @@ return {
|
||||
"--lint_on_save=false",
|
||||
"--max_qps=10",
|
||||
},
|
||||
offset_encoding = "utf-8",
|
||||
filetypes = {
|
||||
"c",
|
||||
"cpp",
|
||||
@ -156,24 +175,6 @@ return {
|
||||
end
|
||||
|
||||
lsp_status.on_attach(client)
|
||||
|
||||
local opts = { noremap = true, silent = true }
|
||||
vim.api.nvim_set_keymap("n", "<leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("v", "<leader>ca", "<cmd>lua vim.lsp.buf.code_action()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "L", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "g0", "<cmd>lua vim.lsp.buf.document_symbol()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "gW", "<cmd>lua vim.lsp.buf.workspace_symbol()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "gD", "<cmd>tab split | lua vim.lsp.buf.definition()<CR>", opts)
|
||||
-- vim.api.nvim_buf_set_keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "gI", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("n", "gR", "<cmd>lua vim.lsp.buf.references()<CR>", opts) -- diagnostics controls references
|
||||
vim.api.nvim_set_keymap("n", "<C-g>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
||||
vim.api.nvim_set_keymap("i", "<C-g>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
|
||||
|
||||
vim.api.nvim_set_keymap("n", "gt", "<cmd>lua vim.lsp.buf.type_definition()<CR>", opts)
|
||||
end
|
||||
|
||||
if use_google() then
|
||||
|
@ -12,9 +12,6 @@ return {
|
||||
-- Catch insensitive, inconsiderate writing.
|
||||
null_ls.builtins.diagnostics.alex,
|
||||
|
||||
-- buildifier is a tool for formatting and linting bazel BUILD, WORKSPACE, and .bzl files.
|
||||
null_ls.builtins.diagnostics.buildifier,
|
||||
|
||||
-- Codespell finds common misspellings in text files.
|
||||
null_ls.builtins.diagnostics.codespell,
|
||||
-- null_ls.builtins.diagnostics.cspell, null_ls.builtins.code_actions.cspell,
|
||||
@ -26,9 +23,33 @@ return {
|
||||
null_ls.builtins.formatting.google_java_format,
|
||||
|
||||
-- XML
|
||||
null_ls.builtins.diagnostics.tidy,
|
||||
-- null_ls.builtins.formatting.xmlformat
|
||||
|
||||
-- null_ls.builtins.diagnostics.tidy,
|
||||
-- null_ls.builtins.formatting.xmlformat,
|
||||
-- null_ls.builtins.formatting.xq,
|
||||
-- null_ls.builtins.formatting.xmllint.with({ extra_args = { "--pretty", "2" } }),
|
||||
null_ls.builtins.formatting.tidy.with({
|
||||
filetypes = { "xml" },
|
||||
args = {
|
||||
"-xml",
|
||||
"-quiet",
|
||||
"-wrap",
|
||||
"--tidy-mark",
|
||||
"no",
|
||||
"--indent",
|
||||
"yes",
|
||||
"--indent-spaces",
|
||||
"2",
|
||||
"--indent-attributes",
|
||||
"yes",
|
||||
"--sort-attributes",
|
||||
"alpha",
|
||||
"--wrap-attributes",
|
||||
"yes",
|
||||
"--vertical-space",
|
||||
"yes",
|
||||
"-",
|
||||
},
|
||||
}),
|
||||
null_ls.builtins.formatting.stylua,
|
||||
}
|
||||
|
||||
@ -48,8 +69,25 @@ return {
|
||||
})
|
||||
end
|
||||
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
null_ls.setup({
|
||||
on_init = function(new_client, _)
|
||||
new_client.offset_encoding = "utf-8"
|
||||
end,
|
||||
sources = sources,
|
||||
-- you can reuse a shared lspconfig on_attach callback here
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ async = false })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
10
vim/.vim/lua/plugins/surround.lua
Normal file
10
vim/.vim/lua/plugins/surround.lua
Normal file
@ -0,0 +1,10 @@
|
||||
return {
|
||||
"kylechui/nvim-surround",
|
||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-surround").setup({
|
||||
-- Configuration here, or leave empty to use defaults
|
||||
})
|
||||
end
|
||||
}
|
@ -9,7 +9,7 @@ set runtimepath+=,~/.config/nvim/after/
|
||||
let &runtimepath = &runtimepath
|
||||
|
||||
set directory=/tmp
|
||||
set undodir=/tmp
|
||||
set undofile
|
||||
set nobackup
|
||||
set formatoptions+=j
|
||||
set nowritebackup
|
||||
|
Reference in New Issue
Block a user