Code Monkey home page Code Monkey logo

im-switch.nvim's Introduction

im-switch.nvim

neovim的输入法自动切换插件,在写文档以及代码注释的时候可以自动帮忙切换输入法

目前只支持fcitx5

功能演示:https://www.bilibili.com/video/BV1U94y1e7HS

依赖

插件部分功能依赖nvim-treesitter

安装

Lazy.nvim

{
    "Kicamon/im-switch.nvim",
    config = function()
        require("im-switch").setup()
    end
}

配置

默认配置

require("im-switch").setup({
    text = { -- 自动切换输入法的文档
        "*.md",
        "*.txt",
    },
    code = { -- 注释时自动切换输入法的语言
        "*.lua",
        "*.c",
        "*.cpp",
        "*.py",
    },
    en = "fcitx5-remote -c",
    zh = "fcitx5-remote -o",
    check = "fcitx5-remote",
})

其他输入法

如果你使用的输入法没有被支持,可以这么配置,如fcitx

require("im-switch").setup({
    en = "fcitx-remote -c",
    zh = "fcitx-remote -o",
    check = "fcitx-remote",
    --这里写上相应的输入法切换命令即可
})

适用范围

  • 所有nvim-treesitter支持的编程语言
  • markdown及其代码块
  • tex

License MIT

im-switch.nvim's People

Contributors

kicamon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

henryzxb

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.