lunarvim.org icon indicating copy to clipboard operation
lunarvim.org copied to clipboard

Add documentation for setting up Angular LSP

Open camiloaromero23 opened this issue 3 years ago β€’ 15 comments

camiloaromero23 avatar Dec 06 '21 14:12 camiloaromero23

I`ll work on this. Should we consider Angular as its own language(like we do vue) or should it be underneath Typescript?

Uzaaft avatar Dec 17 '21 09:12 Uzaaft

I think it should be as it is worked with vue, as far as I know, angular has its own language server (like vue). I think it is called angularls (Correct me if I'm wrong)

camiloaromero23 avatar Dec 17 '21 18:12 camiloaromero23

But unlike Vue Angular files are normal typescript files. Vue files have their own file extension

Uzaaft avatar Dec 18 '21 09:12 Uzaaft

You got a point, but usually, Angular files end up with file.component.[ts,html,css]. For tests file.component.spec.ts and for the modules file.module.ts. So I think it is better to split up Angular from typescript because if I want to code in typescript itself, most of the time I don't want angularls to start. I don't think you're wrong but I also got a point

camiloaromero23 avatar Dec 19 '21 17:12 camiloaromero23

@kylo252 @abzcoding Any thoughts about the topic before I write the docs?

Uzaaft avatar Dec 19 '21 20:12 Uzaaft

@kylo252 @abzcoding Any thoughts about the topic before I write the docs?

i'd appreciate it :) nothing else , tyvm <3

abzcoding avatar Dec 19 '21 20:12 abzcoding

I guess a separate section it is. Opening a PR ASAP

Uzaaft avatar Dec 19 '21 20:12 Uzaaft

Anyone who has a current config where angularls starts in an Angular project? Could not get it to start automatically with zero config beside :lspinstall angularls

Uzaaft avatar Dec 20 '21 16:12 Uzaaft

@abzcoding @camiloaromero23 Do you guys have a current confign where the angularls lsp starts in an Angular project?

Uzaaft avatar Dec 22 '21 12:12 Uzaaft

@abzcoding @camiloaromero23 Do you guys have a current confign where the angularls lsp starts in an Angular project?

sadly no 😞

abzcoding avatar Dec 22 '21 12:12 abzcoding

No 😒

camiloaromero23 avatar Dec 22 '21 13:12 camiloaromero23

@abzcoding I think I figured out why it didn't start. Could it be because the tsserver is prioritised higher than the angularls server? image Or because it is overridden?

Uzaaft avatar Jan 11 '22 10:01 Uzaaft

If a server is in the override list, you have to set up and call it explicitly. I don’t think there is any other priority.

abzcoding avatar Jan 11 '22 12:01 abzcoding

Can someone provide any update on this?

haexyh avatar Aug 15 '22 19:08 haexyh

is it anything beyond this?

local opts = {}
require'lvim.lsp.manager'.setup("angularls", opts)

cc: @haexyh, @terr-steak

kylo252 avatar Aug 20 '22 09:08 kylo252

is it anything beyond this?

local opts = {}
require'lvim.lsp.manager'.setup("angularls", opts)

cc: @haexyh, @terr-steak

Yeah, as far as I remember it was much more than that.. even projects before Ivy were using a different version of the lsp.. vscode handles this for the user with the Angular extension. And also if I'm not mistaken a project for example with Angular 12 should also use the lsp in v12.x.x. I remember giving up on this in march of this year πŸ˜“ . But who knows.. maybe I'm just dumb haha

olrtg avatar Oct 16 '22 20:10 olrtg

@kylo252 can you assign this to me though? I'd like to give this a try once again.

olrtg avatar Oct 16 '22 20:10 olrtg

is it anything beyond this?

local opts = {}
require'lvim.lsp.manager'.setup("angularls", opts)

cc: @haexyh, @terr-steak

Well.. it seem to work just with this πŸ˜… Now, there will be probably some problems still with projects pre Ivy (< v9, released in 2020) due to this https://github.com/neovim/nvim-lspconfig/issues/1155#issuecomment-900850735

About the docs.. @kylo252 should I put this documentation inside the "Languages" category? Asking because Angular is not a programming language πŸ‘€ or should I add a new "Frameworks" category and maybe move Vue with it?

olrtg avatar Oct 19 '22 02:10 olrtg

Now, there will be probably some problems still with projects pre Ivy (< v9, released in 2020) due to this https://github.com/neovim/nvim-lspconfig/issues/1155#issuecomment-900850735

here are some problems we need to address in the docs

  • how about the interaction with tsserver, does it need to be disabled?
  • what about css servers?
  • anything useful that null-ls can provide?

About the docs.. @kylo252 should I put this documentation inside the "Languages" category? Asking because Angular is not a programming language πŸ‘€ or should I add a new "Frameworks" category and maybe move Vue with it?

this seems like a question for @ChristianChiarulli and @vonPB :)

kylo252 avatar Oct 19 '22 06:10 kylo252

here are some problems we need to address in the docs

  • how about the interaction with tsserver, does it need to be disabled?
  • what about css servers?
  • anything useful that null-ls can provide?

@kylo252 tsserver should be enabled since you'll still using typescript.. AFAIK angularls gives completion for component templates, so in reality angularls will be working most of the time with the html lsp.

In terms of css Angular can use plain css, a pre-processor like SASS or something else like tailwindcss.. or what is your question?

For null-ls nothing that I know of. You can still format your code with all the tools used for regular javascript projects or use something like eslint for linting.

olrtg avatar Oct 19 '22 17:10 olrtg

Since we got more than just Angular as a framework, I wouldn't mind having an additional frameworks page :)

vonPB avatar Oct 19 '22 20:10 vonPB