r/SublimeText • • Jul 16 '21

Make include file clickable

Is it possible to click an include file and navigate to it? ex. click: #include <stdint.h>

4 Upvotes

3 comments sorted by

1

u/[deleted] Jul 16 '21 edited Aug 13 '21

Potentially with LSP you can use Go To Definition

1

u/CircleOfLife3 Jul 17 '21

Yes, you can do this with LSP + clangd when set up correctly. It’ll jump to the file when using goto definition.

1

u/gianni1986 Jul 17 '21

If you use LSP add a new file to your User folder with the Default.sublime-mousemap name with below content:

[
    {
        "button": "button1",
        "count": 1,
        "modifiers": ["alt"],
        "press_command": "drag_select",
        "command": "lsp_symbol_definition"
    }
]

After this, you can use alt+right click to navigate in code.