update and clean all

This commit is contained in:
Jeff Lance 2021-02-19 18:58:08 +01:00
parent 163e65887a
commit 8330cac11b
25 changed files with 40 additions and 524 deletions

View File

@ -287,7 +287,7 @@ endif
"""""""""""""""""""""""""""""""""""""""""""
" Installing the Plug plugin manager
source ${XDG_CONFIG_HOME}/nvim/plug.vim
source ${HOME}/.config/nvim/plug.vim
" Start startify if no arg
autocmd StdinReadPre * let s:std_in=1
@ -504,36 +504,6 @@ let g:header_auto_add_header = 0
" }}}
"" Lightline {{{
"" -----
"
"let g:lightline = {
" \ 'colorscheme': 'snazzy',
" \ 'active': {
" \ 'left': [ [ 'mode', 'paste' ],
" \ [ 'readonly', 'filename', 'gitstatus', 'modified' ]
" \ ],
" \ 'right': [ [ 'lineinfo' ],
" \ [ 'percent' ],
" \ [ 'fileformat', 'fileencoding', 'filetype', 'kitestatus' ]
" \ ]
" \ },
" \ 'component': {
" \ 'readonly': '%{&readonly?"|":""}',
" \ 'kitestatus': '%{kite#statusline()}',
" \ 'gitstatus': '%{FugitiveStatusline()}'
" \ },
" \ 'component_function': {
" \ 'gitbranch': 'FugitiveHead'
" \ },
" \ 'separator': { 'left': '', 'right': '' },
" \ 'subseparator': { 'left': '', 'right': '' }
" \ }
"
"" -----
"" }}}
" Markdown preview {{{
" -----
@ -647,7 +617,7 @@ let g:tex_flavor = 'latex'
"""""""""""""""""""""""""""""""""""""""""""""""""
" Load functions from file
source ${XDG_CONFIG_HOME}/nvim/startscreen.vim
source ${HOME}/.config/nvim/startscreen.vim
@ -662,7 +632,7 @@ source ${XDG_CONFIG_HOME}/nvim/startscreen.vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Load functions from file
source ${XDG_CONFIG_HOME}/nvim/functions.vim
source ${HOME}/.config/nvim/functions.vim
@ -676,7 +646,7 @@ source ${XDG_CONFIG_HOME}/nvim/functions.vim
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Load keybindings from file
source ${XDG_CONFIG_HOME}/nvim/keybindings.vim
source ${HOME}/.config/nvim/keybindings.vim
" vim:ft=vim

View File

@ -1,8 +0,0 @@
#!/usr/bin/env bash
echo "Updating/cleaning Nvim plugins."
source $XDG_CONFIG_HOME/nvim/init.vim
# Thanks for greywh in #vim for this tip
nvim -e -c ':PlugInstall' -c ':PlugClean' -c ':qa!'

View File

@ -1,36 +0,0 @@
dist: trusty
env:
global:
- DEPS=$HOME/deps
- PATH=$DEPS/bin:$PATH
before_install:
- sudo apt-get install python-pip
- pip install --user awscli
- export PATH="$PATH:$HOME/.local/bin"
- curl --silent -L "https://s3-us-west-1.amazonaws.com/kite-data/tensorflow/libtensorflow-cpu-linux-x86_64-1.9.0.tar.gz" | tar -C $HOME -xz
- curl --silent --compressed --output "$HOME/kited-test" "https://s3-us-west-1.amazonaws.com/kited-test/linux/kited-test"
- chmod u+x "$HOME/kited-test"
install: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
C_OPTS="--prefix=$DEPS --with-features=huge --disable-gui "
git clone --depth 1 https://github.com/vim/vim
cd vim
export PATH=/usr/bin:$PATH
./configure $C_OPTS
make
make install
cd -
export PATH=$DEPS/bin:$PATH
export VIM="$(which vim)"
script:
- vim --version
- cd test && bash test
- export LD_LIBRARY_PATH="$HOME/lib:$LD_LIBRARY_PATH"
- echo "Running tests with kited-local --------------" && $HOME/kited-test > ~/kite.log 2>&1 & sleep 20 && bash editor_tests && killall kited-test

View File

@ -1,30 +0,0 @@
# Installation
## Manual installation
### Vim
Assuming your Vim configuration is in `~/.vim/`:
```sh
$ mkdir -p ~/.vim/pack/kite/start/kite
$ git clone https://github.com/kiteco/vim-plugin.git ~/.vim/pack/kite/start/kite/
```
Restart Vim.
### Neovim
Assuming your Neovim configuration is in `~/.config/nvim`:
```sh
$ mkdir -p ~/.config/nvim/pack/kite/start/kite
$ git clone https://github.com/kiteco/vim-plugin.git ~/.config/nvim/pack/kite/start/kite/
```
Restart Neovim.
# Development
When working on the plugin, ensure the file `~/.kite/vim-development` (or `$LOCALAPPDATA$\Kite\vim-development` on Windows) is present. This tells the plugin to use development mode, i.e. to use the non-production key when POSTing metrics to Segment.

View File

@ -1,4 +0,0 @@
Copyright (c) 2017 Manhattan Engineering, Inc - All Rights Reserved
Reproduction of this material is strictly forbidden unless prior written
permission is obtained from Manhattan Engineering, Inc.

View File

@ -1,216 +0,0 @@
# Kite Python Plugin for Vim/Neovim
Kite is an AI-powered programming assistant that helps you write Python code inside Vim. Kite helps you write code faster by showing you the right information at the right time. Learn more about how Kite helps you while you're using Vim at https://kite.com/integrations/vim/.
At a high level, Kite provides you with:
* 🧠 __[Line-of-Code Completions](#Line-of-Code-Completions)__ powered by machine learning models trained on the entire open source code universe
* 📝 __[Intelligent Snippets](#Intelligent-Snippets)__ that automatically provide context-relevant code snippets for your function calls
* 🔍 __[Instant documentation](#Kite-Copilot-for-Python-Documentation)__ for the symbol underneath your cursor so you save time searching for Python docs
## Requirements
* macOS 10.10+ or Windows 7+ or Linux (Ubuntu, Debian, Fedora, Arch Linux, Linux Mint, openSUSE, KDE, XFCE, Gnome 2, Gnome 3)
* Vim 8 or Neovim
* [Kite Engine](https://kite.com/)
Use another editor? Check out [Kites other editor integrations](https://kite.com/integrations/).
## Installation
### Installing the Kite Engine
The [Kite Engine](https://kite.com/) needs to be installed and running on your computer in order for the package to work properly. The package itself provides the frontend that interfaces with the Kite Engine, which performs all the code analysis and machine learning 100% locally on your computer (no code is sent to a cloud server).
__macOS Instructions__
1. Download the [installer](https://kite.com/download/) and open the downloaded `.dmg` file.
2. Drag the Kite icon into the `Applications` folder.
3. Run `Kite.app` to start the Kite Engine.
__Windows Instructions__
1. Download the [installer](https://kite.com/download/) and run the downloaded `.exe` file.
2. The installer should run the Kite Engine automatically after installation is complete.
__Linux Instructions__
1. Visit https://kite.com/linux/ to learn how to install Kite.
2. The installer should run the Kite Engine automatically after installation is complete.
### Installing the Kite plugin for Vim/Neovim
When running the Kite Engine for the first time, you'll be guided through a setup process which will allow you to install the Vim/Neovim plugin. You can also install or uninstall the Vim plugin at any time using the Kite Engine's [plugin manager](https://help.kite.com/article/62-managing-editor-plugins).
Alternatively, you can follow the instructions in the [DEVELOPMENT.md](https://github.com/kiteco/vim-plugin/blob/master/DEVELOPMENT.md) file to learn how to manually install the Vim/Neovim plugin.
Once installed, the plugin will be automatically updated by Kite when necessary.
### Configuring supported languages
Kite supports 12 languages and counting. By default only Python is enabled. You can configure the languages for which Kite is enabled:
```viml
" Python, JavaScript, Go
let g:kite_supported_languages = ['python', 'javascript', 'go']
" All the languages Kite supports
let g:kite_supported_languages = ['*']
" Turn off Kite
let g:kite_supported_languages = []
```
[Learn more about why Kite is the best autocomplete for Vim.](https://kite.com/integrations/vim/)
## Features
Kite's Vim/Neovim plugin provides a number of features to help you code better and faster.
### Line-of-Code Completions
Kite's ranked completions are integrated with Vim's insert-mode completion, specifically the user-defined completion. Kite shows normal completions or signature-completions as appropriate for the cursor position.
By default Kite's completions will show up automatically as you type. You can opt out via:
```viml
let g:kite_auto_complete=0
```
You can manually invoke the completions in insert mode with `<C-X><C-U>`. See `:h i_CTRL-X_CTRL-U` for details.
Kite's completions include snippets by default. To opt out of the snippets, add this to your vimrc:
```viml
let g:kite_snippets=0
```
Normally you insert the currently selected completion option with `<C-y>`. If you'd like to use `<Tab>` instead / as well, add this to your vimrc:
```viml
let g:kite_tab_complete=1
```
For any kind of completion you must set 'completopt' as follows:
```viml
set completeopt+=menuone
```
For automatic completion, you also need either:
```viml
set completeopt+=noselect
```
or:
```viml
set completeopt+=noinsert
```
To see documentation in the preview window for each completion option, copy all the lines above into your vimrc and change the preview line to:
```viml
set completeopt+=preview
```
To have the preview window automatically closed once a completion has been inserted:
```viml
autocmd CompleteDone * if !pumvisible() | pclose | endif
```
We also recommend:
```viml
set belloff+=ctrlg " if vim beeps during completion
```
### Intelligent Snippets
Some completions are actually autogenerated code snippets which can be filled in. These will be highlighted with the Underline highlight group.
You can navigate between placeholders with `<CTRL-J>` (forward) and `<CTRL-K>` (backward), even after you have typed over the original placeholder text.
To change these keys:
```viml
let g:kite_previous_placeholder = '<C-H>'
let g:kite_next_placeholder = '<C-L>`
```
### Signatures
Kite can show how other people used the signature you are using. By default this is off to save space.
To turn it on: `:KiteShowPopularPatterns`.
To turn it off: `:KiteHidePopularPatterns`.
### Kite Copilot for Python Documentation
As you edit your code, the [Kite Copilot](https://kite.com/copilot/) will automatically show examples and docs for the code under your cursor.
Alternatively, you can press `K` when the cursor is on a symbol to view its documentation in Kite Copilot.
If you have mapped `K` already, the plugin won't overwrite your mapping. You can set an alternative mapping, e.g. to `gK`, like this:
```viml
nmap <silent> <buffer> gK <Plug>(kite-docs)
```
By default you need to type `K` (or whatever you have mapped to `<Plug>(kite-docs)`) each time you want to see documentation for the keyword under the cursor. To have the documentation continually update itself as you move from keyword to keyword:
```viml
let g:kite_documentation_continual=1
```
### Goto Definition
Use `<C-]>` or `:KiteGotoDefinition` to jump to a method's definition.
### Commands
- `KiteDocsAtCursor` - show documentation for the keyword under the cursor.
- `KiteOpenCopilot` - open the Kite Copilot and focus on it.
- `KiteGeneralSettings` - open Kite's settings in the Copilot.
- `KitePermissions` - open Kite's permission settings in the Copilot.
- `KiteTutorial` - show a tutorial for how to use Kite with Vim.
- `KiteEnableAutoStart` - start Kite automatically when Vim starts.
- `KiteDisableAutoStart` - do not start Kite automatically when Vim starts.
- `KiteGotoDefinition` - jump to a method's definition.
### Statusline
Add `%{kite#statusline()}` to your statusline to get an indicator of what Kite is doing. If you don't have a status line, this one matches the default when `&ruler` is set:
```viml
set statusline=%<%f\ %h%m%r%{kite#statusline()}%=%-14.(%l,%c%V%)\ %P
set laststatus=2 " always display the status line
```
### Debugging
Use `let g:kite_log=1` to switch on logging. Logs are written to `kite-vim.log` in Vim's current working directory.
---
#### About Kite
Kite is built by a team in San Francisco devoted to making programming easier and more enjoyable for all. Follow Kite on
[Twitter](https://twitter.com/kitehq) and get the latest news and programming tips on the
[Kite Blog](https://kite.com/blog/).
Kite has been featured in [Wired](https://www.wired.com/2016/04/kites-coding-asssitant-spots-errors-finds-better-open-source/),
[VentureBeat](https://venturebeat.com/2019/01/28/kite-raises-17-million-for-its-ai-powered-developer-environment/),
[The Next Web](https://thenextweb.com/dd/2016/04/14/kite-plugin/), and
[TechCrunch](https://techcrunch.com/2019/01/28/kite-raises-17m-for-its-ai-driven-code-completion-tool/).

View File

@ -1 +0,0 @@
1.0.77

View File

@ -1,35 +0,0 @@
*kite.txt* Kite for VIM
Kite for VIM
============
VIM is now integrated with Kite! To get a taste of what Kite can do, open a
saved Python file and start coding away.
1. Autocompletions
As you code, Kite will provide autocompletion suggestions ranked by popularity
using all the open source code on GitHub.
2. Documentation
Press |K| when your cursor is over a identifier to open a split window with
documentation about the identifier. In addition to documentation, Kite also
provides information about where you've used the identifier in your codebase,
as well as curated code examples showing you how to use the identifier.
3. Goto Definition
Press |C-]| to jump to a method's defintion.
4. Copilot integration
While you code in VIM, the Copilot will automatically show you information
about the code that you're currently working with. To open the Copilot, click
on the Kite menubar icon and select "Open Copilot".
To learn more about Kite and how to use the VIM plugin, visit our [help
page](http://help.kite.com).
vim:tw=78:et:ft=help:norl

View File

@ -1,101 +0,0 @@
if exists('g:loaded_kite') || &cp
finish
endif
if has('nvim')
if !has('nvim-0.3')
echoerr 'Kite requires Neovim 0.3 or greater'
finish
endif
else
if v:version < 800 || !has('patch-8.0.0027')
echoerr 'Kite requires Vim 8.0.0027 or greater'
finish
endif
endif
let g:loaded_kite = 1
filetype on
" The list of languages / file types for which we want Kite's completions.
if !exists('g:kite_supported_languages')
let g:kite_supported_languages = ['python']
endif
if !exists('g:kite_auto_complete')
let g:kite_auto_complete = 1
endif
if !exists('g:kite_snippets')
let g:kite_snippets = 1
endif
if !exists('g:kite_previous_placeholder')
let g:kite_previous_placeholder = '<C-K>'
endif
if !exists('g:kite_next_placeholder')
let g:kite_next_placeholder = '<C-J>'
endif
if !exists('g:kite_documentation_continual')
let g:kite_documentation_continual = 0
endif
if !exists('g:kite_log')
let g:kite_log = 0
endif
if !exists('g:kite_short_timeout')
let g:kite_short_timeout = 120 " ms
endif
if !exists('g:kite_long_timeout')
let g:kite_long_timeout = 400 " ms
endif
if !exists('g:kite_completion_max_width')
let g:kite_completion_max_width = 75
endif
if !(has('nvim') || has('job'))
call kite#utils#warn('disabled - requires nvim or vim with the +job feature')
finish
endif
if !(has('nvim') || has('timers'))
call kite#utils#warn('disabled - requires nvim or vim with the +timers feature')
finish
endif
" Nvim-QT
if exists('g:GuiLoaded')
GuiPopupmenu 0
endif
augroup Kite
autocmd!
autocmd BufEnter * call kite#bufenter()
autocmd VimEnter * call kite#configure_completeopt()
autocmd VimEnter * nested if kite#utils#kite_running() && &filetype !~# '^git' | call kite#onboarding#call(0) | endif
augroup END
nnoremap <silent> <Plug>(kite-docs) :call kite#docs#docs()<CR>
command! KiteDocsAtCursor call kite#docs#docs()
command! KiteOpenCopilot call kite#client#copilot()
command! KiteGeneralSettings call kite#client#settings()
command! KitePermissions call kite#client#permissions()
command! KiteTutorial call kite#onboarding#call(1)
command! KiteDisableAutoStart call kite#disable_auto_start()
command! KiteEnableAutoStart call kite#enable_auto_start()
command! KiteShowPopularPatterns call kite#signature#show_popular_patterns()
command! KiteHidePopularPatterns call kite#signature#hide_popular_patterns()
command! KiteGotoDefinition call kite#hover#goto_definition()
command! KiteFindRelatedCodeFromFileExperimental call kite#codenav#from_file()
command! KiteFindRelatedCodeFromLineExperimental call kite#codenav#from_line()

View File

@ -1,27 +0,0 @@
if exists('b:current_syntax')
finish
endif
" Section headings
syntax match kiteHeading /\v^[A-Z* ]+$/
highlight link kiteHeading String
" Usages / Definitions
syntax include @python syntax/python.vim
syntax region kiteSnippet start=/\v^\[.+:\d+\]/ end=/$/ keepend contains=kiteRef,kiteCode
syntax match kiteRef /\v^\[.+:\d+\]/ contained
syntax region kiteCode start=/ / end=/$/ contains=@python contained
highlight link kiteRef Comment
" Links
syntax region MyLink start=/^-> /hs=e end=/\v(\s\(\a+[.]\a{2,3}\))?$/he=s-1 contains=Domain
syntax match Domain /\v\(\a+[.]\a{2,3}\)/
highlight link MyLink Underlined
highlight link Domain Comment
let b:current_syntax = 'kite'

Binary file not shown.

View File

@ -17,7 +17,7 @@
let g:startify_custom_header = 'startify#center(startify#fortune#cowsay())'
let g:startify_session_dir = '${XDG_CONFIG_HOME}/nvim/session'
let g:startify_session_dir = '${HOME}/.config/nvim/session'
let g:startify_enable_special = 0
@ -26,28 +26,28 @@ let g:startify_files_number = 10
function s:config_mail()
return [
\ { 'line': 'afew', 'cmd': 'edit ~/.config/afew/' },
\ { 'line': 'astroid', 'cmd': 'edit ~/.config/astroid/' },
\ { 'line': 'mbsync', 'cmd': 'edit ~/.mbsyncrc' },
\ { 'line': 'notmuch config', 'cmd': 'edit ~/.notmuch-config' },
\ { 'line': 'notmuch hooks', 'cmd': 'edit ~/Mail/.notmuch/hooks/' },
\ { 'line': 'afew', 'cmd': 'edit ${HOME}/.config/afew/' },
\ { 'line': 'astroid', 'cmd': 'edit ${HOME}/.config/astroid/' },
\ { 'line': 'mbsync', 'cmd': 'edit ${HOME}/.mbsyncrc' },
\ { 'line': 'notmuch config', 'cmd': 'edit ${HOME}/.notmuch-config' },
\ { 'line': 'notmuch hooks', 'cmd': 'edit ${HOME}/Mail/.notmuch/hooks/' },
\ ]
endfunction
function s:config_openbox()
return [
\ { 'line': 'autostart.sh', 'cmd': 'edit ~/.config/openbox/autostart.sh' },
\ { 'line': 'rc.xml', 'cmd': 'edit ~/.config/openbox/rc.xml' }
\ { 'line': 'autostart.sh', 'cmd': 'edit ${HOME}/.config/openbox/autostart.sh' },
\ { 'line': 'rc.xml', 'cmd': 'edit ${HOME}/.config/openbox/rc.xml' }
\ ]
endfunction
function s:config_vim()
return [
\ { 'line': 'général', 'cmd': 'edit ${XDG_CONFIG_HOME}/nvim/init.vim' },
\ { 'line': 'fonctions', 'cmd': 'edit ${XDG_CONFIG_HOME}/nvim/functions.vim' },
\ { 'line': 'raccourcis clavier', 'cmd': 'edit ${XDG_CONFIG_HOME}/nvim/keybindings.vim' },
\ { 'line': 'plugings', 'cmd': 'edit ${XDG_CONFIG_HOME}/nvim/plug.vim' },
\ { 'line': "cet écran d'accueil", 'cmd': 'edit ${XDG_CONFIG_HOME}/nvim/startscreen.vim' },
\ { 'line': 'général', 'cmd': 'edit ${HOME}/.config/nvim/init.vim' },
\ { 'line': 'fonctions', 'cmd': 'edit ${HOME}/.config/nvim/functions.vim' },
\ { 'line': 'raccourcis clavier', 'cmd': 'edit ${HOME}/.config/nvim/keybindings.vim' },
\ { 'line': 'plugings', 'cmd': 'edit ${HOME}/.config/nvim/plug.vim' },
\ { 'line': "cet écran d'accueil", 'cmd': 'edit ${HOME}/.config/nvim/startscreen.vim' },
\ ]
endfunction
@ -62,11 +62,11 @@ let g:startify_lists = [
\ ]
let g:startify_bookmarks = [
\ '~/.config/',
\ '~/Dotfiles/',
\ '~/Projets',
\ '~/Projets/latex/latex-homework',
\ '~/.asy'
\ '${HOME}/.config/',
\ '${HOME}/dotfiles/',
\ '${HOME}/Projets',
\ '${HOME}/Projets/latex/latex-homework',
\ '${HOME}/.asy'
\ ]
let g:startify_commands = [

View File

@ -7,7 +7,7 @@ if [[ ! -d "$GTK_THEMES_DIR" ]]; then
fi
if [[ $(ls -A $GTK_THEMES_DIR) ]]; then
git -C "$GTK_THEMES_DIR" pull
git -C "$GTK_THEMES_DIR" pull --no-rebase
else
git clone https://github.com/addy-dclxvi/gtk-theme-collections.git "$GTK_THEMES_DIR"
fi

View File

@ -13,27 +13,27 @@ mkdir -p "$MYTEXMF"
if [[ ! -d "$MYTEXMF/latex-homework" ]]; then
git clone https://src.jefflance.me/jeff/latex-homework.git "$MYTEXMF/latex-homework"
else
git -C "$MYTEXMF/latex-homework" pull
git -C "$MYTEXMF/latex-homework" pull --no-rebase
fi
if [[ ! -d "$MYTEXMF/latex-beamer-themes" ]]; then
git clone https://src.jefflance.me/jeff/latex-beamer-themes.git "$MYTEXMF/latex-beamer-themes"
else
git -C "$MYTEXMF/latex-beamer-themes" pull
git -C "$MYTEXMF/latex-beamer-themes" pull --no-rebase
fi
if [[ ! -d "$MYTEXMF/emerald" ]]; then
git clone https://src.jefflance.me/jeff/emerald.git "$MYTEXMF/emerald"
else
git -C "$MYTEXMF/emerald" pull
git -C "$MYTEXMF/emerald" pull --no-rebase
fi
if [[ ! -d "$HOME/.asy" ]]; then
git clone https://src.jefflance.me/jeff/asymptote-config.git "$HOME/.asy"
else
git -C "$HOME/.asy" pull
git -C "$HOME/.asy" pull --no-rebase
fi
texhash "$MYTEXMF"
exit 0
exit 0

View File

@ -1,5 +1,12 @@
- shell:
-
command: [[ -d ${XDG_CONFIG_HOME}/aacs ]] && rm -r ${XDG_CONFIG_HOME}/aacs && mkdir ${XDG_CONFIG_HOME}/aacs
command: if [ ! -d ${HOME}/.config/aacs ]; then mkdir ${HOME}/.config/aacs; fi
stdout: true
stderr: true
description: Testing directory
-
command: wget -O ${XDG_CONFIG_HOME}/aacs/KEYDB.cfg https://vlc-bluray.whoknowsmy.name/files/KEYDB.cfg
command: if [ ! -f ${HOME}/.config/aacs/KEYDB.cfg ]; then wget --no-check-certificate -O ${HOME}/.config/aacs/KEYDB.cfg http://vlc-bluray.whoknowsmy.name/files/KEYDB.cfg; fi
stdout: true
stderr: true
description: Downloading AACS db keys

View File

@ -1,13 +1,10 @@
- link:
${XDG_CONFIG_HOME}/nvim/:
path: conf.d/nvim/nvim
relink: true
${XDG_CONFIG_HOME}/nvim/init.vim:
path: conf.d/nvim/init.vim
${HOME}/.config/nvim:
path: conf.d/nvim
relink: true
- shell:
- command: '/bin/bash -c "$(which nvim) -es -u ${XDG_CONFIG_HOME}/nvim/init.vim -i NONE -c PlugInstall -c qa || true"'
- command: '/bin/bash -c "$(which nvim) -es -u ${HOME}/.config/nvim/init.vim -i NONE -c PlugInstall -c qa || true"'
stdout: true
stdin: true
stderre: true