JavaHello / spring-boot.nvim

Neovim + Spring Boot LS
Apache License 2.0
38 stars 7 forks source link

不清楚哪里配置的不对 麻烦帮看看 #10

Open AskaJohnny opened 2 months ago

AskaJohnny commented 2 months ago
image image

vscode的插件也通过 vscode安装了

image image
JavaHello commented 2 months ago

ft 配置了 java,应该是没有加载插件, 截图打开的 yml 文件

-- 依赖了 nvim-jdtls 和 vscode-spring-boot 一般使用这个就可以了
require("spring_boot").setup()
AskaJohnny commented 2 months ago

-- 依赖了 nvim-jdtls 和 vscode-spring-boot 一般使用这个就可以了 require("spring_boot").setup()

意思是不需要 bundles 然后把ft java去掉是吗

AskaJohnny commented 2 months ago

目前我只配置require("spring_boot").setup() ft java去掉了 还是不行 日志如下

ation\n警告: Unmatched cancel notification for request id 49\n" [ERROR][2024-09-13 09:40:14] .../vim/lsp/rpc.lua:770 "rpc" "/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java" "stderr" "错误: 找不到或无 法加载主类 org.springframework.ide.vscode.boot.app.BootLanguageServerBootApp\n原因: java.lang.ClassNotFoundException: org.springframework.ide.vscode.boot.app.BootLanguag eServerBootApp\n" [ERROR][2024-09-13 09:40:19] .../vim/lsp/rpc.lua:770 "rpc" "java" "stderr" "9月 13, 2024 9:40:19 上午 org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancell ation\n警告: Unmatched cancel notification for request id 121\n" [ERROR][2024-09-13 09:40:19] .../vim/lsp/rpc.lua:770 "rpc" "/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java" "stderr" "错误: 找不到或无 法加载主类 org.springframework.ide.vscode.boot.app.BootLanguageServerBootApp\n原因: java.lang.ClassNotFoundException: org.springframework.ide.vscode.boot.app.BootLanguag eServerBootApp\n" [ERROR][2024-09-13 09:40:19] .../vim/lsp/rpc.lua:770 "rpc" "java" "stderr" "9月 13, 2024 9:40:19 上午 org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancell ation\n警告: Unmatched cancel notification for request id 130\n" [ERROR][2024-09-13 09:40:55] .../vim/lsp/rpc.lua:770 "rpc" "java" "stderr" "9月 13, 2024 9:40:55 上午 org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancell ation\n警告: Unmatched cancel notification for request id 327\n" [ERROR][2024-09-13 09:40:57] .../vim/lsp/rpc.lua:770 "rpc" "java" "stderr" "9月 13, 2024 9:40:57 上午 org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancell ation\n警告: Unmatched cancel notification for request id 361\n" [ERROR][2024-09-13 09:42:00] .../vim/lsp/rpc.lua:770 "rpc" "/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java" "stderr" "错误: 找不到或无 法加载主类 org.springframework.ide.vscode.boot.app.BootLanguageServerBootApp\n原因: java.lang.ClassNotFoundException: org.springframework.ide.vscode.boot.app.BootLanguag eServerBootApp\n" [WARN][2024-09-13 09:42:00] ...lsp/handlers.lua:135 "The language server yamlls triggers a registerCapability handler for workspace/didChangeWorkspaceFolders despite dynamicRegistration set to false. Report upstream, this warning is harmless" [WARN][2024-09-13 09:42:00] ...lsp/handlers.lua:135 "The language server yamlls triggers a registerCapability handler for workspace/didChangeConfiguration despite dy namicRegistration set to false. Report upstream, this warning is harmless" [ERROR][2024-09-13 09:42:08] .../vim/lsp/rpc.lua:770 "rpc" "/Library/Java/JavaVirtualMachines/jdk-17.jdk/Contents/Home/bin/java" "stderr" "错误: 找不到或无 法加载主类 org.springframework.ide.vscode.boot.app.BootLanguageServerBootApp\n原因: java.lang.ClassNotFoundException: org.springframework.ide.vscode.boot.app.BootLanguag eServerBootApp\n"

JavaHello commented 2 months ago

bundles

bundles 需要

require('spring_boot').setup({})

-- 添加 spring-boot jdtls 扩展 jar 包
vim.list_extend(jdtls_config.bundles, require("spring_boot").java_extensions())

启动时查看是否有加载插件

AskaJohnny commented 2 months ago
image image image

还是不太行..

JavaHello commented 2 months ago

vscode-spring-boot 更新了 1.57 版本打包方式修改了,1.56 正常,我晚一点更新一下

JavaHello commented 2 months ago

修复了 https://github.com/JavaHello/spring-boot.nvim/commit/581762aec50afb40e1d8860393d8df9c2ba4572b