Giter Site home page Giter Site logo

xkbswitch.nvim's People

Contributors

dkaysin avatar ivanesmantovich avatar nikitat0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xkbswitch.nvim's Issues

Suggestions for MacOS version

Hi! Thank you for making NeoVim alternative of the original xkbswitch. Love to see people making more and more lua stuff out there.

I tried your plugin, and it didn't work for me, so I decided to give you a couple of suggestions.

When you build vovkasm/input-source-switcher on MacOS you get libInputSourceSwitcher.dylib and issw. That issw binary is basically xkb-switch. It also has -l option, which produces the following on my machine:

com.apple.keylayout.ABC
com.apple.keylayout.Russian

There was also a change on recent MacOS versions on Apple Silicon Macs, which changed permissions for /usr/local/lib and /usr/local/bin. I don't want to use sudo, so I put libs and bins into another directory. I think people do the same, but I am not sure. Anyway, it would be great to have an ability to change default paths.

In short, my suggestions are:

  • add ability to use issw
  • improve US layout finder
  • add ability to change default paths

ru+phonetic_mac russian layout

Привет!

Плагин не работает на раскладке ru+phonetic_mac

OS: Pop!_OS 22.04 LTS x86_64
Kernel: Linux 6.2.6-76060206-generic
Shell: fish 3.6.1
DE: GNOME 42.5
WM: Mutter

NVIM v0.8.3
Подключение плагина:

│   use {
│     'ivanesmantovich/xkbswitch.nvim',
│     config = function()
│       require('xkbswitch').setup()
│     end
│   }

Перехожу в insert mode, переключаю раскладку на русскую, возвращаюсь в normal mode, раскладка остается русской.

g3kb-switch -n работает.

❯ g3kb-switch -l
us
ru+phonetic_mac
❯ ls -al /usr/local/lib/
total 132
drwxr-xr-x  3 root root  4096 Apr 14 10:23 ./
drwxr-xr-x 10 root root  4096 Mar  8 20:38 ../
-rwxrwxr-x  1 sts  sts  21832 Dec  4 16:19 libg3kbswitch.so*
lrwxrwxrwx  1 root root    17 Dec  4 17:49 libxkbswitch.so -> libxkbswitch.so.1*
lrwxrwxrwx  1 root root    21 Dec  4 17:49 libxkbswitch.so.1 -> libxkbswitch.so.1.8.5*
-rwxrwxr-x  1 sts  sts  94544 Dec  4 17:49 libxkbswitch.so.1.8.5*
drwxr-xr-x  3 root root  4096 Mar  8 20:38 python3.10/

Remember used language per buffer

I tried out this plugin, and it only works for 1 instance of Neovim. Furthermore, the language persists between buffers. If multiple buffers/instances will be supported, then this plugin will deserve an ultimate status.

unclosed if statement

looks like you have an extra space in the else if statement in the latest fix ( # 4 )
see

else if string.find(value, '.US$') then

error log:

....local/share/nvim/lazy/lazy.nvim/lua/lazy/core/cache.lua:172: .../.local/share/nvim/lazy/xkbswitch.nvim/lua/xkbswitch.lua:123: 'end' expected (to close 'for' at line 45) near '<eof>'

# stacktrace:
  - ~/.config/nvim/lua/config/lazy.lua:9
  - ~/.config/nvim/init.lua:2

MacOS: english layout not found error

On my mac the US layout has a name
com.apple.keylayout.US.

And i get the following error on neovim start:

Error detected while processing /Users/Emptyfruit/.config/nvim/after/plugin/xkb-switch.lua:
E5113: Error while calling lua chunk: .../site/pack/packer/start/xkbswitch.nvim/lua/xkbswitch.lua:52: (xkbswitch.lua) Error occured: could not find the English layout. Check your layout list. (xkb-switch -l / issw -l / g3kb-switch -l)
stack traceback:

MacOS: 12.6.3
Neovim: 0.8.3
issw: 0.3

FocusLost, FocusGained strange behavior

When I switch from nvim to KDE application with non US layout and switch back, Insert mode uses this non US layout even if it was US before switch to other app. This is misbehavior and I had to comment out FocusGained and FocusLost events in autocmd. Is this logic really needed and works as intended?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.