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

feat(pack/java): add Java Language Pack #86

Merged
merged 135 commits into from
Mar 18, 2023
Merged

Conversation

sjcobb2022
Copy link
Contributor

Closes #75

Hi There,

Spent a part of the week making the java pack. The commit tree is really messy as I was using a git reference to the package to test it (probs not the best idea).

The package adds quite a few things so I'll list them here

  • Adds java treesitter parsers
  • Adds html treesitter parsers (XML)
  • Adds jdtls language server
  • Adds lemminx language server (XML)
  • Adds nvim-jdtls for language specific tooling
  • Adds clang_format through null-ls
  • Adds javadbg and javatest debug adapters for nvim-dap

@sjcobb2022 sjcobb2022 changed the title Add Java Language Pack feat(pack/java): add Java Language Pack Mar 18, 2023
Copy link
Member

@mehalter mehalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for this! I made a couple comments to help the linter not be angry with you. Also please make sure to format the files with stylua and not the Lua language server, that way the style checks can pass as well

lua/astrocommunity/pack/java/java.lua Outdated Show resolved Hide resolved
lua/astrocommunity/pack/java/java.lua Outdated Show resolved Hide resolved
@mehalter
Copy link
Member

We can resolve the git commits history with squash/merge as well so no worries about that

@sjcobb2022
Copy link
Contributor Author

@mehalter Fixed!

Copy link
Member

@mehalter mehalter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Very close now, just the stylua on the file to pass the formatting checker. Just make sure you aren't using the Lua language servers for formatting and only using stylua

@sjcobb2022
Copy link
Contributor Author

Thanks! Very close now, just the stylua on the file to pass the formatting checker. Just make sure you aren't using the Lua language servers for formatting and only using stylua

Yeh sorry I just used github to edit.

@mehalter mehalter merged commit f91eb2f into AstroNvim:main Mar 18, 2023
@mehalter
Copy link
Member

Thanks so much @sjcobb2022 !

owittek pushed a commit to owittek/astrocommunity that referenced this pull request Mar 25, 2023
* initial commit

* debugging

* attach jdtls

* back to basics

* setup debugging

* parsing opts test

* pass opts to start_or_attach

* remove ft as test

* add notif message

* removed root_dir temporarily

* use .project as a root marker for eclipse projects

* added server

* test jdtls without blocking

* workspace dir notify

* working...

* forgot skip_setup

* identified issue

* try attaching ft

* setup server

* add autocmd

* server config

* manually add ft

* don't provide cmd

* view default settings

* try lsp method

* put test notify

* back to old method

* notify default config

* only print messsage

* default opts

* list commands

* default thing

* try again

* remove accidental changes

* try with default config again

* callbacks

* It don't load plugin

* rm ensure installed

* attempt 2

* comment out for now

* use setup handler?

* don't block stopping

* reformatting

* reference self

* add a dependency

* use setup_handlers from mason-lspconfig

* add to skip_setup again

* verify attach with callback

* change dependencies around

* more comments

* only necessary messages

* remove ignore again

* root_dir as string?

* try require mason-lspconfig

* skip jdtls setup

* dump opts

* if opts_ null

* attach server

* begin dependencies again

* convert

* print

* not attaching correctly

* dump opts

* custom on_attach

* lsp.opn_attach

* removed dependencies from mason-lspconfiog

* inspect server_capabilities

* pass bufnr as well

* add error log messages and fix os detection

* fix floor in logic

* add clang_format with null0ls

* allow user extensibility

* other way round

* gen opts

* return opts

* inspect opts

* insert unique print

* wrap in table

* print root_dir

* inspect opts in config

* opts

* error with merge

* list unique

* test

* test2

* deep extend

* set opts

* return opts again

* functional

* remove debug printing

* cleanup and comments

* try get java-debug-adapter install_path

* try javadbg

* javadbg does not work

* added java-test

* fix debug adapters

* print bundles for debugging

* reformat bundles

* inline

* add dap

* don't pass func unto setup_dap

* dap print

* else

* print test

* notify

* add util

* setup dap before attach

* setup_dap in autocmd

* setup_dap_main_class_configs is required. use in autocmd

* add to on_attach anyway

* set autocmd for LspAttach

* wrong function location

* test options for placement

* add autocmd into on_attach to access buff

* insepct args buf

* move attach again

* remove err

* add debugging

* utilSSS

* print proper

* more debugging

* try matching pattern properly

* try printing name of buf

* pattern list?

* general pattern for ft

* move to config

* autocmd pos

* Complete Debugging

* ensure client is jdtls

* add comments

* update README

* pass lint

* use stylua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Java Language Pack
2 participants