File tree 3 files changed +66
-5
lines changed
3 files changed +66
-5
lines changed Original file line number Diff line number Diff line change 3
3
## 1.17.3
4
4
* ` CHG ` intelli-scense: treat ` V[] ` as ` table<integer, V> ` in ` pairs `
5
5
* ` FIX ` [ #435 ] ( https://github.com/sumneko/lua-language-server/issues/435 )
6
+ * ` FIX ` [ #436 ] ( https://github.com/sumneko/lua-language-server/issues/436 )
6
7
7
8
## 1.17.2
8
9
` 2021-3-2 `
Original file line number Diff line number Diff line change @@ -328,7 +328,10 @@ function m.findUrisByFilePath(path)
328
328
if type (path ) ~= ' string' then
329
329
return {}
330
330
end
331
- local lpath = path :lower ():gsub (' [/\\ ]+' , ' /' )
331
+ local lpath = path :gsub (' [/\\ ]+' , ' /' )
332
+ if platform .OS == ' Windows' then
333
+ lpath = lpath :lower ()
334
+ end
332
335
local vm = require ' vm'
333
336
local resultCache = vm .getCache ' findUrisByRequirePath.result'
334
337
if resultCache [path ] then
Original file line number Diff line number Diff line change 1
- local files = require ' files'
2
- local furi = require ' file-uri'
3
- local core = require ' core.definition'
4
- local config = require ' config'
1
+ local files = require ' files'
2
+ local furi = require ' file-uri'
3
+ local core = require ' core.definition'
4
+ local config = require ' config'
5
+ local platform = require ' bee.platform'
5
6
6
7
rawset (_G , ' TEST' , true )
7
8
@@ -662,3 +663,59 @@ TEST {
662
663
]]
663
664
}
664
665
}
666
+
667
+ local originOS = platform .OS
668
+ platform .OS = ' Linux'
669
+
670
+ TEST {
671
+ {
672
+ path = ' test.lua' ,
673
+ content = [[
674
+ return {
675
+ <!x!> = 1,
676
+ }
677
+ ]] ,
678
+ },
679
+ {
680
+ path = ' Test.lua' ,
681
+ content = [[
682
+ return {
683
+ x = 1,
684
+ }
685
+ ]] ,
686
+ },
687
+ {
688
+ path = ' b.lua' ,
689
+ content = [[
690
+ local t = require 'test'
691
+ print(t.<?x?>)
692
+ ]]
693
+ }
694
+ }
695
+
696
+ TEST {
697
+ {
698
+ path = ' test.lua' ,
699
+ content = [[
700
+ return {
701
+ x = 1,
702
+ }
703
+ ]] ,
704
+ },
705
+ {
706
+ path = ' Test.lua' ,
707
+ content = [[
708
+ return {
709
+ <!x!> = 1,
710
+ }
711
+ ]] ,
712
+ },
713
+ {
714
+ path = ' b.lua' ,
715
+ content = [[
716
+ local t = require 'Test'
717
+ print(t.<?x?>)
718
+ ]]
719
+ }
720
+ }
721
+ platform .OS = originOS
You can’t perform that action at this time.
0 commit comments