Created
October 7, 2020 09:46
-
-
Save knsh14/eea9680e40381f2eea0168ce20e22a17 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[plugins]] | |
repo = 'Shougo/dein.vim' | |
[[plugins]] | |
repo = 'Shougo/vimproc.vim' | |
build = 'make' | |
[[plugins]] | |
repo = 'tpope/vim-fugitive.git' | |
[[plugins]] | |
repo = 'knsh14/vim-github-link.git' | |
rev = 'master' | |
[[plugins]] | |
repo = 'neovim/nvim-lsp' | |
hook_add = ''' | |
lua << EOF | |
require'nvim_lsp'.gopls.setup{} | |
EOF | |
nnoremap <silent> gd <cmd>lua vim.lsp.buf.declaration()<CR> | |
nnoremap <silent> <c-]> <cmd>lua vim.lsp.buf.definition()<CR> | |
nnoremap <silent> K <cmd>lua vim.lsp.buf.hover()<CR> | |
nnoremap <silent> gD <cmd>lua vim.lsp.buf.implementation()<CR> | |
nnoremap <silent> <c-k> <cmd>lua vim.lsp.buf.signature_help()<CR> | |
nnoremap <silent> 1gD <cmd>lua vim.lsp.buf.type_definition()<CR> | |
nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR> | |
nnoremap <silent> g0 <cmd>lua vim.lsp.buf.document_symbol()<CR> | |
nnoremap <silent> gW <cmd>lua vim.lsp.buf.workspace_symbol()<CR> | |
nnoremap <silent> gRN <cmd>lua vim.lsp.buf.rename()<CR> | |
autocmd Filetype * setlocal omnifunc=v:lua.vim.lsp.omnifunc | |
''' | |
[[plugins]] | |
repo = 'itchyny/lightline.vim' | |
depends = ['vim-fugitive.git'] | |
hook_add = 'source ~/.config/dein/lightline.vim' | |
## [[plugins]] | |
## repo = 'autozimu/LanguageClient-neovim' | |
## rev = 'next' | |
## build = 'bash install.sh' | |
## hook_add = ''' | |
## set hidden | |
## | |
## let g:LanguageClient_serverCommands = { | |
## \ 'go': ['/Users/knsh14/go/bin/gopls'], | |
## \ } | |
## set omnifunc=LanguageClient#complete | |
## nnoremap <silent> <Space><Space> :call LanguageClient_contextMenu()<CR> | |
## " Or map each action separately | |
## nnoremap <silent> K :call LanguageClient#textDocument_hover()<CR> | |
## nnoremap <silent> gd :call LanguageClient#textDocument_definition({'gotoCmd': 'split'})<CR> | |
## set completefunc=LanguageClient#complete | |
## ''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[plugins]] | |
repo = 'mattn/vim-goimports' | |
on_ft = 'go' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set enc=utf8 | |
set termencoding=utf-8 | |
set fileencoding=utf-8 | |
set number | |
" tab character settings | |
set autoindent | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set t_Co=256 | |
set cursorline | |
set noswapfile | |
set nobackup | |
set completeopt-=preview | |
set clipboard+=unnamed | |
set showtabline=2 | |
" search | |
set wrapscan | |
set ignorecase | |
set smartcase | |
set hlsearch | |
set incsearch | |
set list | |
set listchars=tab:»-,trail:-,extends:»,precedes:«,nbsp:% | |
set backspace=indent,eol,start | |
" Shift-Tab to decrease indent | |
nnoremap <S-Tab> << | |
inoremap <S-Tab> <C-d> | |
"dein Scripts----------------------------- | |
if &compatible | |
set nocompatible " Be iMproved | |
endif | |
" Required: | |
set runtimepath+=~/.config/dein/repos/github.com/Shougo/dein.vim | |
" Required: | |
if dein#load_state('/Users/knsh14/.vim/dein') | |
call dein#begin('/Users/knsh14/.vim/dein') | |
call dein#load_toml('~/.config/dein/dein.toml', {'lazy': 0}) | |
call dein#load_toml('~/.config/dein/dein_lazy.toml', {'lazy': 1}) | |
" Required: | |
call dein#end() | |
call dein#save_state() | |
endif | |
" Required: | |
filetype plugin indent on | |
syntax enable | |
" If you want to install not installed plugins on startup. | |
if dein#check_install() | |
call dein#install() | |
endif | |
"End dein Scripts------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" set laststatus=2 | |
let g:lightline = { | |
\ 'colorscheme': 'wombat', | |
\ 'mode_map': {'c': 'NORMAL'}, | |
\ 'active': { | |
\ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ]], | |
\ 'right': [[ 'lineinfo' ], | |
\ [ 'percent' ], | |
\ [ 'fileformat', 'fileencoding', 'filetype' ] ] | |
\ }, | |
\ 'component_function': { | |
\ 'fugitive': 'LightlineFugitive', | |
\ 'filename': 'LightlineFilename', | |
\ 'fileformat': 'LightlineFileformat', | |
\ 'filetype': 'LightlineFiletype', | |
\ 'fileencoding': 'LightlineFileEncoding', | |
\ 'mode': 'LightlineMode', | |
\ }, | |
\ 'separator': { 'left': "\ue0b0", 'right': "\ue0b2" }, | |
\ 'subseparator': { 'left': "\ue0b1", 'right': "\ue0b3" } | |
\ } | |
function! LightlineModified() | |
return &ft =~ 'help' ? '' : &modified ? '+' : &modifiable ? '' : '-' | |
endfunction | |
function! LightlineReadonly() | |
return &ft !~? 'help' && &readonly ? 'RO' : '' | |
endfunction | |
function! LightlineFilename() | |
let fname = expand('%:h') | |
return ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') . | |
\ ('' != fname ? fname : '[No Name]') . | |
\ ('' != LightlineModified() ? ' ' . LightlineModified() : '') | |
endfunction | |
function! LightlineFugitive() | |
if exists("*fugitive#head") | |
let branch = fugitive#head() | |
return branch !=# '' ? "\ue0a0".' '.branch : '' | |
endif | |
return '' | |
endfunction | |
function! LightlineFileformat() | |
return winwidth(0) > 70 ? &fileformat : '' | |
endfunction | |
function! LightlineFiletype() | |
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : '' | |
endfunction | |
function! LightlineFileEncoding() | |
return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : '' | |
endfunction | |
function! LightlineMode() | |
let fname = expand('%:t') | |
return winwidth(0) > 60 ? lightline#mode() : '' | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment