diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-01-26 17:17:41 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-01-26 17:17:41 +0800 |
commit | e23fa5859ee8f9424aaeed7dbc6d5ce90bc7dd44 (patch) | |
tree | ea2044ffa315f4d57821079cb4429dbd48d6df1a | |
parent | 8357e5139dfbf1a474b98c4ec6539b360d38b06f (diff) | |
download | lua-language-server-e23fa5859ee8f9424aaeed7dbc6d5ce90bc7dd44.zip |
fix #926
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/core/semantic-tokens.lua | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/changelog.md b/changelog.md index d7bbca8c..53b04ad0 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ## 2.6.3 * `FIX` new files are not loaded correctly +* `FIX` [#926](https://github.com/sumneko/lua-language-server/issues/926) ## 2.6.2 `2022-1-25` diff --git a/script/core/semantic-tokens.lua b/script/core/semantic-tokens.lua index 70d2cf14..afa1424b 100644 --- a/script/core/semantic-tokens.lua +++ b/script/core/semantic-tokens.lua @@ -152,12 +152,12 @@ local Care = util.switch() return end -- 4. 函数的参数 | Function parameters - if source.parent and source.parent.type == 'funcargs' then + if loc.parent and loc.parent.type == 'funcargs' then results[#results+1] = { start = source.start, finish = source.finish, type = define.TokenTypes.parameter, - modifieres = define.TokenModifiers.declaration, + modifieres = loc == source and define.TokenModifiers.declaration or nil, } return end |