From a219fd1e96b31f2bbbf4223eea41de2992ce8da9 Mon Sep 17 00:00:00 2001 From: luokai Date: Thu, 22 Aug 2024 10:00:28 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=8E=BB=E6=8E=89=20attach=20=E6=96=B9?= =?UTF-8?q?=E5=BC=8F,=20=E6=9B=B4=E6=96=B0=E4=BD=BF=E7=94=A8=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index bcd2ef5..1c6a8b0 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,5 @@ # Java Projects -- 使用 [symbols-outline](https://github.com/simrat39/symbols-outline.nvim) 代码实现预览 -- [vscode-java-dependency](https://github.com/Microsoft/vscode-java-dependency) 提供数据支持 - -![java-deps](https://javahello.github.io/dev/nvim-lean/images/java-deps.png) - ## 安装 [English](https://github.com/JavaHello/java-deps.nvim/issues/2) @@ -24,7 +19,7 @@ ``` -- 手动编译 `vscode-java-dependency` +- 手动编译 `vscode-java-dependency` (可选) ```sh git clone https://github.com/microsoft/vscode-java-dependency.git @@ -33,7 +28,7 @@ npm install npm run build-server ``` -- 将 `vscode-java-dependency` 编译后的 `jar` 添加到 jdtls_config["init_options"].bundles 中 +- 将 `vscode-java-dependency` 的 `jar` 包添加到 jdtls_config["init_options"].bundles 中 ```lua local jdtls_config = {} @@ -56,11 +51,10 @@ jdtls_config["init_options"] = { } ``` -- 添加 attach +- 添加命令 ```lua jdtls_config["on_attach"] = function(client, buffer) - require("java-deps").attach(client, buffer) -- 添加命令 local create_command = vim.api.nvim_buf_create_user_command create_command(buffer, "JavaProjects", require("java-deps").toggle_outline, { @@ -76,3 +70,8 @@ end :lua require('java-deps').open_outline() :lua require('java-deps').close_outline() ``` + +## 参考实现 + +- 使用 [symbols-outline](https://github.com/simrat39/symbols-outline.nvim) 代码实现预览 +- [vscode-java-dependency](https://github.com/Microsoft/vscode-java-dependency) 提供数据支持 From 4393624c5bffb8dca95f63fd69765f9e782b758b Mon Sep 17 00:00:00 2001 From: luokai Date: Thu, 22 Aug 2024 10:09:59 +0800 Subject: [PATCH 2/3] MIT License --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d9b4c23 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Kai + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From a71673382be6725be20c3ff11b0ba4d8dfafa819 Mon Sep 17 00:00:00 2001 From: luokai Date: Thu, 10 Oct 2024 17:42:43 +0800 Subject: [PATCH 3/3] fix: icon --- lua/java-deps/views/icons.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/java-deps/views/icons.lua b/lua/java-deps/views/icons.lua index 706b217..7376675 100644 --- a/lua/java-deps/views/icons.lua +++ b/lua/java-deps/views/icons.lua @@ -11,13 +11,13 @@ local M = { NodeKind = { [NodeKind.Workspace] = { icon = "", hl = "Type" }, [NodeKind.Project] = { icon = "" }, - [NodeKind.PackageRoot] = { icon = "" }, - [NodeKind.Package] = { icon = "" }, + [NodeKind.PackageRoot] = { icon = "" }, + [NodeKind.Package] = { icon = "" }, [NodeKind.PrimaryType] = { icon = "󰠱" }, [NodeKind.CompilationUnit] = { icon = "" }, [NodeKind.ClassFile] = { icon = "" }, [NodeKind.Container] = { icon = "" }, - [NodeKind.Folder] = { icon = "󰉋" }, + [NodeKind.Folder] = { icon = "" }, [NodeKind.File] = { icon = "󰈙" }, }, TypeKind = { @@ -26,8 +26,8 @@ local M = { [TypeKind.Enum] = { icon = "" }, }, EntryKind = { - [PackageRootKind.K_SOURCE] = { icon = "" }, - [PackageRootKind.K_BINARY] = { icon = "" }, + [PackageRootKind.K_SOURCE] = { icon = "" }, + [PackageRootKind.K_BINARY] = { icon = "" }, }, }