LazyVim icon indicating copy to clipboard operation
LazyVim copied to clipboard

fix(extras.lang): fix Scala extra by using nvimMetals only

Open linux-root opened this issue 1 year ago • 2 comments

Description

Scala lang Extra should NOT be configured via neovim/nvim-lspconfig. This PR removes neovim/nvim-lspconfig config and replace it by nvim-metals only. From nvim-metals README.md: "NOTE: This plugin works without needing to install neovim/nvim-lspconfig. If you have it installed for other languages, that's not a problem, but make sure you do not have Metals configured through nvim-lspconfig while using this plugin"

Related Issue(s)

No specific issue, this is attempt to follow users guide of Scala nvim plugin : https://github.com/scalameta/nvim-metals

Screenshots

Checklist

linux-root avatar Mar 04 '25 19:03 linux-root

I was confused at first time using scala extras too, then I found:

https://github.com/LazyVim/LazyVim/blob/859646f628ff0d99e6afe835ba0a48faed2972af/lua/lazyvim/plugins/extras/lang/scala.lua#L68-L68

https://github.com/LazyVim/LazyVim/blob/0b6d1c00506a6ea6af51646e6ec7212ac89f86e5/lua/lazyvim/plugins/lsp/init.lua#L100-L108

https://github.com/LazyVim/LazyVim/blob/0b6d1c00506a6ea6af51646e6ec7212ac89f86e5/lua/lazyvim/plugins/lsp/init.lua#L200-L202

It's not configured via neovim/nvim-lspconfig I think. I'm not sure why it configured in neovim/nvim-lspconfig, may be for capabilities of cmp/blink and other stuff.

qw457812 avatar Mar 08 '25 04:03 qw457812

This PR is stale because it has been open 30 days with no activity.

github-actions[bot] avatar Apr 08 '25 02:04 github-actions[bot]

Hi @folke, May I know if we need any further review to merge this PR? It's been here for quite a long time

linux-root avatar May 25 '25 13:05 linux-root

This PR is stale because it has been open 30 days with no activity.

github-actions[bot] avatar Jun 25 '25 02:06 github-actions[bot]

After update, looks like the file type can't trigger metal lsp. Hope this will be solve asap

C1oud555 avatar Sep 19 '25 12:09 C1oud555

After update, looks like the file type can't trigger metal lsp. Hope this will be solve asap

I'll verify this. Do you have any additional config related to metals?

linux-root avatar Sep 19 '25 12:09 linux-root

After update, looks like the file type can't trigger metal lsp. Hope this will be solve asap

I think the cause could be Telescope is missing, will look into it soon

linux-root avatar Sep 19 '25 12:09 linux-root

After update, looks like the file type can't trigger metal lsp. Hope this will be solve asap

I'll verify this. Do you have any additional config related to metals?

Just the latest LazyVim without any config about metals or scala. If I open a scala file with nvim a/b/c.scala under a mill project, this lsp can't be triggered. If I open the directiry nvim . with oil.nvim and then navigate to the file and open it, lsp get triggered.

C1oud555 avatar Sep 19 '25 12:09 C1oud555

After update, looks like the file type can't trigger metal lsp. Hope this will be solve asap

I'll verify this. Do you have any additional config related to metals?

Just the latest LazyVim without any config about metals or scala.

If I open a scala file with nvim a/b/c.scala under a mill project, this lsp can't be triggered.

If I open the directiry nvim . with oil.nvim and then navigate to the file and open it, lsp get triggered.

oh, I got it. This PR is not merged yet so the issue you faced is not related to this PR

linux-root avatar Sep 19 '25 13:09 linux-root