Replies: 1 comment
-
I am not sure what is the answer here, but generally, you may check lsp-describe-session to see what is the nearest project root.
Yes.
We use the nearest workspace folder for project root. |
Beta Was this translation helpful? Give feedback.
-
I've trawled the docs but am struggling to understand how lsp-mode handles server configuration (e.g.
eslint
config) which varies per project, or even within a project in the case of a monorepo which has multiple sub-workspaces each with their own config.I understand that only one of each required type of server is started, so that even if you have (say) multiple projects all needing an eslint server, only one eslint server process is started. So hopefully the server is smart enough to figure out which files belong to which folders, and then apply the relevant config to each. But is that actually true in practice, and expected to work with lsp-mode? How can I find out which config is being used for any given file, to check that it's working correctly?
And with monorepos, presumably I have to manually add each sub-workspace as a separate folder on initial import? What about files which are in the parent folder but not in any sub-workspace? If I add the parent as a folder, is it going to break the folders for the sub-workspaces, so that files inside them are attributed to the parent folder?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions