• Login
Community
  • Login

Tab vs Space for .rs (Rust)

Scheduled Pinned Locked Moved General Discussion
13 Posts 7 Posters 1.0k Views
Loading More Posts
  • 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.
  • P
    Philippe @guy038
    last edited by Feb 6, 2021, 3:05 AM

    I know it sounds like a stupid question - I’m already using different tab settings for my various languages, it’s just that rust is not in the menu. So that you don’t think I’m too much deranged, here is a screenshot :-)

    Capture d'écran 2021-02-05 19.00.13.png

    P 1 Reply Last reply Feb 6, 2021, 6:24 PM Reply Quote 0
    • P
      PeterJones @Philippe
      last edited by PeterJones Feb 6, 2021, 6:25 PM Feb 6, 2021, 6:24 PM

      @Philippe said in Tab vs Space for .rs (Rust):

      it’s just that rust is not in the menu.

      But it is:
      11b90685-1f8b-401f-a7aa-34b8f78bfc02-image.png

      If it’s not in your menu, then you either have a really old version of Notepad++ (go to ? menu, select the Debug Info entry, and copy the text and paste it here), or you have upgraded Notepad++ to a relatively-recent version, but some of your configuration files have not been updated, then Notepad++ might not see that Rust exists as an option. What you paste for the Debug Info in your next reply will help inform us which way to take the debug process at this point.

      Notepad++ v7.9   (64-bit)
      Build time : Sep 22 2020 - 03:19:04
      Path : C:\Users\Peter\AppData\Local\Temp\notepad++\notepad++.exe
      Admin mode : OFF
      Local Conf mode : ON
      OS Name : Windows 10 Home (64-bit) 
      OS Version : 2004
      OS Build : 19041.746
      Current ANSI codepage : 1252
      Plugins : mimeTools.dll NppConverter.dll NppExport.dll 
      

      (or Alt+PrintScreen and paste the image of your dialog here)

      1 Reply Last reply Reply Quote 2
      • P
        Philippe
        last edited by Philippe Feb 6, 2021, 10:00 PM Feb 6, 2021, 9:59 PM

        Per initial post, it’s 7.9.1 x64. I believe you it is in your version (how could I not) but that’s also why I put a screenshot of mine to show you that I’m not (yet) totally dumb and it is not in mine (although I have rust syntax highlighting). I’ll do a full update / re-install then!

        Notepad++ v7.9.1 (64-bit)
        Build time : Nov 2 2020 - 01:07:46
        Path : C:\Program Files\Notepad++\notepad++.exe
        Admin mode : OFF
        Local Conf mode : OFF
        OS Name : Windows 7 Ultimate (64-bit)
        OS Build : 7601.24312
        Current ANSI codepage : 1252
        Plugins : ComparePlugin.dll HexEditor.dll mimeTools.dll NppConverter.dll NppExport.dll NPPJSONViewer.dll

        P 1 Reply Last reply Feb 7, 2021, 7:02 PM Reply Quote 0
        • P
          PeterJones @Philippe
          last edited by Feb 7, 2021, 7:02 PM

          @Philippe ,

          Posting the full Debug Info is always better than just the “version number” (it can give other hints, like install location, local-conf-vs-appdata, admin mode, and plugins, all of which can influence things). Thanks for providing that.

          In this instance, I would say that it’s probably one of your %AppData%\Notepad++\*.xml files that’s causing “Rust” to not be shown in the Settings > Preferences > Language : TabSettings options. Those files don’t get reset on new installations, unless you delete the %AppData%\Notepad++\ folder – but if you’ve got a lot of personalized settings, you probably don’t want to do that.

          I ran a quick experiment, and copied langs.xml to x-langs.xml (to save a backup of it), then removed the “rust” section from between “ruby” and “scheme”. When I reloaded, “rust” was no longer in that preferences section. So you might want to follow these steps

          1. Close all Notepad++ windows
          2. Open %AppData%\Notepad++\langs.xml in Notepad++
          3. Add the following between “ruby” and “scheme”
                <Language name="rust" ext="rs" commentLine="//" commentStart="/*" commentEnd="*/">
                    <Keywords name="instre1">abstract as async become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self static struct super trait true try type typeof unsafe unsized use virtual where while yield</Keywords>
                    <Keywords name="instre2">bool char f32 f64 i128 i16 i32 i64 i8 isize str u128 u16 u32 u64 u8 usize</Keywords>
                    <Keywords name="type1">Self</Keywords>
                    <Keywords name="type2" />
                    <Keywords name="type3" />
                    <Keywords name="type4" />
                    <Keywords name="type5" />
                </Language>
            
          4. Save and exit Notepad++ without doing anything else.
          5. Reload Notepad++.
          6. Check the settings, and see if rust is available.
          1 Reply Last reply Reply Quote 5
          • P
            Philippe
            last edited by Philippe Feb 7, 2021, 8:10 PM Feb 7, 2021, 8:10 PM

            That was definitively it, thank very much! I don’t know what I did which prevented the update to be made especially knowing that rust syntax highlighting was working.

            1 Reply Last reply Reply Quote 0
            • M
              mere-human
              last edited by Feb 7, 2021, 8:23 PM

              Maybe, some sort of the installer bug? What if it didn’t overwrite the old langs.xml?

              A 1 Reply Last reply Feb 7, 2021, 9:13 PM Reply Quote 0
              • A
                Alan Kilborn @mere-human
                last edited by Feb 7, 2021, 9:13 PM

                @mere-human said in Tab vs Space for .rs (Rust):

                What if it didn’t overwrite the old langs.xml?

                Isn’t that the idea?
                If user has changed some settings, err on the side of caution and don’t blow it away?

                1 Reply Last reply Reply Quote 0
                • S
                  snmnarum
                  last edited by Feb 8, 2021, 6:50 PM

                  The age-old conundrum of how to preserve the advanced users’ custom settings while allowing the installer to stomp an out of date or corrupted settings file for a newbie or during an update. In a case like this, you don’t want the installer indiscriminately stomping the file and corrupting customizations. But then you “loose updates” for a guy like Philippe! Perhaps the installer could detect a modified config and give us the option of A) use new, B) preserve user, or C) attempt a merge. The last would have worked fine for Philippe as the Rust entry was new and would have been inserted between his (possibly customized) lines in the existing file.

                  A M 2 Replies Last reply Feb 8, 2021, 7:00 PM Reply Quote 0
                  • A
                    Alan Kilborn @snmnarum
                    last edited by Feb 8, 2021, 7:00 PM

                    @snmnarum said in Tab vs Space for .rs (Rust):

                    Perhaps the installer could detect a modified config and give us the option of A) use new, B) preserve user, or C) attempt a merge.

                    It probably comes down to how much time devs have to accomplish all things. Time is finite, after all, and these devs have to carve off a section of their free time to keep devving on Notepad++ – I’m sure they all have day jobs and families preventing them from 24 / 7 N++ dev!

                    1 Reply Last reply Reply Quote 2
                    • M
                      mere-human @snmnarum
                      last edited by Feb 9, 2021, 9:48 AM

                      @snmnarum said in Tab vs Space for .rs (Rust):

                      Perhaps the installer could detect a modified config and give us the option of A) use new, B) preserve user, or C) attempt a merge.

                      You can create a feature request for this. Having at least A) and B) would be nice. However, C) will not be easy to implement.

                      1 Reply Last reply Reply Quote 2
                      13 out of 13
                      • First post
                        13/13
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors