Coder Social home page Coder Social logo

fittencode.nvim's Introduction

fittencode.nvim

Fitten Code AI Programming Assistant for Neovim, helps you to use AI for automatic completion in Neovim, with support for functions like login, logout, shortcut key completion.

fittencode-KMP-demo

โœจ Features

  • ๐Ÿš€ Fast completion thanks to Fitten Code and curl
  • ๐Ÿ› Asynchronous I/O for improved performance
  • โญ๏ธ Accept all suggestions with Tab
  • ๐Ÿงช Accept line with Ctrl + โฌ‡๏ธ
  • ๐Ÿ”Ž Accept word with Ctrl + โžก๏ธ
  • โ„๏ธ Undo accepted text
  • ๐Ÿงจ Automatic scrolling when previewing or completing code
  • ๐Ÿ›ฐ๏ธ Run as a nvim-cmp source

โšก๏ธ Requirements

  • Neovim >= 0.8.0
  • curl

๐Ÿ“ฆ Installation

Install the plugin with your preferred package manager:

For example with lazy.nvim:

{
  'luozhiya/fittencode.nvim',
  config = function()
    require('fittencode').setup()
  end,
}

For example with packer.nvim:

use {
  'luozhiya/fittencode.nvim',
  config = function()
    require('fittencode').setup()
  end,
}

โš™๏ธ Configuration

defaults

fittencode.nvim comes with the following defaults:

{
  disable_specific_inline_completion = {
    -- Disable auto-completion for some specific file suffixes by entering them below
    -- For example, `suffixes = {'lua', 'cpp'}`
    suffixes = {},
  },
  inline_completion = {
    -- Enable inline code completion.
    enable = true,
  },
  -- Set the mode of the completion.
  -- Available options:
  -- - 'inline' (default)
  -- - 'source'
  completion_mode = 'inline',
  use_default_keymaps = true,
  log = {
    level = vim.log.levels.WARN,
  },
}

inline mode

Set updatetime to a lower value to improve performance:

-- Neovim default updatetime is 4000
vim.opt.updatetime = 200

source mode

require('fittencode').setup({
  completion_mode ='source',
})
require('cmp').setup({
  sources = { name = 'fittencode', group_index = 1 },
  mapping = {
    ['<cr>'] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = false }),
  }
})

๐Ÿš€ Usage

Default Command

Command Description
Fitten login Try the command Fitten login <user> <password> to login.
Fitten logout Logout account

Default Mappings

Mappings Action
Tab Accept all suggestions
Ctrl + โฌ‡๏ธ Accept line
Ctrl + โžก๏ธ Accept word

๐ŸŽ‰ Special Thanks

fittencode.nvim's People

Contributors

luozhiya avatar

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.