Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. JavaScript formatting
Forum Updated to NodeBB v4.3 + New Features

JavaScript formatting

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
11 Posts 3 Posters 2.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi and welcome to the forums
    Did it work better prior to upgrade to 4.6.1?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sideways
      wrote on last edited by sideways
      #3

      It was better in the sense that the linter didn't show warnings in the pane's scrollbar, clouding it when displaying green lines for find and other such things. That's what pushed me over the edge to another editor. There doesn't seem to be a way to suppress lint warnings globally. The Refactoring menu option lets me comment individual lines, but there are hundreds of them, and to comment them all is annoying to me. JSHint lets me suppress the warnings globally with a comment at the top of the file. For me this is all about "==" versus "===". There is no performance hit from using ==, and I prefer to use it as my base logical equality operator. That way when I use ===, it's for a specific reason. It's all about personal preference.

      mrjjM 1 Reply Last reply
      0
      • S sideways

        It was better in the sense that the linter didn't show warnings in the pane's scrollbar, clouding it when displaying green lines for find and other such things. That's what pushed me over the edge to another editor. There doesn't seem to be a way to suppress lint warnings globally. The Refactoring menu option lets me comment individual lines, but there are hundreds of them, and to comment them all is annoying to me. JSHint lets me suppress the warnings globally with a comment at the top of the file. For me this is all about "==" versus "===". There is no performance hit from using ==, and I prefer to use it as my base logical equality operator. That way when I use ===, it's for a specific reason. It's all about personal preference.

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @sideways
        Hi
        Im wondering what makes these checks.
        Could try disable the ClangCode model and restart Creator and see if it still shows the
        warnings in side ? I disabled it for c++ as it was often too happy.
        alt text

        But im not sure if its used for JS or thats some other plugin.

        S 1 Reply Last reply
        0
        • mrjjM mrjj

          @sideways
          Hi
          Im wondering what makes these checks.
          Could try disable the ClangCode model and restart Creator and see if it still shows the
          warnings in side ? I disabled it for c++ as it was often too happy.
          alt text

          But im not sure if its used for JS or thats some other plugin.

          S Offline
          S Offline
          sideways
          wrote on last edited by
          #5

          @mrjj Sorry, I don't see how to get to that Installed Plugins dialog. I do also doubt that Clang has anything to do with JS, but maybe it will disable this display warnings feature.

          mrjjM 1 Reply Last reply
          0
          • S sideways

            @mrjj Sorry, I don't see how to get to that Installed Plugins dialog. I do also doubt that Clang has anything to do with JS, but maybe it will disable this display warnings feature.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #6

            @sideways
            Its in Help->About plugins
            Yeah, i have same doubt too but its worth a shot.

            S 1 Reply Last reply
            0
            • mrjjM mrjj

              @sideways
              Its in Help->About plugins
              Yeah, i have same doubt too but its worth a shot.

              S Offline
              S Offline
              sideways
              wrote on last edited by
              #7

              @mrjj
              An unusual menu/menu item for an interactive dialog, but my Clang is already turned off, so no luck there.

              mrjjM 1 Reply Last reply
              0
              • S sideways

                @mrjj
                An unusual menu/menu item for an interactive dialog, but my Clang is already turned off, so no luck there.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #8

                @sideways
                ok. so not that. thx for testing.
                Im not a JS user so lets see if some of the others have better ideas.

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  sideways
                  wrote on last edited by
                  #9

                  Well, it looks like this inquiry is a dead end here. It's a shame. The Atom editor is very cool in many ways, but it doesn't render text as crisply as the Qt editor. Qt renders the fonts in a crisp, legible manner, and black is very black.

                  aha_1980A 1 Reply Last reply
                  0
                  • S sideways

                    Well, it looks like this inquiry is a dead end here. It's a shame. The Atom editor is very cool in many ways, but it doesn't render text as crisply as the Qt editor. Qt renders the fonts in a crisp, legible manner, and black is very black.

                    aha_1980A Offline
                    aha_1980A Offline
                    aha_1980
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    @sideways: Feel free to file suggestions at bugreports.qt.io (one per wish). Please provide a link to the reports here. Thanks.

                    Qt has to stay free or it will die.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      sideways
                      wrote on last edited by sideways
                      #11

                      Thanks for the link. I'm having the opposite problem now. I'm reconsidering living with the beige blobs in my scrollbar, because I'm missing too many C++ style features that the QT text editor provides. But now the Qt editor is not fully parsing my javascript files. It doesn't know about any of the symbols, and the only thing highlighted is literal test enclosed in quotes.

                      What did I do to turn this off, and how do I turn it back on? I can't remember what I did or find any options to reset.
                      Note that the javascript, css, html, and svg files in my project are not part of the C++ Qt project because that's a fork from an open source code base. But the text editor was parsing these javascript previously, and they have never been part of the Qt C++ projects.
                      Thanks!

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved