Menu

#1083 syntax highlighting not working for .jshintrc?

None
closed
nobody
None
Unknown
3
2015-01-17
2015-01-17
Phil
No

I tried altering both the system's shared filtype_extensions.conf and my user's and for some reason any *.jshint file still does not get hightlighted as if it were a javascript file. I renamed my .jshint to a.jshint to see if it was just a private file thing and that wasn't the issue.

I would like to rely on this feature in the future and if someone wants to point me to the correct portion of code so I don't have to spend time digging - I will try and fix this myself. I have downloaded the source to geany and have taken a look in the past so I am slightly familiar.

specs:
geany 1.24.1
ubuntu 14.10

exact steps:
1) in filetype_extensions.conf -> change line 39 from
Javascript=*.js;
to
Javascript=*.js;*.jshintrc;
2) reload config (or restart geany)
3) open .jshint file and it doesn't get highlighted (comments is how I noticed, but if you write javascript functions or strings nothing gets highlighted)

Thanks,
Phil

Related

Bugs: #1083

Discussion

  • Phil

    Phil - 2015-01-17

    Agh, annoying that I can't edit my ticket.

    I wanted to correct myself:
    "Javascript=.js"
    is
    "Javascript=*.js;"

     
    • Lex Trotman

      Lex Trotman - 2015-01-17

      Your problem is that conf filetype has a pattern *rc and it matches
      before the Javascript is ever tested.

      BTW you can use Geany github issues to avoid sf annoyance.

      On 18 January 2015 at 07:34, Phil olsonpm@users.sf.net wrote:

      Agh, annoying that I can't edit my ticket.

      I wanted to correct myself:
      "Javascript=.js"
      is
      "Javascript=*.js;"


      [bugs:#1083] syntax highlighting not working for .jshintrc?

      Status: open
      Found in: Unknown
      Fixed in: None
      Created: Sat Jan 17, 2015 09:25 PM UTC by Phil
      Last Updated: Sat Jan 17, 2015 09:25 PM UTC
      Owner: nobody

      I tried altering both the system's shared filtype_extensions.conf and my
      user's and for some reason any *.jshint file still does not get hightlighted
      as if it were a javascript file. I renamed my .jshint to a.jshint to see if
      it was just a private file thing and that wasn't the issue.

      I would like to rely on this feature in the future and if someone wants to
      point me to the correct portion of code so I don't have to spend time
      digging - I will try and fix this myself. I have downloaded the source to
      geany and have taken a look in the past so I am slightly familiar.

      specs:
      geany 1.24.1
      ubuntu 14.10

      exact steps:
      1) in filetype_extensions.conf -> change line 39 from
      Javascript=.js;
      to
      Javascript=.js;*.jshintrc;
      2) reload config (or restart geany)
      3) open .jshint file and it doesn't get highlighted (comments is how I
      noticed, but if you write javascript functions or strings nothing gets
      highlighted)

      Thanks,
      Phil


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/geany/bugs/1083/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #1083

  • Phil

    Phil - 2015-01-17

    Awesome - I really appreciate the quick response. And I'll use github issues in the future.

     
  • Colomban Wendling

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,4 @@
    -I tried altering both the system's shared filtype_extensions.conf and my user's and for some reason any *.jshint file still does not get hightlighted as if it were a javascript file.  I renamed my .jshint to a.jshint to see if it was just a private file thing and that wasn't the issue.  
    +I tried altering both the system's shared filtype_extensions.conf and my user's and for some reason any `*.jshint` file still does not get hightlighted as if it were a javascript file.  I renamed my .jshint to a.jshint to see if it was just a private file thing and that wasn't the issue.  
    
     I would like to rely on this feature in the future and if someone wants to point me to the correct portion of code so I don't have to spend time digging - I will try and fix this myself.  I have downloaded the source to geany and have taken a look in the past so I am slightly familiar.
    
    @@ -8,9 +8,9 @@
    
     exact steps:
     1) in filetype_extensions.conf -> change line 39 from
    -Javascript=*.js;
    +`Javascript=*.js;`
     to
    -Javascript=*.js;*.jshintrc;
    +`Javascript=*.js;*.jshintrc;`
     2) reload config (or restart geany)
     3) open .jshint file and it doesn't get highlighted (comments is how I noticed, but if you write javascript functions or strings nothing gets highlighted)
    
    • status: open --> closed
     
  • Colomban Wendling

    BTW there also is an inconcistency in your report: you add *.jshintrc to filetypes_extension.conf but your file has extension .jshint (notice the missing rc on the end).
    I however imagine that's a discrepancy in the report and that your actually used extensions matched.

     
  • Phil

    Phil - 2015-01-17

    Correct - sorry for any confusion.

     

    Last edit: Phil 2015-01-17

Log in to post a comment.