Skip to content

[Feature request] Add rust.xml file for autocompletion #16904

@ImMau14

Description

@ImMau14

Is there an existing issue for this?

  • I have searched the existing issues

Description of the Issue

I like Notepad++, it's the code editor I usually use, but when I wanted to learn Rust, I noticed that a rust.xml file was missing for autocompletion.

Describe the solution you'd like.

The solution to the problem is to add a new autocomplete file for Rust.

Debug Information

Notepad++ v8.8.3   (32-bit)
Build time : Jul  9 2025 - 01:38:25
Scintilla/Lexilla included : 5.5.7/5.4.5
Boost Regex included : 1_85
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : ON
Placeholders : OFF
Scintilla Rendering Mode : SC_TECHNOLOGY_DIRECTWRITE (1)
Multi-instance Mode : monoInst
File Status Auto-Detection : cdEnabledNew (for current file/tab only)
Dark Mode : ON
Display Info : 
    primary monitor: 1024x600, scaling 100%
    visible monitors count: 1
    installed Display Class adapters: 
        0000: Description - Intel(R) Graphics Media Accelerator 3150 (Microsoft Corporation - WDDM 1.0)
        0000: DriverVersion - 8.15.10.2697
        0001: Description - Intel(R) Graphics Media Accelerator 3150 (Microsoft Corporation - WDDM 1.0)
        0001: DriverVersion - 8.15.10.2697
OS Name : Windows 8.1 Pro (32-bit)
OS Build : 9600.20778
Current ANSI codepage : 1252
Plugins : 
    BetterMultiSelection (1.5)
    HTMLTag_unicode (1.5.4)
    mimeTools (3.1)
    nppAutoDetectIndent (2.3)
    NppConverter (4.6)
    NppExport (0.4)
    NppQCP (2)
    PyNPP (1.2)
    Python Indent (1.0.0.5)
    PythonScript (2.1)
    VisualStudioLineCopy (1.0.0.2)

Anything else?

This is code I wrote for autocompletion. I welcome suggestions for improvement.

<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
    <AutoComplete language="Rust">
        <!-- Strict keywords -->
        <KeyWord name="as" />
        <KeyWord name="async" />
        <KeyWord name="await" />
        <KeyWord name="break" />
        <KeyWord name="const" />
        <KeyWord name="continue" />
        <KeyWord name="crate" />
        <KeyWord name="dyn" />
        <KeyWord name="else" />
        <KeyWord name="enum" />
        <KeyWord name="extern" />
        <KeyWord name="false" />
        <KeyWord name="fn" />
        <KeyWord name="for" />
        <KeyWord name="if" />
        <KeyWord name="impl" />
        <KeyWord name="in" />
        <KeyWord name="let" />
        <KeyWord name="loop" />
        <KeyWord name="match" />
        <KeyWord name="mod" />
        <KeyWord name="move" />
        <KeyWord name="mut" />
        <KeyWord name="pub" />
        <KeyWord name="ref" />
        <KeyWord name="return" />
        <KeyWord name="Self" />
        <KeyWord name="self" />
        <KeyWord name="static" />
        <KeyWord name="struct" />
        <KeyWord name="super" />
        <KeyWord name="trait" />
        <KeyWord name="true" />
        <KeyWord name="type" />
        <KeyWord name="union" />
        <KeyWord name="unsafe" />
        <KeyWord name="use" />
        <KeyWord name="where" />
        <KeyWord name="while" />

        <!-- Reserved for future use -->
        <KeyWord name="abstract" />
        <KeyWord name="become" />
        <KeyWord name="box" />
        <KeyWord name="do" />
        <KeyWord name="final" />
        <KeyWord name="macro" />
        <KeyWord name="override" />
        <KeyWord name="priv" />
        <KeyWord name="typeof" />
        <KeyWord name="unsized" />
        <KeyWord name="virtual" />
        <KeyWord name="yield" />
        <KeyWord name="gen" />
        <KeyWord name="try" />

        <!-- Common macros -->
        <KeyWord name="println!" func="yes">
            <Overload retVal="()" descr="Prints to standard output with newline">
                <Param name="format string (...)" />
            </Overload>
        </KeyWord>
        <KeyWord name="print!" func="yes">
            <Overload retVal="()" descr="Prints to standard output">
                <Param name="format string (...)" />
            </Overload>
        </KeyWord>
        <KeyWord name="eprintln!" func="yes">
            <Overload retVal="()" descr="Prints to standard error with newline">
                <Param name="format string (...)" />
            </Overload>
        </KeyWord>
        <KeyWord name="format!" func="yes">
            <Overload retVal="String" descr="Returns a formatted `String`">
                <Param name="format string (...)" />
            </Overload>
        </KeyWord>

        <!-- System macros -->
        <KeyWord name="macro_rules!" func="yes" />
        <KeyWord name="dbg!" func="yes" />
        <KeyWord name="assert!" func="yes" />
        <KeyWord name="assert_eq!" func="yes" />
        <KeyWord name="assert_ne!" func="yes" />
        <KeyWord name="debug_assert!" func="yes" />
        <KeyWord name="debug_assert_eq!" func="yes" />
        <KeyWord name="panic!" func="yes" />
        <KeyWord name="todo!" func="yes" />
        <KeyWord name="unimplemented!" func="yes" />
        <KeyWord name="unreachable!" func="yes" />
        <KeyWord name="write!" func="yes" />
        <KeyWord name="writeln!" func="yes" />
        <KeyWord name="format_args!" func="yes" />
        <KeyWord name="vec!" func="yes" />
        <KeyWord name="concat!" func="yes" />
        <KeyWord name="concat_idents!" func="yes" />
        <KeyWord name="stringify!" func="yes" />
        <KeyWord name="include!" func="yes" />
        <KeyWord name="include_str!" func="yes" />
        <KeyWord name="include_bytes!" func="yes" />
        <KeyWord name="env!" func="yes" />
        <KeyWord name="option_env!" func="yes" />
        <KeyWord name="file!" func="yes" />
        <KeyWord name="line!" func="yes" />
        <KeyWord name="column!" func="yes" />
        <KeyWord name="module_path!" func="yes" />
        <KeyWord name="cfg!" func="yes" />
        <KeyWord name="compile_error!" func="yes" />

        <!-- Common types & constructors -->
        <KeyWord name="Vec::new" func="yes">
            <Overload retVal="Vec&lt;T&gt;" descr="Creates a new, empty `Vec<T>`" />
        </KeyWord>
        <KeyWord name="String::new" func="yes">
            <Overload retVal="String" descr="Creates a new, empty `String`" />
        </KeyWord>
        <KeyWord name="Option::unwrap" func="yes">
            <Overload retVal="T" descr="Returns the contained `Some` value, panics if `None`" />
        </KeyWord>

        <!-- Primitive types -->
        <KeyWord name="i8" />
        <KeyWord name="i16" />
        <KeyWord name="i32" />
        <KeyWord name="i64" />
        <KeyWord name="i128" />
        <KeyWord name="isize" />
        <KeyWord name="u8" />
        <KeyWord name="u16" />
        <KeyWord name="u32" />
        <KeyWord name="u64" />
        <KeyWord name="u128" />
        <KeyWord name="usize" />
        <KeyWord name="f32" />
        <KeyWord name="f64" />
        <KeyWord name="bool" />
        <KeyWord name="char" />
        <KeyWord name="str" />
    </AutoComplete>
</NotepadPlus>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions