Commit 3d15fe42 authored by Franciszek Madej's avatar Franciszek Madej 🤞

Switch to Oni from Neovim

parent 42a94a4c
......@@ -2,10 +2,6 @@
""" Neovim Configuration """
""""""""""""""""""""""""""""
let OS=substitute(system('uname -o'),"\n","","")
filetype plugin indent on " Load plugins according to detected filetype.
syntax on " Enable syntax highlighting.
set encoding =utf-8 " https://xkcd.com/927/
set autoindent " Indent according to previous line.
......@@ -79,85 +75,43 @@ if &compatible
set nocompatible
endif
function! s:hook(hooktype, name)
echom a:hooktype
" You can use `minpac#getpluginfo()` to get the information about
" the plugin.
echom 'Directory:' minpac#getpluginfo(a:name).dir
call system('./install.sh')
endfunction
if exists('*minpac#init')
" minpac is loaded.
call minpac#init()
call minpac#add('k-takata/minpac', { 'type': 'opt' })
"""""""""""""""""""""""""
""" Installed plugins """
"""""""""""""""""""""""""
""" Speed Ups """
call minpac#add('tpope/vim-commentary') " Better comments
call minpac#add('tpope/vim-surround') " Better bracketing
"""" UI """"
call minpac#add('chriskempson/base16-vim') " Color scheme
call minpac#add('Yggdroot/indentLine') " Shows indent level
call minpac#add('myusuf3/numbers.vim') " Toggle numbers between modes
call minpac#add('vim-airline/vim-airline') " Better statusline
call minpac#add('vim-airline/vim-airline-themes') " Better statusline themes
call minpac#add('junegunn/goyo.vim') " Distraction Free!
call minpac#add('junegunn/limelight.vim') " More!
call minpac#add('ap/vim-css-color') " Color Highlighting
call minpac#add('airblade/vim-gitgutter') " Git Status on Gutter
""" File managment """
call minpac#add('scrooloose/nerdtree') " Tree explorer plugin
call minpac#add('Xuyuanp/nerdtree-git-plugin') " Show git status in NERDTree
call minpac#add('junegunn/fzf') " Super fast file finder
call minpac#add('junegunn/fzf.vim') " Same as above, just even more awesome
call minpac#add('tpope/vim-fugitive') " Git support
""" Code completion and errors """
call minpac#add('w0rp/ale') " Linter plugin
if (OS != "Android") " do something that doesn't make sense on phone
call minpac#add('autozimu/LanguageClient-neovim',
\{
\'do': function('s:hook')
\}) " LSP Plugin (run ./install.sh)
" Add the dein installation directory into runtimepath
set runtimepath+=~/.config/nvim/dein/repos/github.com/Shougo/dein.vim
if dein#load_state('~/.config/nvim/dein')
call dein#begin('~/.config/nvim/dein')
call dein#add('~/.config/nvim/dein')
call dein#add('chaoren/vim-wordmotion')
call dein#add('chriskempson/base16-vim')
call dein#add('myusuf3/numbers.vim')
call dein#add('Vimjas/vim-python-pep8-indent')
call dein#add('ekalinin/Dockerfile.vim')
call dein#add('framallo/taskwarrior.vim')
call dein#add('cespare/vim-toml')
call dein#add('chr4/nginx.vim')
call dein#add('plasticboy/vim-markdown')
if !exists('g:gui_oni')
" Statusline
call dein#add('vim-airline/vim-airline')
call dein#add('vim-airline/vim-airline-themes')
""" File managment """
call dein#add('junegunn/fzf')
call dein#add('junegunn/fzf.vim')
""" Prose """
call dein#add('junegunn/goyo.vim')
call dein#add('junegunn/limelight.vim')
endif
call minpac#add('Shougo/deoplete.nvim',
\{
\'do': ':UpdateRemotePlugins'
\}) " Autocomplete plugin
""" Language specific """
""" Python """
call minpac#add('vim-scripts/indentpython.vim') " Better Python Indentation
call minpac#add('fisadev/vim-isort') " Python imports sorting
""" Webdev """
call minpac#add('leafgarland/typescript-vim') " Typescript syntax
call minpac#add('posva/vim-vue') " Vue Single File Components Syntax
call minpac#add('mattn/emmet-vim') " Sane HTML
call minpac#add('gregsexton/MatchTag') " HTML Tags Matching
call minpac#add('wavded/vim-stylus') " Stylus Syntax
call minpac#add('pangloss/vim-javascript') " JS Syntax Improved
""" Misc """
call minpac#add('rhysd/vim-crystal') " Crystal Language Support
""" Sysadmin """
call minpac#add('ekalinin/Dockerfile.vim') " Dockerfile support
call minpac#add('framallo/taskwarrior.vim') " Taskwarrior syntax
call minpac#add('cespare/vim-toml') " TOML File syntax
call minpac#add('chr4/nginx.vim') " Nginx Configuration Files
""" Prose """
call minpac#add('plasticboy/vim-markdown') " Markdown syntax
call dein#end()
call dein#save_state()
endif
filetype plugin indent on
syntax on
""""""""""""""""""""""""""""""
""" Plugin settings here. """
""""""""""""""""""""""""""""""
......@@ -168,53 +122,17 @@ colorscheme base16-tomorrow
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#formatter = 'default'
let g:airline_theme = 'base16_tomorrow'
let g:airline#extensions#ale#enabled = 1
let g:airline#extensions#taboo#enabled = 1
let g:airline_section_z = '%l:%v' " Simple line and row counter
" Show all levels of indent
let g:indentLine_showFirstIndentLevel = 1
" Enable autocomplete
let g:deoplete#enable_at_startup = 1
" LanguageClient
let g:LanguageClient_autoStart=1
let g:LanguageClient_serverCommands = {
\ 'vue': ['vls'],
\ 'crystal': ['scry'],
\ 'python': ['pyls'],
\ 'javascript': ['javascript-typescript-stdio'],
\ 'typescript': ['javascript-typescript-stdio']
\}
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
"""""""""""""""""""
""" Keybindings """
"""""""""""""""""""
let g:rg_command = '
\ rg --column --line-number --no-heading --fixed-strings
\ --ignore-case --no-ignore --hidden --follow --color "always"
\ -g "*.{js,json,php,md,styl,jade,html,config,py,cpp,c,go,hs,rb,conf}"
\ -g "!{.git,node_modules,vendor}/*" '
command! -bang -nargs=* F call fzf#vim#grep(g:rg_command .shellescape(<q-args>), 1, <bang>0)
" File and editor navigation
map <leader>n :NERDTreeToggle<CR>
map <leader>F :F .<CR>
map <leader>f :Files .<CR>
map <leader>b :Buffers <CR>
" Linter and completion settings
map <leader>i :call LanguageClient_textDocument_hover()<CR>
map <leader>d :call LanguageClient_textDocument_definition()<CR>
map <leader>r :call LanguageClient_textDocument_rename()<CR>
""""""""""""""""""""""""""""""""""""
""" Python code editing settings """
""""""""""""""""""""""""""""""""""""
......@@ -244,9 +162,3 @@ au FileType javascript,html,css,vue,typescript
autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!
" Define user commands for updating/cleaning the plugins.
" Each of them loads minpac, reloads .vimrc to register the
" information of plugins, then performs the task.
command! PackUpdate packadd minpac | source $MYVIMRC | call minpac#update()
command! PackClean packadd minpac | source $MYVIMRC | call minpac#clean()
"use strict";
exports.__esModule = true;
exports.activate = function (oni) {
console.log("config activated");
// Input
//
// Add input bindings here:
//
oni.input.bind("<c-enter>", function () { return console.log("Control+Enter was pressed"); });
//
// Or remove the default bindings here by uncommenting the below line:
//
// oni.input.unbind("<c-p>")
};
exports.deactivate = function (oni) {
console.log("config deactivated");
};
exports.configuration = {
//add custom config here, such as
"ui.colorscheme": "base16-tomorrow",
"oni.hideMenu": true,
//"oni.useDefaultConfig": true,
//"oni.bookmarks": ["~/Documents"],
"oni.loadInitVim": true,
//"editor.fontSize": "12px",
"editor.fontFamily": "Fira Code",
"experimental.markdownPreview.enabled": true,
"experimental.markdownPreview.autoscroll": true,
"editor.clipboard.enabled": true,
// UI customizations
"ui.animations.enabled": true,
"ui.fontSmoothing": "auto",
"ui.fontFamily": "Fira Sans"
};
import * as React from "react"
import * as Oni from "oni-api"
export const activate = (oni: Oni.Plugin.Api) => {
console.log("config activated")
// Input
//
// Add input bindings here:
//
oni.input.bind("<c-enter>", () => console.log("Control+Enter was pressed"))
//
// Or remove the default bindings here by uncommenting the below line:
//
// oni.input.unbind("<c-p>")
}
export const deactivate = (oni: Oni.Plugin.Api) => {
console.log("config deactivated")
}
export const configuration = {
//add custom config here, such as
"ui.colorscheme": "base16-tomorrow",
"oni.hideMenu": true,
//"oni.useDefaultConfig": true,
//"oni.bookmarks": ["~/Documents"],
"oni.loadInitVim": true,
//"editor.fontSize": "12px",
"editor.fontFamily": "Fira Code",
"experimental.markdownPreview.enabled": true,
"experimental.markdownPreview.autoscroll": true,
"editor.clipboard.enabled": true,
// UI customizations
"ui.animations.enabled": true,
"ui.fontSmoothing": "auto",
"ui.fontFamily": "Fira Sans"
}
......@@ -66,24 +66,3 @@ nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
""""""""""""""""""""""""""""""""""""
""" Python code editing settings """
""""""""""""""""""""""""""""""""""""
""" loosley based on
""" https://realpython.com/vim-and-python-a-match-made-in-heaven/
""" Ensure conforming to PEP8
au FileType python
\ setlocal tabstop=4 |
""""""""""""""""""""""""""""""""""""""""
""" JavaScript code editing settings """
""""""""""""""""""""""""""""""""""""""""
""" Ensure conforming to my style. :D
au FileType javascript,html,css,vue
\ setlocal tabstop=2 |
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment