-
Notifications
You must be signed in to change notification settings - Fork 298
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
WIP: full language server manager implementation #10
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
added s:on_text_document_did_open()
added s:get_default_root_uri() added s:path_to_uri()
closing in favor of #11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Do not merge. This is WIP.
After few months of break from LSP and working on asyncomplete.vim, it is time to give LSP a try again. Hopefully this time we have more servers that works on Linux, Mac and Windows and would not be disappointing like last year.
Privately I have re-implemented LSP (manager not client) multiple times but I have only made the first one open source which is what is seen in
example.vim
. Throughout this process I have actually learned a lot about lsp and differences in different server implementations as well as os differences.Here are some of the goals I have. (There are some missing features but I would like to get something usable that I can use it daily instead of trying to be a full featured LSP plugin first and never actually using it)
lsp#enable()
andlsp#disable()
lsp#log(...)
withg:lsp_log_file
autocmd lsp_setup
for lazy setuplsp#utils#find_nearest_parent_directory(path, directoryname)
lsp#utils#find_nearest_parent_file(path, filename)
lsp#register_server
. Need to support multiple servers for same file types.lsp#start_server('name', options)
.on_exit
for lsp servers.s:parse_major_version(version)
s:path_to_uri()
which works on windows with shell slash enabled and disabled as well as *nixs:get_default_root_uri()
- use cwd ifroot_uri
not specified when starting or registering the serveron_stderr
lsp#exit(name)
lsp#initialize(name, options)
- initialize request and initialized notificationlet g:lsp_enable_default_mappings = 0
CtrlP
,Unite
orDenite
as well as normal commands to it defaults to vim loclist.Here are other nice to have that is of lower priority and will most likely be in different PRs. The goal is to actually get the MVP and dog-food it and see how practical it is rather than just having bunch of features.
tsconfig.json
lsp#unregister_server
.lsp#client
to lua. The goal is not to port everything to lua, only the heavy parsing of the lsp protocol. This means if lua is supported it will use lua else fallback to vim script. Neovim recently merged lua changes so this would be interesting to see how it progresses. If the vimscript implementation is slow then I have no choice but to convert everything to lua and might only support neovim remote plugins then.