Skip to content

default backslash (\) leader key not detected even when explicitly set in config #185

@ddl004

Description

@ddl004

Dotfyle reports leaderkey: unknown for my config even though I explicitly set a backslash leader at the top of my init.lua.

vim.g.mapleader = "\\"

It looks like the findLeaderKey() function in src/lib/server/nvim-sync/config/NeovimConfigSyncer.ts has a small escaping bug in the switch statement.

Proposed fix:

- case '"\\"':
- case "'\\'":
+ case '"\\\\"':
+ case "'\\\\'":
    return '\\';

These string literals only contain a single backslash, but the raw text from a Lua file with vim.g.mapleader = "\\" should be escaped as \\\\.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions