LanguageClient-neovim icon indicating copy to clipboard operation
LanguageClient-neovim copied to clipboard

Updates

Open autozimu opened this issue 8 years ago • 59 comments

(For update announcements only, please refrain from off-topic comments.)

autozimu avatar Mar 23 '17 14:03 autozimu

Rename

rename

autozimu avatar Mar 23 '17 14:03 autozimu

Hover

hover

autozimu avatar Mar 23 '17 14:03 autozimu

Goto Definition

definition

autozimu avatar Mar 23 '17 14:03 autozimu

Symbols

symbols

autozimu avatar Mar 23 '17 14:03 autozimu

Completion

completion

autozimu avatar Mar 23 '17 14:03 autozimu

Diagnostics

diagnostics

autozimu avatar Mar 23 '17 14:03 autozimu

g:LanguageClient_signColumnAlwaysOn was deprecated.

Use set signcolumn=yes instead.

autozimu avatar Aug 22 '17 17:08 autozimu

Formatting

formatting

autozimu avatar Aug 24 '17 00:08 autozimu

Default g:LanguageClient_diagnosticsDisplay has changed to

    {
        1: {
            "name": "Error",
            "texthl": "ALEError",
            "signText": "✖",
            "signTexthl": "ALEErrorSign",
        },
        2: {
            "name": "Warning",
            "texthl": "ALEWarning",
            "signText": "⚠",
            "signTexthl": "ALEWarningSign",
        },
        3: {
            "name": "Information",
            "texthl": "ALEInfo",
            "signText": "ℹ",
            "signTexthl": "ALEInfoSign",
        },
        4: {
            "name": "Hint",
            "texthl": "ALEInfo",
            "signText": "➤",
            "signTexthl": "ALEInfoSign",
        },
    }

autozimu avatar Aug 30 '17 20:08 autozimu

Code Action

tty

autozimu avatar Sep 21 '17 00:09 autozimu

New Configuration: LanguageClient_windowLogMessageLevel

g:LanguageClient_windowLogMessageLevel  *g:LanguageClient_windowLogMessageLevel*

Maximum MessageType to echoshow messages from window/logMessage.

MessageType >
    export namespace MessageType {
        /**
         * An error message.
         */
        export const Error = 1;
        /**
         * A warning message.
         */
        export const Warning = 2;
        /**
         * An information message.
         */
        export const Info = 3;
        /**
         * A log message.
         */
        export const Log = 4;
    }

Default: "Warning"
Valid options: "Error" | "Warning" | "Info" | "Log"

autozimu avatar Oct 15 '17 00:10 autozimu

vim support is added in #151.

autozimu avatar Oct 25 '17 22:10 autozimu

Announcement and Breaking Changes

Master branch is deprecated. Please switch to branch next if possible. All of the functionalities should behave exactly as previously, only

  1. more performant and more robust
  2. better support for vim
  3. no more dependant on python

File an issue if it isn't the case.

Default branch is set to next. So new installation will be using branch next by default.

autozimu avatar Dec 10 '17 04:12 autozimu

This is awesome that you no longer rely on python!

I did notice that you download upon install. That's going to make it hard to use this within certain corporate settings. Is it possible for you to make releases that have the necessary binaries included within them? (Vim Plug allows specifying a branch/release I believe).

jordwalke avatar Dec 10 '17 10:12 jordwalke

The main concern is that committing in binary blobs will explode the repo pretty quickly.

Besides the install script, there are also two alternatives,

  • build the repo with make release
  • download the corresponding binary manually and place it as bin/languageclient, which is exactly the same as install script does.

Not sure if this answers your question. And let me know if there are any better solutions.

autozimu avatar Dec 10 '17 17:12 autozimu

You can have the master branch download on the fly when you install the master branch, but then you can also publish versions of the plugin that have the prebuilt artifacts inside the repo, in your "releases" page. Vim-plug should also allow depending on releases as well. I think you do so like this:

Plug 'autozimu/LanguageClient-neovim', { 'tag': 'release-1.2.3-bin-darwin' }

That would give corporate users the option of just depending on the tagged release for their platform. I think it would actually be better for most users (even outside of corporate environments)

jordwalke avatar Dec 11 '17 05:12 jordwalke

I did notice that you download upon install. That's going to make it hard to use this within certain corporate settings. Is it possible for you to make releases that have the necessary binaries included within them? (Vim Plug allows specifying a branch/release I believe).

Could someone somewhere explain why there was a switch to the rust solution compared to python? I can imaging some people are also unhappy about downloading "random" binary blobs that they did not verify. Maybe adding a "manual-install.sh" file as an alternative to call in vim-plug etc, which compiles from source, documented in the readme, would also be a nice option.

languitar avatar Dec 11 '17 10:12 languitar

I would suggest two modes: One that includes prebuilt binaries in the releases page, One that builds them from scratch on the fly upon installation?

jordwalke avatar Dec 11 '17 12:12 jordwalke

Note added to build locally. https://github.com/autozimu/LanguageClient-neovim/commit/379d42eb0b6c8eaab12c234e3ad235fe6312febc

autozimu avatar Dec 11 '17 17:12 autozimu

As I mentioned before, if we commit in binary blobs into repo, since every release (combining every platforms) is 20Mb, with 50 releases, they are going to be 1Gb increase of repo size, which I believe is not a practical thing.

autozimu avatar Dec 11 '17 17:12 autozimu

You only really need to keep the most recent n releases lying around per platform, right? Github accepts individual artifacts up to 100MB in the repo. We do this for reason-cli for much larger artifacts and it works well. You can create a separate repo just for releases of LanguageClient-neovim if you don't want to have to use special git commands to avoid pulling in large artifacts while developing locally.

jordwalke avatar Dec 11 '17 23:12 jordwalke

It's not possible to delete blobs from the repo once you've pushed them. They stay part of the git history forever.

tbodt avatar Dec 12 '17 00:12 tbodt

@tbodt are you sure about that? I believe you can delete their tags, which orphans them. Doesn't github have some kind of a collection process?

jordwalke avatar Dec 12 '17 01:12 jordwalke

@jordwalke not if the commits are still reachable, which they would be if this was done the obvious way

tbodt avatar Dec 12 '17 01:12 tbodt

You can push the deletion of a specific tag from the command line, which makes the commits unreachable. Were you aware of that? Doesn't that solve the problem? It's what I've been doing.

jordwalke avatar Dec 12 '17 01:12 jordwalke

I'm aware, but if, say, there was a commit tagged 1.0, and that commit is reachable from master, deleting the tag does nothing.

tbodt avatar Dec 12 '17 01:12 tbodt

@jordwalke Can you elaborate on the approach? If there are already binaries, how could I commit them into the main repo without significantly increase .git size?

As far as I understand, artifacts in releases page are separate from main repo.

autozimu avatar Dec 12 '17 01:12 autozimu

When you do a release, don't tag the final commit as the release. Instead make a new branch off of the final commit, make a commit to that branch adding the binaries, and then tag that commit and delete the branch.

That way, when you delete the tag, the commit with the binaries is no longer reachable and will be deleted. This is a real pain to manage properly though.

tbodt avatar Dec 12 '17 01:12 tbodt

@tbodt Yes, that is how you do it so that master (or any other branch) never has a release in its history. Then deleting old release tags properly orphans them. It's not a pain to manage though. It's just a git command from the command line to delete a tag and push the deletion.

jordwalke avatar Dec 12 '17 01:12 jordwalke

Whenever you tag a commit and push the tag to github, github automatically creates a convenient download link in the releases page that is just a tar/zip at that commit - but with none of the git history. This is what vim-plug should be using when you specify:

Plug 'autozimu/LanguageClient-neovim', { 'tag': 'release-1.2.3-bin-darwin' }

That's how npm dependencies on tags work as well.

Here's how you push a deletion of a remote tag

@tbodt I don't understand what is so difficult about this release workflow. It's not difficult to avoid releases being in master's history - you would really have to go out of your way to put giant build artifacts in master's history.

jordwalke avatar Dec 12 '17 01:12 jordwalke

You'd typically have some script like release.sh 1.2.3 or make release 1.2.3, which runs the build so that the build artifacts appear as if they had been built at the time of installing the plugin, then the release script does something like:

git add allTheArtifacts
git commit -m "release 1.2.3-bin-darwin"
git tag 1.2.3-bin-darwin
git push origin 1.2.3-bin-darwin

(assuming you are on OSX). The tag references a single commit that contains the build artifacts, with the master branch as its parent commit, and master doesn't have 1.2.3-bin-darwin's single commit in its history. That way if you ever need to delete the tag, it will be properly orphaned. This isn't necessarily going out of the way to do releases like this - it's pretty much the process you'd stumble upon without really trying, in my experience.

jordwalke avatar Dec 12 '17 01:12 jordwalke

I see. This is genius! Will try on this model. Thanks.

autozimu avatar Dec 12 '17 02:12 autozimu

@jordwalke the problem is that even if this isn't reachable from master you need to download ALL binaries from GitHub even if you do not care about built releases. And let's be honest, what is the difference between downloading random blob via HTTPS using Git and downloading random blob via HTTPS using wget/curl?

hauleth avatar Dec 30 '17 21:12 hauleth

The difference is when the download happens. If it is modeled as an actual Plugin dependency then it can be automatically snapshotted easily and uses in corporate environments. If needed you could create a separate repo just for the releases. But even in the worst case this only effects the developers of the plugin because if you depend on a specific GitHub release, GitHub constructs links for them that bypass all git history and only include that single binary for that specific version. Check the tar.gz for reason-cli releases for example.

jordwalke avatar Dec 30 '17 21:12 jordwalke

The recommended installation has changed

-Plug 'autozimu/LanguageClient-neovim', {'tag': 'binary-*-x86_64-apple-darwin' }
+Plug 'autozimu/LanguageClient-neovim', {
+    \ 'branch': 'next',
+    \ 'do': 'install.sh',
+    \ }

The reason is that tagged release doesn't work very well in vim-plug,

  1. In initial installation, it fetches all tags.
  2. In :PlugUpdate, it won't fetch new tags not in current branch.

autozimu avatar Jan 05 '18 19:01 autozimu

Sad!

jordwalke avatar Jan 06 '18 12:01 jordwalke

Note that the tag based installation is still supported by this repo. It’s just not the recommended approach until the mentioned vim-plug issue is fixed.

On Sat, Jan 6, 2018 at 04:34 Jordan W [email protected] wrote:

Sad!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/autozimu/LanguageClient-neovim/issues/35#issuecomment-355744184, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYt7-Y4ZeHp0oa134R_mp8iwsEZdMaXks5tH2hogaJpZM4MmzQ8 .

autozimu avatar Jan 06 '18 19:01 autozimu

Does specifying a commit work reliably?

jordwalke avatar Jan 06 '18 23:01 jordwalke

I believe so. But that will require update commit SHA manually.

On Sat, Jan 6, 2018 at 15:42 Jordan W [email protected] wrote:

Does specifying a commit work reliably?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/autozimu/LanguageClient-neovim/issues/35#issuecomment-355786682, or mute the thread https://github.com/notifications/unsubscribe-auth/ABYt7-fblgMh5-mmL0HLhwPEK996Iz4eks5tIATggaJpZM4MmzQ8 .

autozimu avatar Jan 06 '18 23:01 autozimu

New configuration g:LanguageClient_loggingFile

https://github.com/autozimu/LanguageClient-neovim/blob/9a316ef9f044674724b44cd162f3996113ea4861/doc/LanguageClient.txt#L184-L189

autozimu avatar Jun 17 '18 01:06 autozimu

New configuration g:LanguageClient_serverStderr

https://github.com/autozimu/LanguageClient-neovim/blob/e5e44f21ba3fb027676df5619c62caf6e4939a5c/doc/LanguageClient.txt#L198-L203

autozimu avatar Jun 20 '18 02:06 autozimu

New configuration g:LanguageClient_diagnosticsSignsMax

https://github.com/autozimu/LanguageClient-neovim/blob/bb733ef7ff87328426cf00ab517495ea45d90cdf/doc/LanguageClient.txt#L108-L113

autozimu avatar Jul 03 '18 17:07 autozimu

New function LanguageClient#explainErrorAtPoint to show detailed error under cursor. https://github.com/autozimu/LanguageClient-neovim/blob/5e968547dea733a25de74c1f9babd9e77459598a/doc/LanguageClient.txt#L553-L556

image

autozimu avatar Aug 20 '18 04:08 autozimu

For the new toggled panel, I suggest incorporating my implementation of panel toggling which does not disrupt the current window positions (in that way it's more like an overlay): https://github.com/jordwalke/VimBox/blob/25cf2ff2a2433804bba724873cd27a4225850af9/dotVim/pluginRc/toggly/togglyVimRc

jordwalke avatar Aug 20 '18 08:08 jordwalke

New function LanguageClient#debugInfo to print out debug info.

https://github.com/autozimu/LanguageClient-neovim/blob/542203b6aa435b93a21e123b2177b18cd1a1a8ed/doc/LanguageClient.txt#L567-L570

autozimu avatar Aug 28 '18 03:08 autozimu

Default g:LanguageClient_diagnosticsDisplay has changed to

    {
        1: {
            "name": "Error",
            "texthl": "ALEError",
            "signText": "✖",
            "signTexthl": "ALEErrorSign",
        },
        2: {
            "name": "Warning",
            "texthl": "ALEWarning",
            "signText": "⚠",
            "signTexthl": "ALEWarningSign",
        },
        3: {
            "name": "Information",
            "texthl": "ALEInfo",
            "signText": "ℹ",
            "signTexthl": "ALEInfoSign",
        },
        4: {
            "name": "Hint",
            "texthl": "ALEInfo",
            "signText": "➤",
            "signTexthl": "ALEInfoSign",
        },
    }

I am trying to setup nvim + LanguageClient-neovim + rls. Overall it seems to work quite good. But in your screenshots I can see that it should be possible to setup nvim, to underline warnings or errors. So far my setup only shows ⚠ or ✖ on the left most column. I am missing the underlined errors, which seems to be valuable information.

ccb23 avatar Sep 17 '18 19:09 ccb23

rustDocument/implementations was removed #655.

rustDocument/implementations was removed from rls back in July - at this commit. It now uses the standard textDocument/implementation.

autozimu avatar Nov 09 '18 15:11 autozimu

Event LanguageClientBufReadPost was renamed to LanguageClientTextDocumentDidOpenPost to make it more accurate. @https://github.com/autozimu/LanguageClient-neovim/commit/810aebe9a4824cf7c22b0208322cddd398d9ca3d

autozimu avatar Nov 13 '18 04:11 autozimu

Heuristic snippet support is updated so that only neosnippet is equal to true, https://github.com/autozimu/LanguageClient-neovim/commit/657ad707d8732fc5a2139224cb00132880455904

For details, see https://github.com/autozimu/LanguageClient-neovim/issues/379 and https://github.com/autozimu/LanguageClient-neovim/issues/396

autozimu avatar Jan 29 '19 02:01 autozimu

Neovim virtual text is supported. Of course with option to turn it off if you'd like https://github.com/autozimu/LanguageClient-neovim/blob/273e5dc44cf1f860e40999ee47ad9cb214ffd94c/doc/LanguageClient.txt#L343-L348

To customize the highlight group to use for virtual text, https://github.com/autozimu/LanguageClient-neovim/blob/273e5dc44cf1f860e40999ee47ad9cb214ffd94c/doc/LanguageClient.txt#L103

autozimu avatar Jan 30 '19 04:01 autozimu

Hover content will be displayed in a floating window whenever possible (implemented in neovim 0.4.0). Thanks to @rhysd. Call hover twice to switch into the floating window.

If you want to disable this behaviour, https://github.com/autozimu/LanguageClient-neovim/blob/c33c45dd8384c0a0dfe8e99c558415b5c656d5c8/doc/LanguageClient.txt#L350-L358

For more details, see https://github.com/autozimu/LanguageClient-neovim/pull/767

autozimu avatar Mar 27 '19 02:03 autozimu

First of all, I'm really impressed with how much more pleasure I have reading docs from floating window! Thank you @rhysd and @autozimu for it! Great job!

Also I found that new implementation of floating window doesn't work as expected if vim is configured to persist&load views for all files, like:

au BufWinLeave,BufLeave * silent! mkview
au BufWinEnter * silent! loadview

This can be fixed in many different ways, but I came up with this one for now:

au BufWinLeave,BufLeave * if @% != '__LanguageClient__' | silent! mkview
au BufWinEnter * if @% != '__LanguageClient__' | silent! loadview

Hopefully this will be useful for someone.

P.S. Would be nice to configure '__LanguageClient__' buffer to not write views somehow, but I wasn't able to figure this out yet.

saks avatar Mar 31 '19 02:03 saks

@saks Thank you for the point and sharing the solution. Perhaps checking buftype option might be more generic solution. buftype=nofile is set to buffer which does not represent a file buffer.

au BufWinLeave,BufLeave * if &buftype != 'nofile' | silent! mkview | endif
au BufWinEnter * if &buftype != 'nofile' | silent! loadview | endif

Not working :mksession on floating window may be a bug of Neovim but I'm not sure since I'm usually not using session.

rhysd avatar Apr 01 '19 05:04 rhysd

Thank you @rhysd, this works like a charm!

saks avatar Apr 01 '19 17:04 saks

Release 0.1.156 contains breaking changes regarding setting g:LanguageClient_useVirtualText. Valid options are updated from boolean value to enum. Checkout corresponding documentation if you're affected, https://github.com/autozimu/LanguageClient-neovim/blob/fb02afed15363c8879277b413b89e6ca51589e6a/doc/LanguageClient.txt#L343-L348

autozimu avatar Jan 21 '20 02:01 autozimu

any plans to support function signature display upon autocompletion?

zoj613 avatar Oct 24 '20 11:10 zoj613

@zoj613 not sure what you mean. If what you are looking for is the plugin placing placeholders for the parameters of the function it suggested in autocompletion that can already be done (with the help of a snippet plugin). If you can describe this a little better and open an issue I think it would be a better place to discuss it.

martskins avatar Oct 24 '20 11:10 martskins

@zoj613 not sure what you mean. If what you are looking for is the plugin placing placeholders for the parameters of the function it suggested in autocompletion that can already be done (with the help of a snippet plugin). If you can describe this a little better and open an issue I think it would be a better place to discuss it. img I meant something like getting a preview window displaying the autocompleted function's signature to help fill out arguments during editing.

zoj613 avatar Oct 24 '20 11:10 zoj613

Ok so you mean something like #196. If you want we can continue the discussion about that on that issue, but yeah, it's on our TODO list.

martskins avatar Oct 25 '20 00:10 martskins