From ef132d5319ad011e6290d9a55f7d86505a3114ab Mon Sep 17 00:00:00 2001 From: "luis.pinto.fintech" Date: Fri, 24 May 2024 15:21:28 +0100 Subject: [PATCH 1/6] base --- init.lua | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 88658ef3033..7ddbdae8326 100644 --- a/init.lua +++ b/init.lua @@ -577,6 +577,30 @@ require('lazy').setup({ -- But for many setups, the LSP (`tsserver`) will work just fine -- tsserver = {}, -- + jdtls = { + cmd = { + 'java', + '-Declipse.application=org.eclipse.jdt.ls.core.id1', + '-Dosgi.bundles.defaultStartLevel=4', + '-Declipse.product=org.eclipse.jdt.ls.core.product', + '-Dlog.protocol=true', + '-Dlog.level=ALL', + '-Xmx2048m', + '--add-modules=ALL-SYSTEM', + '--add-opens', + 'java.base/java.util=ALL-UNNAMED', + '--add-opens', + 'java.base/java.lang=ALL-UNNAMED', + '-javaagent:' .. require('mason-registry').get_package('jdtls'):get_install_path() .. '/lombok.jar', + '-jar', + '/Users/lmpinto/.local/share/nvim/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher_1.6.800.v20240330-1250.jar', + '-configuration', + '/Users/lmpinto/.local/share/nvim/mason/packages/jdtls/config_mac', + '-data', + '/Users/lmpinto/.local/share/eclipse/report-creator', + }, + root_dir = vim.fs.dirname(vim.fs.find({ 'gradlew', '.git', 'mvnw' }, { upward = true })[1]), + }, lua_ls = { -- cmd = {...}, @@ -644,7 +668,7 @@ require('lazy').setup({ -- Disable "format_on_save lsp_fallback" for languages that don't -- have a well standardized coding style. You can add additional -- languages here or re-enable it for the disabled ones. - local disable_filetypes = { c = true, cpp = true } + local disable_filetypes = { c = true, cpp = true, java = true } return { timeout_ms = 500, lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype], @@ -729,7 +753,7 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines From 3235754376e7eba1bc175b6881b8de9a7e26e54b Mon Sep 17 00:00:00 2001 From: FunneMonkee Date: Mon, 2 Dec 2024 11:38:43 +0000 Subject: [PATCH 2/6] update theme --- init.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 7ddbdae8326..01bb8e54757 100644 --- a/init.lua +++ b/init.lua @@ -568,7 +568,7 @@ require('lazy').setup({ -- clangd = {}, -- gopls = {}, -- pyright = {}, - -- rust_analyzer = {}, + rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: @@ -802,14 +802,16 @@ require('lazy').setup({ -- change the command in the config to whatever the name of that colorscheme is. -- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. - 'folke/tokyonight.nvim', + 'ntk148v/habamax.nvim', priority = 1000, -- Make sure to load this before all the other start plugins. init = function() -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' - + vim.cmd.colorscheme 'habamax' + vim.cmd 'hi Normal guibg=NONE ctermbg=NONE' + vim.cmd 'hi CursorLine term=bold cterm=bold guibg=NONE' + -- vim.cmd 'hi LineNr guibg=NONE' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' end, From 61f3a43ee31c59c2bab25ae433148cc933f6432f Mon Sep 17 00:00:00 2001 From: FunneMonkee Date: Wed, 17 Sep 2025 19:28:04 +0100 Subject: [PATCH 3/6] add clang lsp and auto format --- init.lua | 64 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/init.lua b/init.lua index 01bb8e54757..be790302ef1 100644 --- a/init.lua +++ b/init.lua @@ -565,39 +565,39 @@ require('lazy').setup({ -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - -- clangd = {}, + clangd = {}, -- gopls = {}, -- pyright = {}, rust_analyzer = {}, - -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs + -- ... etc. see `:help lspconfig-all` for a list of all the pre-configured lsps -- - -- Some languages (like typescript) have entire language plugins that can be useful: + -- some languages (like typescript) have entire language plugins that can be useful: -- https://github.com/pmizio/typescript-tools.nvim -- - -- But for many setups, the LSP (`tsserver`) will work just fine + -- but for many setups, the lsp (`tsserver`) will work just fine -- tsserver = {}, -- jdtls = { cmd = { 'java', - '-Declipse.application=org.eclipse.jdt.ls.core.id1', - '-Dosgi.bundles.defaultStartLevel=4', - '-Declipse.product=org.eclipse.jdt.ls.core.product', - '-Dlog.protocol=true', - '-Dlog.level=ALL', - '-Xmx2048m', - '--add-modules=ALL-SYSTEM', + '-declipse.application=org.eclipse.jdt.ls.core.id1', + '-dosgi.bundles.defaultstartlevel=4', + '-declipse.product=org.eclipse.jdt.ls.core.product', + '-dlog.protocol=true', + '-dlog.level=all', + '-xmx2048m', + '--add-modules=all-system', '--add-opens', - 'java.base/java.util=ALL-UNNAMED', + 'java.base/java.util=all-unnamed', '--add-opens', - 'java.base/java.lang=ALL-UNNAMED', + 'java.base/java.lang=all-unnamed', '-javaagent:' .. require('mason-registry').get_package('jdtls'):get_install_path() .. '/lombok.jar', '-jar', - '/Users/lmpinto/.local/share/nvim/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher_1.6.800.v20240330-1250.jar', + '/users/lmpinto/.local/share/nvim/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher_1.6.800.v20240330-1250.jar', '-configuration', - '/Users/lmpinto/.local/share/nvim/mason/packages/jdtls/config_mac', + '/users/lmpinto/.local/share/nvim/mason/packages/jdtls/config_mac', '-data', - '/Users/lmpinto/.local/share/eclipse/report-creator', + '/users/lmpinto/.local/share/eclipse/report-creator', }, root_dir = vim.fs.dirname(vim.fs.find({ 'gradlew', '.git', 'mvnw' }, { upward = true })[1]), }, @@ -607,30 +607,30 @@ require('lazy').setup({ -- filetypes = { ...}, -- capabilities = {}, settings = { - Lua = { + lua = { completion = { - callSnippet = 'Replace', + callsnippet = 'replace', }, - -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings + -- you can toggle below to ignore lua_ls's noisy `missing-fields` warnings -- diagnostics = { disable = { 'missing-fields' } }, }, }, }, } - -- Ensure the servers and tools above are installed - -- To check the current status of installed tools and/or manually install + -- ensure the servers and tools above are installed + -- to check the current status of installed tools and/or manually install -- other tools, you can run - -- :Mason + -- :mason -- - -- You can press `g?` for help in this menu. + -- you can press `g?` for help in this menu. require('mason').setup() - -- You can add other tools here that you want Mason to install - -- for you, so that they are available from within Neovim. + -- you can add other tools here that you want mason to install + -- for you, so that they are available from within neovim. local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { - 'stylua', -- Used to format Lua code + 'stylua', -- used to format lua code }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } @@ -638,9 +638,9 @@ require('lazy').setup({ handlers = { function(server_name) local server = servers[server_name] or {} - -- This handles overriding only values explicitly passed - -- by the server configuration above. Useful when disabling - -- certain features of an LSP (for example, turning off formatting for tsserver) + -- this handles overriding only values explicitly passed + -- by the server configuration above. useful when disabling + -- certain features of an lsp (for example, turning off formatting for tsserver) server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) require('lspconfig')[server_name].setup(server) end, @@ -668,7 +668,10 @@ require('lazy').setup({ -- Disable "format_on_save lsp_fallback" for languages that don't -- have a well standardized coding style. You can add additional -- languages here or re-enable it for the disabled ones. - local disable_filetypes = { c = true, cpp = true, java = true } + local disable_filetypes = { --c = true, + cpp = true, + java = true, + } return { timeout_ms = 500, lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype], @@ -676,6 +679,7 @@ require('lazy').setup({ end, formatters_by_ft = { lua = { 'stylua' }, + c = { 'clang_format' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, -- From a5897304f26ccb3ef62cde8b2a293ab6f7349843 Mon Sep 17 00:00:00 2001 From: FunneMonkee Date: Tue, 23 Sep 2025 20:37:00 +0100 Subject: [PATCH 4/6] installed jdtls with brew --- init.lua | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/init.lua b/init.lua index be790302ef1..d5ac38a4c11 100644 --- a/init.lua +++ b/init.lua @@ -577,30 +577,7 @@ require('lazy').setup({ -- but for many setups, the lsp (`tsserver`) will work just fine -- tsserver = {}, -- - jdtls = { - cmd = { - 'java', - '-declipse.application=org.eclipse.jdt.ls.core.id1', - '-dosgi.bundles.defaultstartlevel=4', - '-declipse.product=org.eclipse.jdt.ls.core.product', - '-dlog.protocol=true', - '-dlog.level=all', - '-xmx2048m', - '--add-modules=all-system', - '--add-opens', - 'java.base/java.util=all-unnamed', - '--add-opens', - 'java.base/java.lang=all-unnamed', - '-javaagent:' .. require('mason-registry').get_package('jdtls'):get_install_path() .. '/lombok.jar', - '-jar', - '/users/lmpinto/.local/share/nvim/mason/packages/jdtls/plugins/org.eclipse.equinox.launcher_1.6.800.v20240330-1250.jar', - '-configuration', - '/users/lmpinto/.local/share/nvim/mason/packages/jdtls/config_mac', - '-data', - '/users/lmpinto/.local/share/eclipse/report-creator', - }, - root_dir = vim.fs.dirname(vim.fs.find({ 'gradlew', '.git', 'mvnw' }, { upward = true })[1]), - }, + jdtls = { cmd = { 'jdtls' } }, lua_ls = { -- cmd = {...}, @@ -670,7 +647,7 @@ require('lazy').setup({ -- languages here or re-enable it for the disabled ones. local disable_filetypes = { --c = true, cpp = true, - java = true, + -- java = true, } return { timeout_ms = 500, From 7f44b50898ae8a0368e9c75ef8f597c9a13efe4a Mon Sep 17 00:00:00 2001 From: Luis Miguel Pinto Date: Tue, 3 Dec 2024 16:05:34 +0000 Subject: [PATCH 5/6] dotnet and c# lsp, need to restore all proj first --- init.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/init.lua b/init.lua index d5ac38a4c11..bc9a508138a 100644 --- a/init.lua +++ b/init.lua @@ -578,6 +578,7 @@ require('lazy').setup({ -- tsserver = {}, -- jdtls = { cmd = { 'jdtls' } }, + omnisharp = {}, lua_ls = { -- cmd = {...}, @@ -626,6 +627,32 @@ require('lazy').setup({ end, }, + { + 'Hoffs/omnisharp-extended-lsp.nvim', + ft = 'cs', -- Only load for C# files + config = function() + require('lspconfig').omnisharp.setup { + root_dir = require('lspconfig').util.root_pattern('*.csproj', '*.sln'), + settings = { + omnisharp = { + enableEditorConfigSupport = true, -- Enable support for editorconfig + enableMsBuildLoadProjectsOnDemand = true, -- Load projects on demand (avoids excessive loading) + enableRoslynAnalyzers = false, -- Enable Roslyn analyzers + scriptFileSupport = true, -- Enable CSX script support if not needed + loggingLevel = 'debug', -- Enable debugging logs for better diagnostics + }, + }, + on_attach = function(_, bufnr) + vim.keymap.set('n', 'gd', require('omnisharp_extended').lsp_definition, { buffer = bufnr, desc = 'LSP: ' .. '[G]oto [D]efinition' }) + vim.keymap.set('n', 'gr', require('omnisharp_extended').lsp_references, { buffer = bufnr, desc = 'LSP: ' .. '[G]oto [R]eferences' }) + vim.keymap.set('n', 'gI', require('omnisharp_extended').lsp_implementation, { buffer = bufnr, desc = 'LSP: ' .. '[G]oto [I]implementation' }) + vim.keymap.set('n', 'D', require('omnisharp_extended').lsp_type_definition, { buffer = bufnr, desc = 'LSP: ' .. 'Type [D]efinition' }) + print 'OmniSharp is ready!' + end, + } + end, + }, + { -- Autoformat 'stevearc/conform.nvim', lazy = false, From 13a5153f4125d0743d1a2651378e55e61fa1a4ac Mon Sep 17 00:00:00 2001 From: Luis Miguel Pinto Date: Tue, 17 Mar 2026 11:19:16 +0000 Subject: [PATCH 6/6] omnisharp remove auto format --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index bc9a508138a..c6a2b67b5e1 100644 --- a/init.lua +++ b/init.lua @@ -640,6 +640,9 @@ require('lazy').setup({ enableRoslynAnalyzers = false, -- Enable Roslyn analyzers scriptFileSupport = true, -- Enable CSX script support if not needed loggingLevel = 'debug', -- Enable debugging logs for better diagnostics + format = { + enable = false, + }, }, }, on_attach = function(_, bufnr)