LunarVim / lunarvim.org

🌐 Website for LunarVim
https://www.lunarvim.org
GNU General Public License v3.0
137 stars 203 forks source link

Add documentation for setting up Angular LSP #145

Closed camiloaromero23 closed 1 year ago

Uzaaft commented 2 years ago

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

camiloaromero23 commented 2 years ago

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)

Uzaaft commented 2 years ago

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

camiloaromero23 commented 2 years ago

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

Uzaaft commented 2 years ago

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

abzcoding commented 2 years ago

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

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

Uzaaft commented 2 years ago

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

Uzaaft commented 2 years ago

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 commented 2 years ago

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

abzcoding commented 2 years ago

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

sadly no 😞

camiloaromero23 commented 2 years ago

No 😒

Uzaaft commented 2 years ago

@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?

abzcoding commented 2 years ago

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.

haexyh commented 2 years ago

Can someone provide any update on this?

kylo252 commented 2 years ago

is it anything beyond this?

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

cc: @haexyh, @terr-steak

olrtg commented 1 year ago

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 commented 1 year ago

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

olrtg commented 1 year ago

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?

kylo252 commented 1 year ago

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

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 :)

olrtg commented 1 year ago

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.

vonPB commented 1 year ago

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