Skip to content

Commit 625f48f

Browse files
authored
fix: vim.lsp.buf.document_symbol returns nothing for jdtls (#449)
1 parent 389ef7c commit 625f48f

File tree

4 files changed

+23
-2
lines changed

4 files changed

+23
-2
lines changed

.devcontainer/config/nvim/init.lua

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ require('lazy').setup({
4444
vim.lsp.enable('jdtls')
4545
end,
4646
},
47+
{
48+
'ibhagwan/fzf-lua',
49+
-- optional for icon support
50+
dependencies = { 'nvim-tree/nvim-web-devicons' },
51+
-- or if using mini.icons/mini.nvim
52+
-- dependencies = { "nvim-mini/mini.icons" },
53+
---@module "fzf-lua"
54+
---@type fzf-lua.Config|{}
55+
---@diagnostics disable: missing-fields
56+
opts = {},
57+
---@diagnostics enable: missing-fields
58+
},
4759
})
4860

4961
-- Basic settings
@@ -54,6 +66,8 @@ vim.opt.tabstop = 2
5466
vim.opt.shiftwidth = 2
5567
vim.opt.expandtab = false
5668
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
69+
vim.opt.number = true
70+
vim.opt.relativenumber = true
5771

5872
local k = vim.keymap.set
5973

@@ -137,6 +151,10 @@ k('n', 'gd', function()
137151
vim.lsp.buf.definition()
138152
end, { desc = 'Terminate' })
139153

154+
k('n', '<leader>tt', function()
155+
require('fzf-lua').lsp_document_symbols()
156+
end)
157+
140158
k('n', '<leader>m', "<cmd>vnew<Cr><cmd>put = execute('messages')<Cr>")
141159

142160
k('n', '<leader>nn', '<CMD>JavaRunnerRunMain<CR>', { desc = 'Run main' })
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2+
"fzf-lua": { "branch": "main", "commit": "de0fd4a21ee29cf6532d0c3bcae08a0b25d99b6a" },
23
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
34
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
45
"nvim-dap": { "branch": "master", "commit": "5860c7c501eb428d3137ee22c522828d20cca0b3" },
6+
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
57
"spring-boot.nvim": { "branch": "main", "commit": "218c0c26c14d99feca778e4d13f5ec3e8b1b60f0" }
68
}

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"ghcr.io/duduribeiro/devcontainer-features/neovim:1": {
1212
"version": "nightly"
1313
},
14-
"ghcr.io/devcontainers-extra/features/springboot-sdkman:2": {}
14+
"ghcr.io/devcontainers-extra/features/springboot-sdkman:2": {},
15+
"ghcr.io/devcontainers-extra/features/fzf:1": {}
1516
},
1617
"postCreateCommand": "bash .devcontainer/setup.sh",
1718
"customizations": {

lua/java-core/ls/servers/jdtls/conf.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ return {
88
advancedOrganizeImportsSupport = true,
99
advancedUpgradeGradleSupport = true,
1010
classFileContentsSupport = true,
11-
clientDocumentSymbolProvider = true,
11+
clientDocumentSymbolProvider = false,
1212
clientHoverProvider = false,
1313
executeClientCommandSupport = true,
1414
extractInterfaceSupport = true,

0 commit comments

Comments
 (0)