haskell / haskell/haskell-language-server

Prioritize "Use Type Signature" action when available

Đang mở
#457 4 bình luận 2 reaction 0 người được giao Xem trên GitHub
component: ghcide type: enhancement
Ngôn ngữ chính
Haskell
Star
3k
Fork
455
Merge trung bình
2 ngày 19 giờ
Pull request đã merge (30 ngày)
11

Mô tả

Hey folks! Amazing job on this project! Really appreciate how wonderful this tool is 😄

The LSP client I'm using offers a "quick-fix" binding; which AFAICT just executes the first "code action" related to your cursor.

The issue I'm having relates to type holes;

E.g. If I write the binding:

```haskell
thing :: _
thing = 'a'
```

If I have my cursor on the type hole and run "quick-fix" in the Language server it executes the FIRST code action, which in my case seems to always be `Add PartialTypeSignatures`; when what I (and probably most folks) **always** want is the `Use type signature: '(Char)'` option (which shows up second in the list if I list them all).

I'm not sure if it's possible to control the ordering of code-action suggestions, but if it is It'd be great if "Use type signature" would always come first if available 😄

### Your environment
* Output of `haskell-language-server --probe-tools` or `haskell-language-server-wrapper --probe-tools`
```
haskell-language-server version: 0.4.0.0 (GHC: 8.10.1) (PATH: /Users/cpenner/.ghcup/bin/haskell-language-server-wrapper-0.4.0) (GIT hash: 0a18edde24923251a148cbbc0ae993a6aac83b9c)
Tool versions found on the $PATH
cabal: 3.2.0.0
stack: 2.3.1
ghc: 8.8.4
```
## Which lsp-client do you use
* Neovim - COC.vim

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.