-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
languages/scala: Add scala language support #399
Conversation
modules/plugins/languages/scala.nix
Outdated
inherit (lib.options) mkOption mkEnableOption; | ||
inherit (lib.nvim.dag) entryAfter; | ||
|
||
mkBinding = binding: "vim.api.nvim_buf_set_keymap(bufnr, 'n', '${binding.value}', '<cmd>lua ${binding.action}<CR>', {noremap=true, silent=true, desc='${binding.description}'})"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we're defining mkBinding
here and not using one of the binding functions from lib?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be just ignorance on my part. lsp/config.nix does a similar thing to set buffer local mappings, which is what I looked at.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've inlined this into attach_metals_keymaps
now
BTW this PR also has nvim-metals still pointing to a fork of mine, because with upstream I am getting a build error on generating helptags. I hope to get this merged scalameta/nvim-metals#693 to fix that. |
Switched back to scalameta/nvim-metals for the plugin source |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things I'd like to see changed for the sake of consistency and for documentation.
In addition, please rebase this PR on the v0.7
branch as main is currently in a feature freeze.
Adds LSP support for Scala via nvim-metals
If you could add a changelog entry, I think I can merge this later today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some more things I'd like to change, but I think I'll handle those myself in the #382 eventually.
Thanks.
Scala language support
Description
Adds basic support for Scala via nvim-metals.
This is very bare bones as of yet. It works, but metals can be configured quite extensively and none of those options are exposed via the module here yet.
Type of change
Checklist
Please try to check at least a majority of the checklist before opening your pull request. Exceptions to this will be reviewed on a case by case basis.
nix fmt
).