Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDTLS example is not quite right #128

Open
3 tasks done
s1n7ax opened this issue Oct 27, 2023 · 1 comment
Open
3 tasks done

JDTLS example is not quite right #128

s1n7ax opened this issue Oct 27, 2023 · 1 comment
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@s1n7ax
Copy link

s1n7ax commented Oct 27, 2023

Checklist

  • I have searched through the AstroNvim docs
  • I have searched through the existing issues of AstroNvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.9.4

Operating system/version

NixOs 23

Terminal/GUI

Alacritty

Describe the bug

In the example given in https://docs.astronvim.com/recipes/advanced_lsp/#java-nvim-jdtls a new folder is created every time neovim is executed. And it concatenates the cwd so a new folder will be created by the name of the cwd even if it's not a java project.

local project_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":p:h:t")
local workspace_dir = vim.fn.stdpath "data" .. "/site/java/workspace-root/" .. project_name

os.execute("mkdir " .. workspace_dir)

image

Additionally, os.execute does not work when the shell is nushell. Error of that actually visible for 200ms. I had to record and go frame by frame to read the error message. vim.fn.mkdir() probably a good alternative.

image

Steps to Reproduce

.

Expected behavior

.

Screenshots

No response

Additional Context

No response

@s1n7ax s1n7ax added the bug Something isn't working label Oct 27, 2023
@mehalter
Copy link
Member

Thanks for reporting! If you have a better solution definitely make a PR :) We are currently on a doc freeze while we prepare for the v4 release. But if you open something up or give a better solution here I can incorporate it. Also, you could take a look at the AstroCommunity java pack and see if that's a better solution. We could upstream that config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants