Compare commits

...

5 Commits

@ -5,11 +5,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1707351223, "lastModified": 1711976880,
"narHash": "sha256-kRc9+s3sJyoOOPAlS8Vo9aghzyVUlti43A+hDLdnimM=", "narHash": "sha256-YrPxB4wu70PmMGcETj9bxL7SkMj26EPQqtUBAWp0jiI=",
"owner": "catppuccin", "owner": "catppuccin",
"repo": "toolbox", "repo": "toolbox",
"rev": "bf01699b19d59c1a2899d63e8ed7d6bc2865842a", "rev": "1d708ac628ba07264a579e385c88f984db741ffe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -440,11 +440,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1697723726, "lastModified": 1708118438,
"narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=", "narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0", "rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -504,11 +504,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1706732774, "lastModified": 1711163522,
"narHash": "sha256-hqJlyJk4MRpcItGYMF+3uHe8HvxNETWvlGtLuVpqLU0=", "narHash": "sha256-YN/Ciidm+A0fmJPWlHBGvVkcarYWSC+s3NTPk/P+q3c=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b8b232ae7b8b144397fdb12d20f592e5e7c1a64d", "rev": "44d0940ea560dee511026a53f0e2e2cde489b4d4",
"type": "github" "type": "github"
}, },
"original": { "original": {

@ -1,7 +1,7 @@
{pkgs, ...}: { {pkgs, ...}: {
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
(iosevka-bin.override {variant = "sgr-iosevka-term";}) (iosevka-bin.override {variant = "SGr-IosevkaTerm";})
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];}) (nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
victor-mono victor-mono
]; ];

@ -51,6 +51,7 @@
push.autoSetupRemote = true; push.autoSetupRemote = true;
receive.fsckObjects = true; receive.fsckObjects = true;
transfer.fsckobjects = true; transfer.fsckobjects = true;
url."git@github.com:catppuccin/".insteadOf = "ctp:";
}; };
}; };
} }

@ -1,38 +1,36 @@
{ {
"LazyVim": { "branch": "main", "commit": "c433ea7aa842c446edc2b1570998bf5440c68188" }, "LazyVim": { "branch": "main", "commit": "c433ea7aa842c446edc2b1570998bf5440c68188" },
"LuaSnip": { "branch": "master", "commit": "2dbef19461198630b3d7c39f414d09fb07d1fdd2" }, "LuaSnip": { "branch": "master", "commit": "2dbef19461198630b3d7c39f414d09fb07d1fdd2" },
"SchemaStore.nvim": { "branch": "main", "commit": "be4d1084397c9b9d3d5a41bda871e6b20415bf48" }, "SchemaStore.nvim": { "branch": "main", "commit": "17de2914bad410d391f184bb14f2a7327777ca38" },
"catppuccin": { "branch": "main", "commit": "c2034f7b549152e5cc757820426341ea5000bc7a" }, "catppuccin": { "branch": "main", "commit": "c2034f7b549152e5cc757820426341ea5000bc7a" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "c0e0e80f0c233cb3a249f719a44324c660163a3f" }, "conform.nvim": { "branch": "master", "commit": "c0e0e80f0c233cb3a249f719a44324c660163a3f" },
"copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" }, "crates.nvim": { "branch": "main", "commit": "ec2b04a380c9f3a8e6ca38c230e4990d71978143" },
"copilot.lua": { "branch": "master", "commit": "71382c2efec76647287d46a4fbe0ec8c9809e2ee" }, "doom-one.nvim": { "branch": "main", "commit": "76595eec15896a5da7f4e39ceeded6ffb0f4dc38" },
"crates.nvim": { "branch": "main", "commit": "2bd990871f0aef159933bd5fe6da421690a832b9" },
"dashboard-nvim": { "branch": "master", "commit": "c045eb24334324fb39ad5ede0b5d15a74a5d229e" },
"dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" }, "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" },
"eyeliner.nvim": { "branch": "main", "commit": "c540d58bf52aa979d4cca639c60387ae0c0ccf88" },
"friendly-snippets": { "branch": "main", "commit": "b8fae73a479ae0a1c54f5c98fa687ae8a0addc53" }, "friendly-snippets": { "branch": "main", "commit": "b8fae73a479ae0a1c54f5c98fa687ae8a0addc53" },
"gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
"headlines.nvim": { "branch": "master", "commit": "e3d7bfdf40e41a020d966d35f8b48d75b90367d2" },
"indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" }, "indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" },
"lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" },
"ltex_extra.nvim": { "branch": "master", "commit": "42dd3572cb09b52a137e91e515f2dff5eb631b1e" }, "ltex_extra.nvim": { "branch": "master", "commit": "42dd3572cb09b52a137e91e515f2dff5eb631b1e" },
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "2b3d247fce06f53934174f5dfe0362c42d65c00c" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "0954d7730e749d606ddf8d7ae8846848be435d53" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "3614a39aae98ccd34124b072939d6283853b3dd2" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "3614a39aae98ccd34124b072939d6283853b3dd2" },
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
"mini.ai": { "branch": "main", "commit": "3ad9d455a91b8bf3c24d4e50518d9a6b9dddb42c" }, "mini.ai": { "branch": "main", "commit": "3ad9d455a91b8bf3c24d4e50518d9a6b9dddb42c" },
"mini.comment": { "branch": "main", "commit": "b0b359ada4293cdcea7ab4072dfd5b031aac3f8e" }, "mini.comment": { "branch": "main", "commit": "b0b359ada4293cdcea7ab4072dfd5b031aac3f8e" },
"mini.indentscope": { "branch": "main", "commit": "ca129b71edb672d30b8d7ec3138106db1b1f6a8b" }, "mini.indentscope": { "branch": "main", "commit": "ca129b71edb672d30b8d7ec3138106db1b1f6a8b" },
"mini.nvim": { "branch": "main", "commit": "d1413e1cacaacd29e420b9482754e762076e64ac" }, "mini.nvim": { "branch": "main", "commit": "9adc2eeec07f3ee65d54f7ceb791ad8fead49c92" },
"mini.pairs": { "branch": "main", "commit": "552062017ff207e1f35f7028bfb3f27c7421d22d" }, "mini.pairs": { "branch": "main", "commit": "552062017ff207e1f35f7028bfb3f27c7421d22d" },
"mini.surround": { "branch": "main", "commit": "5ceb6a12d3761bc719fbdad5432c89333deb1498" }, "mini.surround": { "branch": "main", "commit": "5ceb6a12d3761bc719fbdad5432c89333deb1498" },
"neoconf.nvim": { "branch": "main", "commit": "435d70c1bc5a5bd21ecb98163baa8262480c4019" }, "neoconf.nvim": { "branch": "main", "commit": "435d70c1bc5a5bd21ecb98163baa8262480c4019" },
"neodev.nvim": { "branch": "main", "commit": "2793ba3127c2c93ee486b9072a3ef129eeb950cc" }, "neodev.nvim": { "branch": "main", "commit": "0ee95ecefc8ea45898a0383364f736e098c8703f" },
"neogit": { "branch": "master", "commit": "a3f23af6f1b12938745092c4b427c732c79effe7" }, "neogit": { "branch": "master", "commit": "463a32ca1dcbf35f97b16a7d955217687e850f8d" },
"noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" }, "noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" },
"nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" }, "nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" },
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
@ -41,21 +39,20 @@
"nvim-dap-python": { "branch": "master", "commit": "f5b6f3a90aae0284b61fb3565e575267c19a16e6" }, "nvim-dap-python": { "branch": "master", "commit": "f5b6f3a90aae0284b61fb3565e575267c19a16e6" },
"nvim-dap-ui": { "branch": "master", "commit": "d845ebd798ad1cf30aa4abd4c4eff795cdcfdd4f" }, "nvim-dap-ui": { "branch": "master", "commit": "d845ebd798ad1cf30aa4abd4c4eff795cdcfdd4f" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "d4542ac257d3c7ee4131350db6179ae6340ce40b" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "d4542ac257d3c7ee4131350db6179ae6340ce40b" },
"nvim-jdtls": { "branch": "master", "commit": "4f4de4d80e1df43d58e5e21677fca4c63676664d" },
"nvim-lint": { "branch": "master", "commit": "76af3422e3c82ea40adf9ade1ccf1dc1eb361789" }, "nvim-lint": { "branch": "master", "commit": "76af3422e3c82ea40adf9ade1ccf1dc1eb361789" },
"nvim-lspconfig": { "branch": "master", "commit": "9a6279953c82d01b58825a46ede032ab246a5983" }, "nvim-lspconfig": { "branch": "master", "commit": "d12140c5687a1186b95b3f42dbc6cc769df0cf0d" },
"nvim-notify": { "branch": "master", "commit": "80b67b265530632505193553d05127ae7fe09ddd" }, "nvim-notify": { "branch": "master", "commit": "80b67b265530632505193553d05127ae7fe09ddd" },
"nvim-spectre": { "branch": "master", "commit": "d1ce28b6dc287a6f673461218f3326f0266d75f7" }, "nvim-spectre": { "branch": "master", "commit": "81cb3999e5db37e97f6336b39c077aea5bb32062" },
"nvim-treesitter": { "branch": "master", "commit": "4fbf150a1621d52f17b099506e1a32f107079210" }, "nvim-treesitter": { "branch": "master", "commit": "4fbf150a1621d52f17b099506e1a32f107079210" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "8edd5a6d96936bdff23333d3bc177481388839e5" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "8edd5a6d96936bdff23333d3bc177481388839e5" },
"nvim-ts-autotag": { "branch": "main", "commit": "a65b202cfd08e0e69e531eab737205ff5bc082a4" }, "nvim-ts-autotag": { "branch": "main", "commit": "a65b202cfd08e0e69e531eab737205ff5bc082a4" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },
"nvim-web-devicons": { "branch": "master", "commit": "aaec87dbdaa776bfa0a13c8694bec9bcb7454719" }, "nvim-web-devicons": { "branch": "master", "commit": "313d9e7193354c5de7cdb1724f9e2d3f442780b0" },
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
"rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" }, "rust-tools.nvim": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope.nvim": { "branch": "master", "commit": "7b5c5f56a21e82fdcfe5b250278b8dfc4b1cbab4" }, "telescope.nvim": { "branch": "master", "commit": "236083884cfe6c874e03e6cb4e7cb08809c1333c" },
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
"toggleterm.nvim": { "branch": "main", "commit": "b49df5cdce67a8964d1b027dae94bde212092b51" }, "toggleterm.nvim": { "branch": "main", "commit": "b49df5cdce67a8964d1b027dae94bde212092b51" },
"tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" }, "tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" },

@ -26,6 +26,7 @@ require("lazy").setup({
{ import = "lazyvim.plugins.extras.lang.typescript" }, { import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.python" }, { import = "lazyvim.plugins.extras.lang.python" },
{ import = "lazyvim.plugins.extras.lang.markdown" }, { import = "lazyvim.plugins.extras.lang.markdown" },
{ import = "lazyvim.plugins.extras.lang.tex" },
{ import = "lazyvim.plugins.extras.dap.core" }, { import = "lazyvim.plugins.extras.dap.core" },
-- Can't figure out how to force reordering of the completions so just gonna disable it for now -- Can't figure out how to force reordering of the completions so just gonna disable it for now
-- { import = "lazyvim.plugins.extras.coding.copilot" }, -- { import = "lazyvim.plugins.extras.coding.copilot" },

@ -4,9 +4,10 @@ return {
name = "catppuccin", name = "catppuccin",
priority = 10000, priority = 10000,
opts = { opts = {
flavour = "latte", flavour = "mocha",
custom_highlights = function(c) custom_highlights = function(c)
local u = require("catppuccin.utils.colors") local u = require("catppuccin.utils.colors")
local latte = require("catppuccin.palettes.latte")
return { return {
NoiceCmdLinePopupTitle = { fg = c.base, bg = c.blue }, NoiceCmdLinePopupTitle = { fg = c.base, bg = c.blue },
@ -20,7 +21,7 @@ return {
-- Setting the borders and background of the completion/documentation menu -- Setting the borders and background of the completion/documentation menu
BorderBG = { fg = c.blue }, BorderBG = { fg = c.blue },
PmenuSel = { bg = c.mantle }, -- PmenuSel = { bg = c.mantle }, -- enable when using latte
-- Setting the background of the lsp.buf.hover() and other floats -- Setting the background of the lsp.buf.hover() and other floats
NormalFloat = { bg = c.base }, NormalFloat = { bg = c.base },
-- Setting the background of the lsp diagnostics - stuff like [d, [w -- Setting the background of the lsp diagnostics - stuff like [d, [w
@ -29,6 +30,9 @@ return {
-- Markdown headlines -- Markdown headlines
Headline1 = { bg = c.transparent }, Headline1 = { bg = c.transparent },
EyelinerPrimary = { fg = latte.red },
EyelinerSecondary = { fg = latte.peach },
-- Neogit -- Neogit
-- NeogitUnstagedchanges = { bg = c.base }, -- NeogitUnstagedchanges = { bg = c.base },
-- NeogitUnstagedchangesRegion = { bg = c.base }, -- NeogitUnstagedchangesRegion = { bg = c.base },

@ -35,6 +35,7 @@ return {
{ event = "notify", find = "No information available" }, { event = "notify", find = "No information available" },
{ event = "msg_show", find = "fewer lines" }, { event = "msg_show", find = "fewer lines" },
{ event = "msg_show", find = "more lines" }, { event = "msg_show", find = "more lines" },
{ event = "notify", find = "Compilation completed" },
{ {
event = "lsp", event = "lsp",
kind = "progress", kind = "progress",
@ -78,4 +79,12 @@ return {
shell = "fish", shell = "fish",
}, },
}, },
{
"jinh0/eyeliner.nvim",
config = function()
require("eyeliner").setup({
highlight_on_key = true,
})
end,
},
} }

@ -2,6 +2,7 @@ return {
{ {
"NeogitOrg/neogit", "NeogitOrg/neogit",
dependencies = "nvim-lua/plenary.nvim", dependencies = "nvim-lua/plenary.nvim",
cmd = { "Neogit" },
opts = { opts = {
disable_commit_confirmation = true, disable_commit_confirmation = true,
}, },

@ -1,210 +1,211 @@
local Util = require("lazyvim.util") return {}
-- local Util = require("lazyvim.util")
-- This is the same as in lspconfig.server_configurations.jdtls, but avoids --
-- needing to require that when this module loads. -- -- This is the same as in lspconfig.server_configurations.jdtls, but avoids
local java_filetypes = { "java" } -- -- needing to require that when this module loads.
-- local java_filetypes = { "java" }
-- Utility function to extend or override a config table, similar to the way --
-- that Plugin.opts works. -- -- Utility function to extend or override a config table, similar to the way
---@param config table -- -- that Plugin.opts works.
---@param custom function | table | nil -- ---@param config table
local function extend_or_override(config, custom, ...) -- ---@param custom function | table | nil
if type(custom) == "function" then -- local function extend_or_override(config, custom, ...)
config = custom(config, ...) or config -- if type(custom) == "function" then
elseif custom then -- config = custom(config, ...) or config
config = vim.tbl_deep_extend("force", config, custom) --[[@as table]] -- elseif custom then
end -- config = vim.tbl_deep_extend("force", config, custom) --[[@as table]]
return config -- end
end -- return config
-- end
return { --
-- Ensure java debugger and test packages are installed. -- return {
{ -- -- Ensure java debugger and test packages are installed.
"mfussenegger/nvim-dap", -- {
optional = true, -- "mfussenegger/nvim-dap",
dependencies = { -- optional = true,
{ -- dependencies = {
"williamboman/mason.nvim", -- {
opts = function(_, opts) -- "williamboman/mason.nvim",
opts.ensure_installed = opts.ensure_installed or {} -- opts = function(_, opts)
vim.list_extend(opts.ensure_installed, { "java-test", "java-debug-adapter" }) -- opts.ensure_installed = opts.ensure_installed or {}
end, -- vim.list_extend(opts.ensure_installed, { "java-test", "java-debug-adapter" })
}, -- end,
}, -- },
}, -- },
-- },
-- Configure nvim-lspconfig to install the server automatically via mason, but --
-- defer actually starting it to our configuration of nvim-jtdls below. -- -- Configure nvim-lspconfig to install the server automatically via mason, but
{ -- -- defer actually starting it to our configuration of nvim-jtdls below.
"neovim/nvim-lspconfig", -- {
opts = { -- "neovim/nvim-lspconfig",
-- make sure mason installs the server -- opts = {
servers = { -- -- make sure mason installs the server
jdtls = {}, -- servers = {
}, -- jdtls = {},
setup = { -- },
jdtls = function() -- setup = {
return true -- avoid duplicate servers -- jdtls = function()
end, -- return true -- avoid duplicate servers
}, -- end,
}, -- },
}, -- },
-- },
-- Set up nvim-jdtls to attach to java files. --
{ -- -- Set up nvim-jdtls to attach to java files.
"mfussenegger/nvim-jdtls", -- {
ft = java_filetypes, -- "mfussenegger/nvim-jdtls",
opts = function() -- ft = java_filetypes,
return { -- opts = function()
-- How to find the root dir for a given filename. The default comes from -- return {
-- lspconfig which provides a function specifically for java projects. -- -- How to find the root dir for a given filename. The default comes from
root_dir = require("lspconfig.server_configurations.jdtls").default_config.root_dir, -- -- lspconfig which provides a function specifically for java projects.
-- root_dir = require("lspconfig.server_configurations.jdtls").default_config.root_dir,
-- How to find the project name for a given root dir. --
project_name = function(root_dir) -- -- How to find the project name for a given root dir.
return root_dir and vim.fs.basename(root_dir) -- project_name = function(root_dir)
end, -- return root_dir and vim.fs.basename(root_dir)
-- end,
-- Where are the config and workspace dirs for a project? --
jdtls_config_dir = function(project_name) -- -- Where are the config and workspace dirs for a project?
return vim.fn.stdpath("cache") .. "/jdtls/" .. project_name .. "/config" -- jdtls_config_dir = function(project_name)
end, -- return vim.fn.stdpath("cache") .. "/jdtls/" .. project_name .. "/config"
jdtls_workspace_dir = function(project_name) -- end,
return vim.fn.stdpath("cache") .. "/jdtls/" .. project_name .. "/workspace" -- jdtls_workspace_dir = function(project_name)
end, -- return vim.fn.stdpath("cache") .. "/jdtls/" .. project_name .. "/workspace"
-- end,
-- How to run jdtls. This can be overridden to a full java command-line --
-- if the Python wrapper script doesn't suffice. -- -- How to run jdtls. This can be overridden to a full java command-line
cmd = { vim.fn.exepath("jdtls") }, -- -- if the Python wrapper script doesn't suffice.
full_cmd = function(opts) -- cmd = { vim.fn.exepath("jdtls") },
local fname = vim.api.nvim_buf_get_name(0) -- full_cmd = function(opts)
local root_dir = opts.root_dir(fname) -- local fname = vim.api.nvim_buf_get_name(0)
local project_name = opts.project_name(root_dir) -- local root_dir = opts.root_dir(fname)
local cmd = vim.deepcopy(opts.cmd) -- local project_name = opts.project_name(root_dir)
if project_name then -- local cmd = vim.deepcopy(opts.cmd)
vim.list_extend(cmd, { -- if project_name then
"-configuration", -- vim.list_extend(cmd, {
opts.jdtls_config_dir(project_name), -- "-configuration",
"-data", -- opts.jdtls_config_dir(project_name),
opts.jdtls_workspace_dir(project_name), -- "-data",
}) -- opts.jdtls_workspace_dir(project_name),
end -- })
return cmd -- end
end, -- return cmd
-- end,
-- These depend on nvim-dap, but can additionally be disabled by setting false here. --
dap = { hotcodereplace = "auto", config_overrides = {} }, -- -- These depend on nvim-dap, but can additionally be disabled by setting false here.
test = true, -- dap = { hotcodereplace = "auto", config_overrides = {} },
} -- test = true,
end, -- }
config = function() -- end,
local opts = Util.opts("nvim-jdtls") or {} -- config = function()
-- local opts = Util.opts("nvim-jdtls") or {}
-- Find the extra bundles that should be passed on the jdtls command-line --
-- if nvim-dap is enabled with java debug/test. -- -- Find the extra bundles that should be passed on the jdtls command-line
local mason_registry = require("mason-registry") -- -- if nvim-dap is enabled with java debug/test.
local bundles = {} ---@type string[] -- local mason_registry = require("mason-registry")
if opts.dap and Util.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then -- local bundles = {} ---@type string[]
local java_dbg_pkg = mason_registry.get_package("java-debug-adapter") -- if opts.dap and Util.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
local java_dbg_path = java_dbg_pkg:get_install_path() -- local java_dbg_pkg = mason_registry.get_package("java-debug-adapter")
local jar_patterns = { -- local java_dbg_path = java_dbg_pkg:get_install_path()
java_dbg_path .. "/extension/server/com.microsoft.java.debug.plugin-*.jar", -- local jar_patterns = {
} -- java_dbg_path .. "/extension/server/com.microsoft.java.debug.plugin-*.jar",
-- java-test also depends on java-debug-adapter. -- }
if opts.test and mason_registry.is_installed("java-test") then -- -- java-test also depends on java-debug-adapter.
local java_test_pkg = mason_registry.get_package("java-test") -- if opts.test and mason_registry.is_installed("java-test") then
local java_test_path = java_test_pkg:get_install_path() -- local java_test_pkg = mason_registry.get_package("java-test")
vim.list_extend(jar_patterns, { -- local java_test_path = java_test_pkg:get_install_path()
java_test_path .. "/extension/server/*.jar", -- vim.list_extend(jar_patterns, {
}) -- java_test_path .. "/extension/server/*.jar",
end -- })
for _, jar_pattern in ipairs(jar_patterns) do -- end
for _, bundle in ipairs(vim.split(vim.fn.glob(jar_pattern), "\n")) do -- for _, jar_pattern in ipairs(jar_patterns) do
table.insert(bundles, bundle) -- for _, bundle in ipairs(vim.split(vim.fn.glob(jar_pattern), "\n")) do
end -- table.insert(bundles, bundle)
end -- end
end -- end
-- end
local function attach_jdtls() --
local fname = vim.api.nvim_buf_get_name(0) -- local function attach_jdtls()
-- local fname = vim.api.nvim_buf_get_name(0)
-- Configuration can be augmented and overridden by opts.jdtls --
local config = extend_or_override({ -- -- Configuration can be augmented and overridden by opts.jdtls
cmd = opts.full_cmd(opts), -- local config = extend_or_override({
root_dir = opts.root_dir(fname), -- cmd = opts.full_cmd(opts),
init_options = { -- root_dir = opts.root_dir(fname),
bundles = bundles, -- init_options = {
}, -- bundles = bundles,
-- enable CMP capabilities -- },
capabilities = require("cmp_nvim_lsp").default_capabilities(), -- -- enable CMP capabilities
}, opts.jdtls) -- capabilities = require("cmp_nvim_lsp").default_capabilities(),
-- }, opts.jdtls)
-- Existing server will be reused if the root_dir matches. --
require("jdtls").start_or_attach(config) -- -- Existing server will be reused if the root_dir matches.
-- not need to require("jdtls.setup").add_commands(), start automatically adds commands -- require("jdtls").start_or_attach(config)
end -- -- not need to require("jdtls.setup").add_commands(), start automatically adds commands
-- end
-- Attach the jdtls for each java buffer. HOWEVER, this plugin loads --
-- depending on filetype, so this autocmd doesn't run for the first file. -- -- Attach the jdtls for each java buffer. HOWEVER, this plugin loads
-- For that, we call directly below. -- -- depending on filetype, so this autocmd doesn't run for the first file.
vim.api.nvim_create_autocmd("FileType", { -- -- For that, we call directly below.
pattern = java_filetypes, -- vim.api.nvim_create_autocmd("FileType", {
callback = attach_jdtls, -- pattern = java_filetypes,
}) -- callback = attach_jdtls,
-- })
-- Setup keymap and dap after the lsp is fully attached. --
-- https://github.com/mfussenegger/nvim-jdtls#nvim-dap-configuration -- -- Setup keymap and dap after the lsp is fully attached.
-- https://neovim.io/doc/user/lsp.html#LspAttach -- -- https://github.com/mfussenegger/nvim-jdtls#nvim-dap-configuration
vim.api.nvim_create_autocmd("LspAttach", { -- -- https://neovim.io/doc/user/lsp.html#LspAttach
callback = function(args) -- vim.api.nvim_create_autocmd("LspAttach", {
local client = vim.lsp.get_client_by_id(args.data.client_id) -- callback = function(args)
if client and client.name == "jdtls" then -- local client = vim.lsp.get_client_by_id(args.data.client_id)
-- ["<leader>cx"] = { name = "+extract" }, -- if client and client.name == "jdtls" then
-- ["<leader>cxv"] = { require("jdtls").extract_variable_all, "Extract Variable" }, -- -- ["<leader>cx"] = { name = "+extract" },
-- ["<leader>cxc"] = { require("jdtls").extract_constant, "Extract Constant" }, -- -- ["<leader>cxv"] = { require("jdtls").extract_variable_all, "Extract Variable" },
-- ["gs"] = { require("jdtls").super_implementation, "Goto Super" }, -- -- ["<leader>cxc"] = { require("jdtls").extract_constant, "Extract Constant" },
-- ["gS"] = { require("jdtls.tests").goto_subjects, "Goto Subjects" }, -- -- ["gs"] = { require("jdtls").super_implementation, "Goto Super" },
-- ["<leader>co"] = { require("jdtls").organize_imports, "Organize Imports" }, -- -- ["gS"] = { require("jdtls.tests").goto_subjects, "Goto Subjects" },
-- ["<leader>c"] = { name = "+code" }, -- -- ["<leader>co"] = { require("jdtls").organize_imports, "Organize Imports" },
-- ["<leader>cx"] = { name = "+extract" }, -- -- ["<leader>c"] = { name = "+code" },
-- ["<leader>cxm"] = { -- -- ["<leader>cx"] = { name = "+extract" },
-- [[<ESC><CMD>lua require('jdtls').extract_method(true)<CR>]], -- -- ["<leader>cxm"] = {
-- "Extract Method", -- -- [[<ESC><CMD>lua require('jdtls').extract_method(true)<CR>]],
-- }, -- -- "Extract Method",
-- ["<leader>cxv"] = { -- -- },
-- [[<ESC><CMD>lua require('jdtls').extract_variable_all(true)<CR>]], -- -- ["<leader>cxv"] = {
-- "Extract Variable", -- -- [[<ESC><CMD>lua require('jdtls').extract_variable_all(true)<CR>]],
-- }, -- -- "Extract Variable",
-- ["<leader>cxc"] = { -- -- },
-- [[<ESC><CMD>lua require('jdtls').extract_constant(true)<CR>]], -- -- ["<leader>cxc"] = {
-- "Extract Constant", -- -- [[<ESC><CMD>lua require('jdtls').extract_constant(true)<CR>]],
-- }, -- -- "Extract Constant",
-- -- },
if opts.dap and Util.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then --
-- custom init for Java debugger -- if opts.dap and Util.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then
require("jdtls").setup_dap(opts.dap) -- -- custom init for Java debugger
require("jdtls.dap").setup_dap_main_class_configs() -- require("jdtls").setup_dap(opts.dap)
-- require("jdtls.dap").setup_dap_main_class_configs()
-- Java Test require Java debugger to work --
if opts.test and mason_registry.is_installed("java-test") then -- -- Java Test require Java debugger to work
-- custom keymaps for Java test runner (not yet compatible with neotest) -- if opts.test and mason_registry.is_installed("java-test") then
-- ["<leader>t"] = { name = "+test" }, -- -- custom keymaps for Java test runner (not yet compatible with neotest)
-- ["<leader>tt"] = { require("jdtls.dap").test_class, "Run All Test" }, -- -- ["<leader>t"] = { name = "+test" },
-- ["<leader>tr"] = { require("jdtls.dap").test_nearest_method, "Run Nearest Test" }, -- -- ["<leader>tt"] = { require("jdtls.dap").test_class, "Run All Test" },
-- ["<leader>tT"] = { require("jdtls.dap").pick_test, "Run Test" }, -- -- ["<leader>tr"] = { require("jdtls.dap").test_nearest_method, "Run Nearest Test" },
end -- -- ["<leader>tT"] = { require("jdtls.dap").pick_test, "Run Test" },
end -- end
-- end
-- User can set additional keymaps in opts.on_attach --
if opts.on_attach then -- -- User can set additional keymaps in opts.on_attach
opts.on_attach(args) -- if opts.on_attach then
end -- opts.on_attach(args)
end -- end
end, -- end
}) -- end,
-- })
-- Avoid race condition by calling attach the first time, since the autocmd won't fire. --
attach_jdtls() -- -- Avoid race condition by calling attach the first time, since the autocmd won't fire.
end, -- attach_jdtls()
}, -- end,
} -- },
-- }

@ -25,6 +25,8 @@ return {
}, },
---@class PluginLspOpts ---@class PluginLspOpts
init = function() init = function()
require("lspconfig.ui.windows").default_options.border = "rounded"
local keys = require("lazyvim.plugins.lsp.keymaps").get() local keys = require("lazyvim.plugins.lsp.keymaps").get()
local function swap_prefix(before, after) local function swap_prefix(before, after)
for _, keymap in ipairs(keys) do for _, keymap in ipairs(keys) do
@ -70,9 +72,6 @@ return {
end, end,
}, },
}, },
config = function()
require("lspconfig.ui.windows").default_options.border = "rounded"
end,
}, },
{ {
"williamboman/mason.nvim", "williamboman/mason.nvim",

@ -36,6 +36,12 @@ return {
}, },
}) })
require("mini.pick").setup() require("mini.pick").setup()
require("mini.indentscope").setup({
draw = {
delay = 0,
animation = require('mini.indentscope').gen_animation.none()
}
})
end, end,
keys = { keys = {
{ {

@ -346,8 +346,8 @@
"files.autoSaveDelay": 100, "files.autoSaveDelay": 100,
"terminal.integrated.smoothScrolling": true, "terminal.integrated.smoothScrolling": true,
"explorer.confirmDelete": false, "explorer.confirmDelete": false,
"workbench.iconTheme": "catppuccin-mocha", "workbench.iconTheme": "catppuccin-latte",
"workbench.colorTheme": "Catppuccin Mocha", "workbench.colorTheme": "Catppuccin Latte",
"[mdx]": { "[mdx]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },

Loading…
Cancel
Save