Thread Tools Display Modes
08-02-17, 04:03 AM   #41
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Kkthnx View Post
I am not sure if this has been discussed before though I read through the 2 pages here and didn't see anything about it. Is it at all possible to set this so when we run something like this it will quit highlighting/reporting a global?

For example

Lua Code:
  1. if (not KkthnxUIConfig) then
  2.     print(L["KkthnxUI config not found!"])
  3.     return
  4. end

Obviously, it is going to call KkthnxUIConfig and print

Now want I am wanting to happen is if I were to call this up at the top of my file like so it will quit highlighting/reporting them so in theory s I know I have covered them.

Lua Code:
  1. local print = print

of even in that case as I handle it

Lua Code:
  1. local _G = _G
  2.  
  3. local print = _G.print

Code:
-- Global variables that we don't need to cache, list them here
-- GLOBALS: KkthnxUIConfig
Once we declare them here it will stop reporting them to us. If my post makes no sense I apologize as it is 4:26 am as of writing this.
It should work the way that you described, if you upvalue something than it should no longer report it as a global, that's the whole point of the global finder. Did you set up your SublimeLinter properly?

I think you might have the default luacheker set as a linter for SublimeLinter instead of my special globalfinder linter script:

Go to Tools -> SublimeLinter -> Toggle Linter then enable globalfinder and disable luacheck.

I might forgot to include this step from the how to set up the linter. :P

Last edited by Resike : 08-02-17 at 04:24 AM.
  Reply With Quote
08-02-17, 04:22 AM   #42
Kkthnx
A Cobalt Mageweaver
 
Kkthnx's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2011
Posts: 247
Originally Posted by Resike View Post
It should work the way that you described, if you upvalue something than it should no longer report it as a global, that's the whole point of the global finder. Did you set up your SublimeLinter properly?
As far as I am aware I did. Stil new at it as I switched directly from Atom. I'll post some screenshots and see if you notice something that is off.

Okay, guess it works. Reset everything to default.

Now, how do we handle it if we do not wanna cache a global? In Atom with "mikk's FindGlobals script" linter we could just run -- GLOBALS: GLOBANAME and it would stop reporting it.
__________________
Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.

Last edited by Kkthnx : 08-02-17 at 04:32 AM.
  Reply With Quote
08-02-17, 06:05 AM   #43
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Kkthnx View Post
As far as I am aware I did. Stil new at it as I switched directly from Atom. I'll post some screenshots and see if you notice something that is off.

Okay, guess it works. Reset everything to default.

Now, how do we handle it if we do not wanna cache a global? In Atom with "mikk's FindGlobals script" linter we could just run -- GLOBALS: GLOBANAME and it would stop reporting it.
Currently you can't ignore globals. I'll look into that how can you do this, with lua-check with my script and SublimeLinter.
  Reply With Quote
08-02-17, 06:14 AM   #44
Kkthnx
A Cobalt Mageweaver
 
Kkthnx's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2011
Posts: 247
Originally Posted by Resike View Post
Currently you can't ignore globals. I'll look into that how can you do this, with lua-check with my script and SublimeLinter.
Thank you!
__________________
Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.
  Reply With Quote
08-02-17, 07:13 AM   #45
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Kkthnx View Post
Thank you!
Add this line just like with the mik's script with no commas:

Lua Code:
  1. -- luacheck: globals math string

This will ignore math and string globals.
  Reply With Quote
09-02-17, 06:53 AM   #46
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Pushed a full update for 7.3.0.
  Reply With Quote
11-03-17, 01:30 PM   #47
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Pushed full update for 7.3.2.

In development:
https://www.youtube.com/watch?v=5rpsGn-L960
  Reply With Quote
11-05-17, 01:48 PM   #48
Gethe
RealUI Developer
 
Gethe's Avatar
Premium Member
Featured
Join Date: Sep 2008
Posts: 942
Any chance this could be added to package control? I believe it was previously included, so you may just need to update the repo url.

Also, by including luacheck in the package, this causes anyone who already had lua and luacheck installed to get two notifications per error.


It may be better to have that feature split into a separate package. It would be good for those like myself who already have luacheck installed on a system level, and just want the wow specific stuff. It's also good for those who don't want the syntax stuff, but are looking global checker without having to install lua, etc.
__________________
Knowledge = Power; Be OP


Last edited by Gethe : 11-05-17 at 02:17 PM.
  Reply With Quote
11-05-17, 05:13 PM   #49
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Gethe View Post
Any chance this could be added to package control? I believe it was previously included, so you may just need to update the repo url.

Also, by including luacheck in the package, this causes anyone who already had lua and luacheck installed to get two notifications per error.


It may be better to have that feature split into a separate package. It would be good for those like myself who already have luacheck installed on a system level, and just want the wow specific stuff. It's also good for those who don't want the syntax stuff, but are looking global checker without having to install lua, etc.
Will look into the package, the problem is that the package does still exists and i'm not sure how can i take it over or update it:
https://packagecontrol.io/packages/WoW%20Development

You can toggle SublimeLinter by linters, if you disable the global finder linter, then you should only get the luacheck results. (aka only one global errors per line)
Open the command panel (cltr+shift+p) and search for toggle linter:


But moving the Linter/GlobalFinder/SyntaxHighlighter into a different projects are also could be better.

Last edited by Resike : 11-05-17 at 05:18 PM.
  Reply With Quote
11-06-17, 03:19 AM   #50
Gethe
RealUI Developer
 
Gethe's Avatar
Premium Member
Featured
Join Date: Sep 2008
Posts: 942
Originally Posted by Resike View Post
Will look into the package, the problem is that the package does still exists and i'm not sure how can i take it over or update it:
https://packagecontrol.io/packages/WoW%20Development
It does already exist, but it links to frodzet's repo which no longer exists as it was transferred to you. It would seem to me that you would just need to go into the package manager repo (per the guide I linked), and find the entries with the "WoW Development" label and update the url.
__________________
Knowledge = Power; Be OP

  Reply With Quote
11-06-17, 08:47 AM   #51
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Gethe View Post
It does already exist, but it links to frodzet's repo which no longer exists as it was transferred to you. It would seem to me that you would just need to go into the package manager repo (per the guide I linked), and find the entries with the "WoW Development" label and update the url.
Alright i'll look into that. Did your linter issues got fixed?
  Reply With Quote
11-06-17, 09:39 AM   #52
Gethe
RealUI Developer
 
Gethe's Avatar
Premium Member
Featured
Join Date: Sep 2008
Posts: 942
Yeah that did it.
__________________
Knowledge = Power; Be OP

  Reply With Quote
01-22-18, 07:22 AM   #53
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Updated for 7.3.5.
  Reply With Quote
04-16-18, 12:51 AM   #54
Eungavi
A Theradrim Guardian
Join Date: Nov 2017
Posts: 64
Not sure if Resike is still on this project, but any advice on how I should set path of WoW Global Finder for portable version of Sublime Text 3?

So, basically Sublime Text Build 3143 x64 is a top folder and WoW Global Finder is located in Sublime Text Build 3143 x64\Data\Packages\WoWDevelopment\WoW Global Finder.

I tried the following, but it doesn't seem to be a right syntax

Code:
// SublimeLinter Settings - User
{
	"paths": {
		"linux": [],
		"osx": [],
		"windows": [
			"Data\\Packages\\WoWDevelopment\\WoW Global Finder\\"
		]
	},
	"syntax_map": {
		"wow lua": "lua"
	}
}

Last edited by Eungavi : 04-16-18 at 12:54 AM.
  Reply With Quote
04-16-18, 04:09 AM   #55
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
You need to use the full path with driver letters and everything which points to your packages folder, i'm not exactly sure what would that be on a portable version, but you should see the packages folder when you open Preferences -> Browse Packages in Sublime.
  Reply With Quote
04-16-18, 05:45 AM   #56
Eungavi
A Theradrim Guardian
Join Date: Nov 2017
Posts: 64
Originally Posted by Resike View Post
You need to use the full path with driver letters and everything which points to your packages folder, i'm not exactly sure what would that be on a portable version, but you should see the packages folder when you open Preferences -> Browse Packages in Sublime.
When I open Preferences -> Browse Packages, it reveals me the folder that I stated on my previous reply;

C:\Users\<UserName>\Desktop\Sublime Text Build 3143 x64\Data\Packages\WoWDevelopment\WoW Global Finder
(It's currently placed on Desktop as you can see)

and I guess that's the main problem here.

Since it's a portable version, the driver and its root folder would possibly change for each different PCs if I place it on my USB. Of course, I could change the path whenever it does not match, but I'm guessing that there must be a way to solve this issue either by SublimeLinter or Sublime Text 3, itself.

Last edited by Eungavi : 04-16-18 at 05:57 AM.
  Reply With Quote
04-16-18, 11:34 AM   #57
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
You could just copy the luacheck.exe into one of your system PATH environment folders where you have write access, for example: "c:\windows\system32". Or if you can edit the system PATH variable adding any folder that contains luacheck.exe. Then Windows should find the exe with no issues.

Also since SublimeLinter 4 got updated the info about making the linter work at the GitHub page is outdated, gonna update it for SL4 too sometime.

Last edited by Resike : 04-16-18 at 11:39 AM.
  Reply With Quote
03-24-19, 04:05 AM   #58
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Did a major update for 8.1.5, almost everything is covered (Widget support is not full) using the proper Lua syntax based on this:
https://www.lua.org/manual/5.3/manual.html#9

The new system makes loading times around 10 times faster.

  • Removed deprecated global function/number highlights.
  • Deprecated events will only get highlighted with their corresponding API call.
  • Excluded GlueXML events from event highlighting, and auto-completion.
  • Proper coloring for inline function creation.
  • Highlight invalid string escapes and unfinished strings.
  • And many more.








Available:
Directly from Sublime's package control. (release versions only)

Or from GitHub:
https://github.com/Resike/WoWDevelopment

Last edited by Resike : 03-24-19 at 04:15 AM.
  Reply With Quote
07-04-19, 12:31 AM   #59
Aeriez
A Fallenroot Satyr
Join Date: May 2007
Posts: 24
I've done all of the steps and I've gotten it working... mostly. However, it seems to scream at every single variable as undefined. "globalfinder: W113 - accessing undefined variable 'table'". Is this expected to happen? The only part of the instructions I was unable to execute was "In Sublime Tools -> SublimeLinter -> Toggle Linter then enable globalfinder and disable any other installed linters.". I'm guessing it's for an older version of Sublime as I'm not finding Sublime Tools. Bringing up the overlay I only have "Toggle highlights" and no "Toggle Linter", nor globalfinder. Any insight?
  Reply With Quote
07-05-19, 03:33 PM   #60
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Aeriez View Post
I've done all of the steps and I've gotten it working... mostly. However, it seems to scream at every single variable as undefined. "globalfinder: W113 - accessing undefined variable 'table'". Is this expected to happen? The only part of the instructions I was unable to execute was "In Sublime Tools -> SublimeLinter -> Toggle Linter then enable globalfinder and disable any other installed linters.". I'm guessing it's for an older version of Sublime as I'm not finding Sublime Tools. Bringing up the overlay I only have "Toggle highlights" and no "Toggle Linter", nor globalfinder. Any insight?
The SublimeLinter got rewritten and there are no GUI menu anymore, you can access their linter settings at Preferences -> Package Settings -> SublimeLinter -> Settings

Then you can enable/disable linters there and call them with custom parameters:

If you would like to customize which warnings/errors you want to show/hide with the linter, then i suggest you to install SublimeLinter-luacheck, and you can enable that linter after you disable the globalfinder one and filter stuff for your needs.



You can read more about the command line arg options here:
https://luacheck.readthedocs.io/en/s...d-line-options

And exclude different warning codes with the `--only [XXX,YYY,ZZZ,...]` argument based on these codes:
https://luacheck.readthedocs.io/en/stable/warnings.html

You can also create a `.luacheckrc` file that you can put into your project folder, then the linter will always load those settings for that particular project:
https://luacheck.readthedocs.io/en/stable/config.html

Last edited by Resike : 07-05-19 at 03:49 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Dev Tools » WoWDevelopment Sublime Package

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off