codethread / qmk.nvim

Format qmk and zmk keymaps in neovim
MIT License
142 stars 5 forks source link

Spanish characters issue #15

Closed aleee-idk closed 1 year ago

aleee-idk commented 1 year ago

Hello!

First of all I would like to say that I like this plugin a lot! The keymap.c file can get really messy real quick, so this plugins it's really helpful!

I'm having trouble with the characters ñ and ´ because it doesn't align properly

Here is my config:

return {
  "codethread/qmk.nvim",
  ft = "c",
  config = {
    name = "LAYOUT",
    layout = {
      "_ x x x x x x _ _ _ x x x x x x",
      "_ x x x x x x _ _ _ x x x x x x",
      "_ x x x x x x _ _ _ x x x x x x",
      "_ x x x x x x x _ x x x x x x x",
      "_ _ _ x x x x x _ x x x x x _ _",
    },
    comment_preview = {
      -- mostly overrides for Spanish Latin American
      keymap_overrides = {
        KC_SYMBOLS = "Symbols",
        KC_SYSTEM = "System",
        KC_NUMPAD = "Numpad",
        KC_GAME = "Game",
        KC_COLEMAK = "Colemak",
        KC_QWERTY = "Qwerty",
        KC_GRV = "|",
        KC_GRAVE = "|",
        KC_SCLN = "ñ",
        ES_COMM = ",",
        ES_DOT = ".",
        ES_MINS = "-",
        ES_QUOT = "'",
        ES_GRV = "´",
        ES_IEXL = "?",
        ES_LABK = ">",
        ES_PLUS = "+",
        KC_ALGR = "algr",
      },
    },
  },
}

And here the output:

//        ┌─────────────┬───┬──────┬──────┬──────┬─────┐                      ┌─────┬──────┬──────┬──────┬────┬──────┐
//        │      |      │ 1 │  2   │  3   │  4   │  5  │                      │  6  │  7   │  8   │  9   │ 0  │  '   │
//        ├─────────────┼───┼──────┼──────┼──────┼─────┤                      ├─────┼──────┼──────┼──────┼────┼──────┤
//        │     tab     │ q │  w   │  e   │  r   │  t  │                      │  y  │  u   │  i   │  o   │ p  │  ´  │
//        ├─────────────┼───┼──────┼──────┼──────┼─────┤                      ├─────┼──────┼──────┼──────┼────┼──────┤
//        │ LCTL_T(esc) │ a │  s   │  d   │  f   │  g  │                      │  h  │  j   │  k   │  l   │ ñ │ bspc │
//        ├─────────────┼───┼──────┼──────┼──────┼─────┼─────────┐   ┌────────┼─────┼──────┼──────┼──────┼────┼──────┤
//        │    lsft     │ z │  x   │  c   │  v   │  b  │  mply   │   │   no   │  n  │  m   │  ,   │  .   │ -  │ rsft │
//        └─────────────┴───┼──────┼──────┼──────┼─────┼─────────┤   ├────────┼─────┼──────┼──────┼──────┼────┴──────┘
//                          │ lalt │ lctl │ lgui │ spc │ Symbols │   │ System │ ent │ rgui │ rctl │ algr │            
//                          └──────┴──────┴──────┴─────┴─────────┘   └────────┴─────┴──────┴──────┴──────┘            
[_QWERTY] = LAYOUT(
      KC_GRV         , KC_1 , KC_2    , KC_3    , KC_4    , KC_5   ,                              KC_6   , KC_7    , KC_8    , KC_9    , KC_0    , ES_QUOT,
      KC_TAB         , KC_Q , KC_W    , KC_E    , KC_R    , KC_T   ,                              KC_Y   , KC_U    , KC_I    , KC_O    , KC_P    , ES_GRV ,
      LCTL_T(KC_ESC) , KC_A , KC_S    , KC_D    , KC_F    , KC_G   ,                              KC_H   , KC_J    , KC_K    , KC_L    , KC_SCLN , KC_BSPC,
      KC_LSFT        , KC_Z , KC_X    , KC_C    , KC_V    , KC_B   , KC_MPLY    ,     XXXXXXX   , KC_N   , KC_M    , ES_COMM , ES_DOT  , ES_MINS , KC_RSFT,
                              KC_LALT , KC_LCTL , KC_LGUI , KC_SPC , KC_SYMBOLS ,     KC_SYSTEM , KC_ENT , KC_RGUI , KC_RCTL , KC_ALGR                    
),
codethread commented 1 year ago

hey thanks for raising, I'll be sure to have a look into this. I did notice when I tried ligatures in there, they didn't render correctly - must be to do with multi-width character, but I didn't think it would be an issue; your use case makes me see otherwise 😅

I can't promise anything too speedy on this, but I'll let you know when I find something, and I hope it isn't too frustrating in the meantime 😇

aleee-idk commented 1 year ago

No worries! it's not like this make the plugin unusable, so take your time.

Thanks for the quick response.

codethread commented 1 year ago

should be fixed now, any issues please reopen 😄

aleee-idk commented 1 year ago

Now works great! Thanks you