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

Lua.workspace.ignoreDir behaves not same as gitignore #804

Closed
tiomke opened this issue Nov 17, 2021 · 1 comment
Closed

Lua.workspace.ignoreDir behaves not same as gitignore #804

tiomke opened this issue Nov 17, 2021 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@tiomke
Copy link

tiomke commented Nov 17, 2021

Describe the bug
in lua-language-server v2.4.8 , Lua.workspace.ignoreDir setting not work sometimes.

for example:
mydir:

root/
  file.lua
  sub/
   file.lua

root/sub/file.lua will not be preload by setting like this:

"Lua.workspace.ignoreDir": 
[
   "*.lua",
   "!sub/*.lua"
]

but will be preload if config in .gitignore:

*.lua
!sub/*.lua

Environment (please complete the following information):

  • OS: Windows

Log

use Lua.workspace.ignoreDir setting

[11:05:53.803][info] [#0:script\workspace\workspace.lua:330]: Preload start.
[11:05:53.803][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/CVS
[11:05:53.803][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/Thumbs.db
[11:05:53.803][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.git
[11:05:53.803][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.svn
[11:05:53.803][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.DS_Store
[11:05:53.803][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.hg
[11:05:53.803][info] [#0:script\workspace\workspace.lua:134]: Ignore directory:	!sub/*.lua
[11:05:53.803][info] [#0:script\workspace\workspace.lua:134]: Ignore directory:	*.lua

use .gitignore

[11:16:38.100][info] [#0:script\workspace\workspace.lua:330]: Preload start.
[11:16:38.100][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/CVS
[11:16:38.100][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/Thumbs.db
[11:16:38.100][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.git
[11:16:38.100][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.svn
[11:16:38.100][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.DS_Store
[11:16:38.100][info] [#0:script\workspace\workspace.lua:89]: Ignore by exclude:	**/.hg
[11:16:38.116][info] [#0:script\workspace\workspace.lua:99]: Ignore by .gitignore:	*.lua
[11:16:38.116][info] [#0:script\workspace\workspace.lua:99]: Ignore by .gitignore:	!sub/*.lua
@tiomke tiomke changed the title Lua.workspace.ignoreDir behavior not same with gitignore Lua.workspace.ignoreDir behaves not same as gitignore Nov 17, 2021
@tiomke
Copy link
Author

tiomke commented Nov 17, 2021

compare the log, I realize that maybe it is the config order result in bug.

this worked for me.

"Lua.workspace.ignoreDir": 
[
   "!sub/*.lua",
   "*.lua"
]

@sumneko sumneko added the bug Something isn't working label Nov 17, 2021
@sumneko sumneko added this to the 2.5.0 milestone Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants