Skip to content
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

Show method signature when writing the arguments of the method #214

Closed
amol-mandhane opened this issue Dec 19, 2017 · 5 comments
Closed
Assignees

Comments

@amol-mandhane
Copy link
Contributor

When writing the arguments of the method, textDocument/hover method doesn't apply and there's no documentation available. However, textDocument/signatureHelp is meant exactly for this use-case. LSP client should show the signature when writing the arguments.

signatureHelp method: https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#textDocument_signatureHelp

@amol-mandhane
Copy link
Contributor Author

I have a local change for this. If the idea sounds okay, I can send a pull request.

@vibhavp
Copy link
Member

vibhavp commented Dec 19, 2017

Sure, thanks. I'll add a few customize options to your PR and make it work with SignatureHelpRegistrationOptions.triggerCharacters, if it isn't already using it.

@tam5
Copy link

tam5 commented Dec 12, 2018

What is the status of this, it doesn't seem to work as far as I can tell, but it looks like there is already some code in. Any clues towards the next step?

@yyoncho
Copy link
Member

yyoncho commented Dec 12, 2018

I believe that it does not work the the optimal way. If I recall correctly you should select hover or signature but I believe that the decision should be made by the signature trigger characters that are in initialization options.

@yyoncho yyoncho closed this as completed Dec 12, 2018
@yyoncho yyoncho reopened this Dec 12, 2018
@yyoncho yyoncho self-assigned this Dec 15, 2018
yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Dec 16, 2018
Fixes emacs-lsp#214

- Changed eldoc message to display signature when it is present.

- Replaced the message calls with lsp-message which preserves the eldoc message.
At some point we may create separate buffer which will display the
@yyoncho
Copy link
Member

yyoncho commented Dec 16, 2018

@tam5 PR at #544

yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Dec 16, 2018
Fixes emacs-lsp#214

- Changed eldoc message to display signature when it is present.

- Replaced the message calls with lsp-message which preserves the eldoc message.
At some point we may create separate buffer which will display the
yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Dec 17, 2018
Fixes emacs-lsp#214

- Changed eldoc message to display signature when it is present.

- Replaced the message calls with lsp-message which preserves the eldoc message.
At some point we may create separate buffer which will display the
yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Dec 17, 2018
Fixes emacs-lsp#214

- Changed eldoc message to display signature when it is present.

- Replaced the message calls with lsp-message which preserves the eldoc message.
At some point we may create separate buffer which will display the
yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Dec 17, 2018
Fixes emacs-lsp#214

- Changed eldoc message to display signature when it is present.

- Replaced the message calls with lsp-message which preserves the eldoc message.
At some point we may create separate buffer which will display the
yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Dec 17, 2018
Fixes emacs-lsp#214

- Changed eldoc message to display signature when it is present.

- Replaced the message calls with lsp-message which preserves the eldoc message.
At some point we may create separate buffer which will display the
yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Dec 19, 2018
- added `lsp-auto-require-clients` to remove the need to require lsp-clients.
  When set to t(default) it will autorequire lsp-clients.

- `lsp` command ignores the clients which binary is not present.

- `lsp` no longer throws an error when there is no client installed

- `lsp` will ask which client to power on if there are multiple clients for a
  single mode present(also if their binary is available). This will happen each
  time you open a new file. In order to disable that you will have to remove the
  server that you do not want to run from `lsp-clients`. Later, when we solve
  emacs-lsp#405 we will be able to specify per project preferences like: ProjectA uses
  ccls, projectB uses clangd.

- If you want your client to run in parallel with other server you will have to
  specify `:add-on?` = t when registering the client.

- added 3 different message `lsp--info`, `lsp--warn` and `lsp--error`

- cleanup
- fixed support for tcp LANGUAGE server which apparently works only on Linux.

``` example registration
(lsp-register-client
 (make-lsp-client :new-connection (lsp-tcp-connection
                                   (lambda (port)
                                     `("php"
                                       ,(expand-file-name "~/.composer/vendor/felixfbecker/language-server/bin/php-language-server.php")
                                       ,(format "--tcp-server=localhost:%s" port)
                                       "--memory-limit=4095M")))
                  :major-modes '(php-mode)
                  :server-id 'php-ls))
```

- Implemented signature handling in single method.

Fixes emacs-lsp#214

- Changed eldoc message to display signature when it is present.

- Replaced the message calls with lsp-message which preserves the eldoc message.
At some point we may create separate buffer which will display the
yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Dec 20, 2018
- added `lsp-auto-require-clients` to remove the need to require lsp-clients.
  When set to t(default) it will autorequire lsp-clients.

- `lsp` command ignores the clients which binary is not present.

- `lsp` no longer throws an error when there is no client installed

- `lsp` will ask which client to power on if there are multiple clients for a
  single mode present(also if their binary is available). This will happen each
  time you open a new file. In order to disable that you will have to remove the
  server that you do not want to run from `lsp-clients`. Later, when we solve
  emacs-lsp#405 we will be able to specify per project preferences like: ProjectA uses
  ccls, projectB uses clangd.

- If you want your client to run in parallel with other server you will have to
  specify `:add-on?` = t when registering the client.

- added 3 different message `lsp--info`, `lsp--warn` and `lsp--error`

- cleanup
- fixed support for tcp LANGUAGE server which apparently works only on Linux.

``` example registration
(lsp-register-client
 (make-lsp-client :new-connection (lsp-tcp-connection
                                   (lambda (port)
                                     `("php"
                                       ,(expand-file-name "~/.composer/vendor/felixfbecker/language-server/bin/php-language-server.php")
                                       ,(format "--tcp-server=localhost:%s" port)
                                       "--memory-limit=4095M")))
                  :major-modes '(php-mode)
                  :server-id 'php-ls))
```

- Implemented signature handling in single method.

Fixes emacs-lsp#214

- Changed eldoc message to display signature when it is present.

- Replaced the message calls with lsp-message which preserves the eldoc message.
At some point we may create separate buffer which will display the
yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Dec 20, 2018
- added `lsp-auto-require-clients` to remove the need to require lsp-clients.
  When set to t(default) it will autorequire lsp-clients.

- `lsp` command ignores the clients which binary is not present.

- `lsp` no longer throws an error when there is no client installed

- `lsp` will ask which client to power on if there are multiple clients for a
  single mode present(also if their binary is available). This will happen each
  time you open a new file. In order to disable that you will have to remove the
  server that you do not want to run from `lsp-clients`. Later, when we solve
  emacs-lsp#405 we will be able to specify per project preferences like: ProjectA uses
  ccls, projectB uses clangd.

- If you want your client to run in parallel with other server you will have to
  specify `:add-on?` = t when registering the client.

- added 3 different message `lsp--info`, `lsp--warn` and `lsp--error`

- cleanup
- fixed support for tcp LANGUAGE server which apparently works only on Linux.

``` example registration
(lsp-register-client
 (make-lsp-client :new-connection (lsp-tcp-connection
                                   (lambda (port)
                                     `("php"
                                       ,(expand-file-name "~/.composer/vendor/felixfbecker/language-server/bin/php-language-server.php")
                                       ,(format "--tcp-server=localhost:%s" port)
                                       "--memory-limit=4095M")))
                  :major-modes '(php-mode)
                  :server-id 'php-ls))
```

- Implemented signature handling in single method.

Fixes emacs-lsp#214

- Changed eldoc message to display signature when it is present.

- Replaced the message calls with lsp-message which preserves the eldoc message.
At some point we may create separate buffer which will display the
yyoncho added a commit to yyoncho/lsp-mode that referenced this issue Dec 20, 2018
- added `lsp-auto-require-clients` to remove the need to require lsp-clients.
  When set to t(default) it will autorequire lsp-clients.

- `lsp` command ignores the clients which binary is not present.

- `lsp` no longer throws an error when there is no client installed

- `lsp` will ask which client to power on if there are multiple clients for a
  single mode present(also if their binary is available). This will happen each
  time you open a new file. In order to disable that you will have to remove the
  server that you do not want to run from `lsp-clients`. Later, when we solve
  emacs-lsp#405 we will be able to specify per project preferences like: ProjectA uses
  ccls, projectB uses clangd.

- If you want your client to run in parallel with other server you will have to
  specify `:add-on?` = t when registering the client.

- added 3 different message `lsp--info`, `lsp--warn` and `lsp--error`

- cleanup
- fixed support for tcp LANGUAGE server which apparently works only on Linux.

``` example registration
(lsp-register-client
 (make-lsp-client :new-connection (lsp-tcp-connection
                                   (lambda (port)
                                     `("php"
                                       ,(expand-file-name "~/.composer/vendor/felixfbecker/language-server/bin/php-language-server.php")
                                       ,(format "--tcp-server=localhost:%s" port)
                                       "--memory-limit=4095M")))
                  :major-modes '(php-mode)
                  :server-id 'php-ls))
```

- Implemented signature handling in single method.

Fixes emacs-lsp#214

- Changed eldoc message to display signature when it is present.

- Replaced the message calls with lsp-message which preserves the eldoc message.
At some point we may create separate buffer which will display the
renatofdds pushed a commit to renatofdds/lsp-mode that referenced this issue May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants