Skip to content

Commit

Permalink
Make hovers case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
Logan Hampton committed May 30, 2018
1 parent b1bd018 commit 0c8ed1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 0.2.0
* Fixed the word pattern for the extension
* Improved formatting for some parameter documentation in signature helpers
* Made hovers case-insensitive

## 0.1.9
* Completions and Signature Helpers for files relative to include folders (e.g., `#include <Test.au3>`) are now provided
Expand Down
6 changes: 4 additions & 2 deletions out/src/ai_hover.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ module.exports = languages.registerHoverProvider(
{
provideHover(document, position, token) {
let wordRange = document.getWordRangeAtPosition(position)

let word = wordRange ? document.getText(wordRange) : ''
let hover

hover = hovers[word]
let hover = hovers[Object.keys(hovers).find(
key => key.toLowerCase() === word.toLowerCase()
)]

return new Hover(hover)
}
Expand Down

0 comments on commit 0c8ed1e

Please sign in to comment.