parent
5cb1c6baa6
commit
e24c34964e
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,94 @@ |
||||
|
||||
set background=light |
||||
|
||||
hi clear |
||||
if exists("syntax_on") |
||||
syntax reset |
||||
endif |
||||
|
||||
let colors_name = "pyte" |
||||
|
||||
if version >= 700 |
||||
hi CursorLine guibg=#f6f6f6 |
||||
hi CursorColumn guibg=#eaeaea |
||||
hi MatchParen guifg=white guibg=#80a090 gui=bold |
||||
|
||||
"Tabpages |
||||
hi TabLine guifg=black guibg=#b0b8c0 gui=italic |
||||
hi TabLineFill guifg=#9098a0 |
||||
hi TabLineSel guifg=black guibg=#f0f0f0 gui=italic,bold |
||||
|
||||
"P-Menu (auto-completion) |
||||
hi Pmenu guifg=white guibg=#808080 |
||||
"PmenuSel |
||||
"PmenuSbar |
||||
"PmenuThumb |
||||
endif |
||||
" |
||||
" Html-Titles |
||||
hi Title guifg=#202020 gui=bold |
||||
hi Underlined guifg=#202020 gui=underline |
||||
|
||||
|
||||
hi Cursor guifg=black guibg=#b0b4b8 |
||||
hi lCursor guifg=black guibg=white |
||||
hi LineNr guifg=#ffffff guibg=#c0d0e0 |
||||
|
||||
hi Normal guifg=#404850 guibg=#f0f0f0 |
||||
|
||||
hi StatusLine guifg=white guibg=#8090a0 gui=bold,italic |
||||
hi StatusLineNC guifg=#506070 guibg=#a0b0c0 gui=italic |
||||
hi VertSplit guifg=#a0b0c0 guibg=#a0b0c0 gui=NONE |
||||
|
||||
" hi Folded guifg=#708090 guibg=#c0d0e0 |
||||
hi Folded guifg=#a0a0a0 guibg=#e8e8e8 gui=italic |
||||
|
||||
hi NonText guifg=#c0c0c0 guibg=#e0e0e0 |
||||
" Kommentare |
||||
hi Comment guifg=#a0b0c0 gui=italic |
||||
|
||||
" Konstanten |
||||
hi Constant guifg=#a07040 |
||||
hi String guifg=#4070a0 |
||||
hi Number guifg=#40a070 |
||||
hi Float guifg=#70a040 |
||||
"hi Statement guifg=#0070e0 gui=NONE |
||||
" Python: def and so on, html: tag-names |
||||
hi Statement guifg=#007020 gui=bold |
||||
|
||||
|
||||
" HTML: arguments |
||||
hi Type guifg=#e5a00d gui=italic |
||||
" Python: Standard exceptions, True&False |
||||
hi Structure guifg=#007020 gui=italic |
||||
hi Function guifg=#06287e gui=italic |
||||
|
||||
hi Identifier guifg=#5b3674 gui=italic |
||||
|
||||
hi Repeat guifg=#7fbf58 gui=bold |
||||
hi Conditional guifg=#4c8f2f gui=bold |
||||
|
||||
" Cheetah: #-Symbol, function-names |
||||
hi PreProc guifg=#1060a0 gui=NONE |
||||
" Cheetah: def, for and so on, Python: Decorators |
||||
hi Define guifg=#1060a0 gui=bold |
||||
|
||||
hi Error guifg=red guibg=white gui=bold,underline |
||||
hi Todo guifg=#a0b0c0 guibg=NONE gui=italic,bold,underline |
||||
|
||||
" Python: %(...)s - constructs, encoding |
||||
hi Special guifg=#70a0d0 gui=italic |
||||
|
||||
hi Operator guifg=#408010 |
||||
|
||||
" color of <TAB>s etc... |
||||
"hi SpecialKey guifg=#d8a080 guibg=#e8e8e8 gui=italic |
||||
hi SpecialKey guifg=#d0b0b0 guibg=#f0f0f0 gui=none |
||||
|
||||
" Diff |
||||
hi DiffChange guifg=NONE guibg=#e0e0e0 gui=italic,bold |
||||
hi DiffText guifg=NONE guibg=#f0c8c8 gui=italic,bold |
||||
hi DiffAdd guifg=NONE guibg=#c0e0d0 gui=italic,bold |
||||
hi DiffDelete guifg=NONE guibg=#f0e0b0 gui=italic,bold |
||||
|
||||
|
@ -0,0 +1,322 @@ |
||||
" Vim color file |
||||
" Maintainer: Martin Baeuml <baeuml@gmail.com> |
||||
" Last Change: 2008-02-09 |
||||
" |
||||
" This color file is a modification of the "summerfruit" color scheme by Armin Ronacher |
||||
" so that it can be used on 88- and 256-color xterms. The colors are translated |
||||
" using Henry So's programmatic approximation of gui colors from his "desert256" |
||||
" color scheme. |
||||
" |
||||
" I removed the "italic" option and the background color from |
||||
" comment-coloring because that looks odd on my console. |
||||
" |
||||
" The original "summerfruit" color scheme and "desert256" are available from vim.org. |
||||
|
||||
set background=light |
||||
if version > 580 |
||||
" no guarantees for version 5.8 and below, but this makes it stop |
||||
" complaining |
||||
hi clear |
||||
if exists("syntax_on") |
||||
syntax reset |
||||
endif |
||||
endif |
||||
let g:colors_name="summerfruit256" |
||||
|
||||
if has("gui_running") || &t_Co == 88 || &t_Co == 256 |
||||
" functions {{{ |
||||
" returns an approximate grey index for the given grey level |
||||
fun <SID>grey_number(x) |
||||
if &t_Co == 88 |
||||
if a:x < 23 |
||||
return 0 |
||||
elseif a:x < 69 |
||||
return 1 |
||||
elseif a:x < 103 |
||||
return 2 |
||||
elseif a:x < 127 |
||||
return 3 |
||||
elseif a:x < 150 |
||||
return 4 |
||||
elseif a:x < 173 |
||||
return 5 |
||||
elseif a:x < 196 |
||||
return 6 |
||||
elseif a:x < 219 |
||||
return 7 |
||||
elseif a:x < 243 |
||||
return 8 |
||||
else |
||||
return 9 |
||||
endif |
||||
else |
||||
if a:x < 14 |
||||
return 0 |
||||
else |
||||
let l:n = (a:x - 8) / 10 |
||||
let l:m = (a:x - 8) % 10 |
||||
if l:m < 5 |
||||
return l:n |
||||
else |
||||
return l:n + 1 |
||||
endif |
||||
endif |
||||
endif |
||||
endfun |
||||
|
||||
" returns the actual grey level represented by the grey index |
||||
fun <SID>grey_level(n) |
||||
if &t_Co == 88 |
||||
if a:n == 0 |
||||
return 0 |
||||
elseif a:n == 1 |
||||
return 46 |
||||
elseif a:n == 2 |
||||
return 92 |
||||
elseif a:n == 3 |
||||
return 115 |
||||
elseif a:n == 4 |
||||
return 139 |
||||
elseif a:n == 5 |
||||
return 162 |
||||
elseif a:n == 6 |
||||
return 185 |
||||
elseif a:n == 7 |
||||
return 208 |
||||
elseif a:n == 8 |
||||
return 231 |
||||
else |
||||
return 255 |
||||
endif |
||||
else |
||||
if a:n == 0 |
||||
return 0 |
||||
else |
||||
return 8 + (a:n * 10) |
||||
endif |
||||
endif |
||||
endfun |
||||
|
||||
" returns the palette index for the given grey index |
||||
fun <SID>grey_color(n) |
||||
if &t_Co == 88 |
||||
if a:n == 0 |
||||
return 16 |
||||
elseif a:n == 9 |
||||
return 79 |
||||
else |
||||
return 79 + a:n |
||||
endif |
||||
else |
||||
if a:n == 0 |
||||
return 16 |
||||
elseif a:n == 25 |
||||
return 231 |
||||
else |
||||
return 231 + a:n |
||||
endif |
||||
endif |
||||
endfun |
||||
|
||||
" returns an approximate color index for the given color level |
||||
fun <SID>rgb_number(x) |
||||
if &t_Co == 88 |
||||
if a:x < 69 |
||||
return 0 |
||||
elseif a:x < 172 |
||||
return 1 |
||||
elseif a:x < 230 |
||||
return 2 |
||||
else |
||||
return 3 |
||||
endif |
||||
else |
||||
if a:x < 75 |
||||
return 0 |
||||
else |
||||
let l:n = (a:x - 55) / 40 |
||||
let l:m = (a:x - 55) % 40 |
||||
if l:m < 20 |
||||
return l:n |
||||
else |
||||
return l:n + 1 |
||||
endif |
||||
endif |
||||
endif |
||||
endfun |
||||
|
||||
" returns the actual color level for the given color index |
||||
fun <SID>rgb_level(n) |
||||
if &t_Co == 88 |
||||
if a:n == 0 |
||||
return 0 |
||||
elseif a:n == 1 |
||||
return 139 |
||||
elseif a:n == 2 |
||||
return 205 |
||||
else |
||||
return 255 |
||||
endif |
||||
else |
||||
if a:n == 0 |
||||
return 0 |
||||
else |
||||
return 55 + (a:n * 40) |
||||
endif |
||||
endif |
||||
endfun |
||||
|
||||
" returns the palette index for the given R/G/B color indices |
||||
fun <SID>rgb_color(x, y, z) |
||||
if &t_Co == 88 |
||||
return 16 + (a:x * 16) + (a:y * 4) + a:z |
||||
else |
||||
return 16 + (a:x * 36) + (a:y * 6) + a:z |
||||
endif |
||||
endfun |
||||
|
||||
" returns the palette index to approximate the given R/G/B color levels |
||||
fun <SID>color(r, g, b) |
||||
" get the closest grey |
||||
let l:gx = <SID>grey_number(a:r) |
||||
let l:gy = <SID>grey_number(a:g) |
||||
let l:gz = <SID>grey_number(a:b) |
||||
|
||||
" get the closest color |
||||
let l:x = <SID>rgb_number(a:r) |
||||
let l:y = <SID>rgb_number(a:g) |
||||
let l:z = <SID>rgb_number(a:b) |
||||
|
||||
if l:gx == l:gy && l:gy == l:gz |
||||
" there are two possibilities |
||||
let l:dgr = <SID>grey_level(l:gx) - a:r |
||||
let l:dgg = <SID>grey_level(l:gy) - a:g |
||||
let l:dgb = <SID>grey_level(l:gz) - a:b |
||||
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb) |
||||
let l:dr = <SID>rgb_level(l:gx) - a:r |
||||
let l:dg = <SID>rgb_level(l:gy) - a:g |
||||
let l:db = <SID>rgb_level(l:gz) - a:b |
||||
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db) |
||||
if l:dgrey < l:drgb |
||||
" use the grey |
||||
return <SID>grey_color(l:gx) |
||||
else |
||||
" use the color |
||||
return <SID>rgb_color(l:x, l:y, l:z) |
||||
endif |
||||
else |
||||
" only one possibility |
||||
return <SID>rgb_color(l:x, l:y, l:z) |
||||
endif |
||||
endfun |
||||
|
||||
" returns the palette index to approximate the 'rrggbb' hex string |
||||
fun <SID>rgb(rgb) |
||||
let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0 |
||||
let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0 |
||||
let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0 |
||||
|
||||
return <SID>color(l:r, l:g, l:b) |
||||
endfun |
||||
|
||||
" sets the highlighting for the given group |
||||
fun <SID>X(group, fg, bg, attr) |
||||
if a:fg != "" |
||||
exec "hi " . a:group . " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg) |
||||
endif |
||||
if a:bg != "" |
||||
exec "hi " . a:group . " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg) |
||||
endif |
||||
if a:attr != "" |
||||
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr |
||||
endif |
||||
endfun |
||||
" }}} |
||||
|
||||
" Global |
||||
call <SID>X("Normal", "000000", "ffffff", "") |
||||
call <SID>X("NonText", "438ec3", "b7dce8", "") |
||||
|
||||
" Search |
||||
call <SID>X("Search", "800000", "ffae00", "") |
||||
call <SID>X("IncSearch", "800000", "ffae00", "") |
||||
|
||||
" Interface Elements |
||||
call <SID>X("StatusLine", "ffffff", "43c464", "bold") |
||||
call <SID>X("StatusLineNC", "9bd4a9", "51b069", "") |
||||
call <SID>X("VertSplit", "3687a2", "3687a2", "") |
||||
call <SID>X("Folded", "3c78a2", "c3daea", "") |
||||
call <SID>X("IncSearch", "708090", "f0e68c", "") |
||||
call <SID>X("Pmenu", "ffffff", "cb2f27", "") |
||||
call <SID>X("SignColumn", "", "", "") |
||||
call <SID>X("CursorLine", "", "c0d9eb", "") |
||||
call <SID>X("LineNr", "eeeeee", "438ec3", "bold") |
||||
call <SID>X("MatchParen", "", "", "") |
||||
|
||||
" Specials |
||||
call <SID>X("Todo", "e50808", "dbf3cd", "bold") |
||||
call <SID>X("Title", "000000", "", "") |
||||
call <SID>X("Special", "fd8900", "", "") |
||||
|
||||
" Syntax Elements |
||||
call <SID>X("String", "0086d2", "", "") |
||||
call <SID>X("Constant", "0086d2", "", "") |
||||
call <SID>X("Number", "0086f7", "", "") |
||||
call <SID>X("Statement", "fb660a", "", "") |
||||
call <SID>X("Function", "ff0086", "", "") |
||||
call <SID>X("PreProc", "ff0007", "", "") |
||||
call <SID>X("Comment", "22a21f", "", "bold") |
||||
call <SID>X("Type", "70796b", "", "") |
||||
call <SID>X("Error", "ffffff", "d40000", "") |
||||
call <SID>X("Identifier", "ff0086", "", "") |
||||
call <SID>X("Label", "ff0086", "", "") |
||||
|
||||
" Python Highlighting |
||||
call <SID>X("pythonCoding", "ff0086", "", "") |
||||
call <SID>X("pythonRun", "ff0086", "", "") |
||||
call <SID>X("pythonBuiltinObj", "2b6ba2", "", "") |
||||
call <SID>X("pythonBuiltinFunc", "2b6ba2", "", "") |
||||
call <SID>X("pythonException", "ee0000", "", "") |
||||
call <SID>X("pythonExClass", "66cd66", "", "") |
||||
call <SID>X("pythonSpaceError", "", "", "") |
||||
call <SID>X("pythonDocTest", "2f5f49", "", "") |
||||
call <SID>X("pythonDocTest2", "3b916a", "", "") |
||||
call <SID>X("pythonFunction", "ee0000", "", "") |
||||
call <SID>X("pythonClass", "ff0086", "", "") |
||||
|
||||
" HTML Highlighting |
||||
call <SID>X("htmlTag", "00bdec", "", "") |
||||
call <SID>X("htmlEndTag", "00bdec", "", "") |
||||
call <SID>X("htmlSpecialTagName", "4aa04a", "", "") |
||||
call <SID>X("htmlTagName", "4aa04a", "", "") |
||||
call <SID>X("htmlTagN", "4aa04a", "", "") |
||||
|
||||
" Jinja Highlighting |
||||
call <SID>X("jinjaTagBlock", "ff0007", "fbf4c7", "bold") |
||||
call <SID>X("jinjaVarBlock", "ff0007", "fbf4c7", "") |
||||
call <SID>X("jinjaString", "0086d2", "fbf4c7", "") |
||||
call <SID>X("jinjaNumber", "bf0945", "fbf4c7", "bold") |
||||
call <SID>X("jinjaStatement", "fb660a", "fbf4c7", "bold") |
||||
call <SID>X("jinjaComment", "008800", "002300", "italic") |
||||
call <SID>X("jinjaFilter", "ff0086", "fbf4c7", "") |
||||
call <SID>X("jinjaRaw", "aaaaaa", "fbf4c7", "") |
||||
call <SID>X("jinjaOperator", "ffffff", "fbf4c7", "") |
||||
call <SID>X("jinjaVariable", "92cd35", "fbf4c7", "") |
||||
call <SID>X("jinjaAttribute", "dd7700", "fbf4c7", "") |
||||
call <SID>X("jinjaSpecial", "008ffd", "fbf4c7", "") |
||||
|
||||
" delete functions {{{ |
||||
delf <SID>X |
||||
delf <SID>rgb |
||||
delf <SID>color |
||||
delf <SID>rgb_color |
||||
delf <SID>rgb_level |
||||
delf <SID>rgb_number |
||||
delf <SID>grey_color |
||||
delf <SID>grey_level |
||||
delf <SID>grey_number |
||||
" }}} |
||||
endif |
||||
|
||||
" vim: set fdl=0 fdm=marker: |
||||
|
@ -0,0 +1,288 @@ |
||||
set nocompatible " disable compatibility to old-time vi |
||||
set showmatch " show matching |
||||
set ignorecase " case insensitive |
||||
set hlsearch " highlight search |
||||
set incsearch " incremental search |
||||
set tabstop=4 " number of columns occupied by a tab |
||||
set softtabstop=4 " see multiple spaces as tabstops so <BS> does the right thing |
||||
set expandtab " converts tabs to white space |
||||
set shiftwidth=4 " width for autoindents |
||||
set autoindent " indent a new line the same amount as the line just typed |
||||
set number " add line numbers |
||||
|
||||
set relativenumber " turn relative line numbers on |
||||
set rnu |
||||
|
||||
set laststatus=2 |
||||
|
||||
set wildmode=longest,list " get bash-like tab completions |
||||
set cc=80 " set an 80 column border for good coding style |
||||
|
||||
syntax on " syntax highlighting |
||||
set mouse=a " enable mouse click |
||||
set clipboard=unnamedplus " using system clipboard |
||||
filetype plugin on |
||||
set cursorline " highlight current cursorline |
||||
set ttyfast " Speed up scrolling in Vim |
||||
|
||||
set spell " enable spell check (may need to download language package) |
||||
set spelllang=en,ru |
||||
set spellsuggest=best,9 |
||||
|
||||
" regenerate spell dicts on startup |
||||
for d in glob('~/.vim/spell/*.add', 1, 1) |
||||
if filereadable(d) && (!filereadable(d . '.spl') || getftime(d) > getftime(d . '.spl')) |
||||
exec 'mkspell! ' . fnameescape(d) |
||||
endif |
||||
endfor |
||||
nnoremap <silent> <F11> :set spell!<cr> |
||||
inoremap <silent> <F11> <C-O>:set spell!<cr> |
||||
|
||||
set noswapfile " disable creating swap file |
||||
set backupdir=~/.cache/vim " Directory to store backup files. |
||||
|
||||
filetype plugin indent on "allow auto-indenting depending on file type |
||||
|
||||
nnoremap <C-N> :bnext<CR> |
||||
nnoremap <C-P> :bprev<CR> |
||||
|
||||
let g:python3_host_prog = '/usr/bin/python3.10' |
||||
" let g:python3_host_prog = '/home/apr/work/tchk/venv/bin/python3.10' |
||||
" let g:python3_host_prog = '/home/apr/.virtualenvs/pyg/bin/python3' |
||||
|
||||
" netrw magic |
||||
" enable mouse usage. makes it easier to browse multiple tabs |
||||
set mouse=a |
||||
" hide netrw top message |
||||
let g:netrw_banner=0 |
||||
" tree listing by default |
||||
let g:netrw_liststyle=3 |
||||
" hide vim swap files |
||||
let g:netrw_list_hide='.*\.swp$' |
||||
" open files in left window by default |
||||
let g:netrw_chgwin=1 |
||||
" remap alt-enter to fire up the sidebar |
||||
nnoremap <silent> <A-CR> :rightbelow 20vs<CR>:e .<CR> |
||||
" " the same remap as above - may be necessary in some distros |
||||
" nnoremap <silent> <C-M> :rightbelow 20vs<CR>:e .<CR> |
||||
" remap control-enter to open files in new tab |
||||
nmap <silent> <C-CR> t :rightbelow 20vs<CR>:e .<CR>:wincmd h<CR> |
||||
" the same remap as above - may be necessary in some distros |
||||
nmap <silent> <NL> t :rightbelow 20vs<CR>:e .<CR>:wincmd h<CR> |
||||
|
||||
call plug#begin("~/.vim/plugged") |
||||
" Plugin Section |
||||
|
||||
" light theme |
||||
Plug 'sonph/onehalf', { 'rtp': 'vim' } |
||||
|
||||
" autoquotes |
||||
Plug 'jiangmiao/auto-pairs' |
||||
|
||||
" to show separate buffers as tabs |
||||
Plug 'ap/vim-buftabline' |
||||
|
||||
" have no idea |
||||
Plug 'tpope/vim-vinegar' |
||||
|
||||
" some icons |
||||
Plug 'ryanoasis/vim-devicons' |
||||
Plug 'SirVer/ultisnips' |
||||
|
||||
Plug 'honza/vim-snippets' |
||||
Plug 'mhinz/vim-startify' |
||||
" Plug 'NLKNguyen/papercolor-theme' |
||||
Plug 'habamax/vim-asciidoctor' |
||||
|
||||
" markdown shit |
||||
Plug 'godlygeek/tabular' |
||||
Plug 'plasticboy/vim-markdown' |
||||
|
||||
" deoplete for whatever it is needed |
||||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } |
||||
|
||||
Plug 'zchee/deoplete-jedi' |
||||
Plug 'roxma/nvim-yarp' |
||||
Plug 'roxma/vim-hug-neovim-rpc' |
||||
|
||||
" Plugin for renaming python and not only |
||||
Plug 'davidhalter/jedi-vim' |
||||
|
||||
Plug 'neomake/neomake' |
||||
" tree sitter at least for better highlighting |
||||
" as recommended updating the parsers on update |
||||
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} |
||||
|
||||
" bindings for shellcheck |
||||
Plug 'itspriddle/vim-shellcheck' |
||||
|
||||
" Fuzzy finder |
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } |
||||
|
||||
" vim-plug |
||||
Plug 'LnL7/vim-nix' |
||||
|
||||
" Collection of common configurations for the Nvim LSP client |
||||
Plug 'neovim/nvim-lspconfig' |
||||
|
||||
" Completion framework |
||||
" Plug 'hrsh7th/nvim-cmp' |
||||
|
||||
" LSP completion source for nvim-cmp |
||||
" Plug 'hrsh7th/cmp-nvim-lsp' |
||||
|
||||
" Snippet completion source for nvim-cmp |
||||
" Plug 'hrsh7th/cmp-vsnip' |
||||
|
||||
" Other usefull completion sources |
||||
" Plug 'hrsh7th/cmp-path' |
||||
" Plug 'hrsh7th/cmp-buffer' |
||||
" See hrsh7th's other plugins for more completion sources! |
||||
|
||||
" To enable more of the features of rust-analyzer, such as inlay hints and more! |
||||
Plug 'simrat39/rust-tools.nvim' |
||||
" gitblame |
||||
Plug 'f-person/git-blame.nvim' |
||||
|
||||
call plug#end() |
||||
|
||||
set t_Co=256 |
||||
set cursorline |
||||
set termguicolors |
||||
colorscheme summerfruit256 |
||||
let g:airline_theme='onehalfdark' |
||||
|
||||
" lightline |
||||
" let g:lightline = { 'colorscheme': 'onehalfdark' } |
||||
|
||||
" vim-markdown disable folding |
||||
let g:vim_markdown_folding_disabled=1 |
||||
|
||||
let g:deoplete#enable_at_startup = 1 |
||||
|
||||
" disable autocompletion, because we use deoplete for completion |
||||
let g:jedi#completions_enabled = 0 |
||||
|
||||
" open the go-to function in split, not another buffer |
||||
let g:jedi#use_splits_not_buffers = "right" |
||||
|
||||
" when to wtivate neomake |
||||
call neomake#configure#automake('nrwi', 50) |
||||
|
||||
" enable linter |
||||
let g:neomake_python_enabled_makers = ['pylint'] |
||||
|
||||
" Set ultisnips triggers |
||||
let g:UltiSnipsExpandTrigger="<tab>" |
||||
let g:UltiSnipsJumpForwardTrigger="<tab>" |
||||
let g:UltiSnipsJumpBackwardTrigger="<s-tab>" |
||||
|
||||
" buftabline configuration |
||||
let g:buftabline_numbers=1 |
||||
let g:buftabline_indicators=1 |
||||
|
||||
let &fillchars ..= ',eob: ' |
||||
|
||||
" nnoremap <silent> <F11> :set spell!<cr> |
||||
nnoremap <silent> <F5> :FZF<CR> |
||||
|
||||
" Rust setup |
||||
" Set completeopt to have a better completion experience |
||||
" :help completeopt |
||||
" menuone: popup even when there's only one match |
||||
" noinsert: Do not insert text until a selection is made |
||||
" noselect: Do not select, force user to select one from the menu |
||||
" set completeopt=menuone,noinsert,noselect |
||||
" |
||||
" " Avoid showing extra messages when using completion |
||||
" set shortmess+=c |
||||
" |
||||
" " Configure LSP through rust-tools.nvim plugin. |
||||
" " rust-tools will configure and enable certain LSP features for us. |
||||
" " See https://github.com/simrat39/rust-tools.nvim#configuration |
||||
" lua <<EOF |
||||
" local nvim_lsp = require'lspconfig' |
||||
" |
||||
" local opts = { |
||||
" tools = { -- rust-tools options |
||||
" autoSetHints = true, |
||||
" hover_with_actions = true, |
||||
" inlay_hints = { |
||||
" show_parameter_hints = false, |
||||
" parameter_hints_prefix = "", |
||||
" other_hints_prefix = "", |
||||
" }, |
||||
" }, |
||||
" |
||||
" -- all the opts to send to nvim-lspconfig |
||||
" -- these override the defaults set by rust-tools.nvim |
||||
" -- see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer |
||||
" server = { |
||||
" -- on_attach is a callback called when the language server attachs to the buffer |
||||
" -- on_attach = on_attach, |
||||
" settings = { |
||||
" -- to enable rust-analyzer settings visit: |
||||
" -- https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_config.adoc |
||||
" ["rust-analyzer"] = { |
||||
" -- enable clippy on save |
||||
" checkOnSave = { |
||||
" command = "clippy" |
||||
" }, |
||||
" } |
||||
" } |
||||
" }, |
||||
" } |
||||
" require('rust-tools').setup(opts) |
||||
" EOF |
||||
" |
||||
" " Setup Completion |
||||
" " See https://github.com/hrsh7th/nvim-cmp#basic-configuration |
||||
" |
||||
" lua <<EOF |
||||
" local cmp = require'cmp' |
||||
" cmp.setup({ |
||||
" -- Enable LSP snippets |
||||
" snippet = { |
||||
" expand = function(args) |
||||
" vim.fn["UltiSnips#Anon"](args.body) |
||||
" end, |
||||
" }, |
||||
" mapping = { |
||||
" -- ['<C-p>'] = cmp.mapping.select_prev_item(), |
||||
" -- ['<C-n>'] = cmp.mapping.select_next_item(), |
||||
" -- Add tab support |
||||
" -- ['<S-Tab>'] = cmp.mapping.select_prev_item(), |
||||
" -- ['<Tab>'] = cmp.mapping.select_next_item(), |
||||
" ['<C-d>'] = cmp.mapping.scroll_docs(-4), |
||||
" ['<C-f>'] = cmp.mapping.scroll_docs(4), |
||||
" ['<Tab>'] = cmp.mapping.complete(), |
||||
" ['<C-e>'] = cmp.mapping.close(), |
||||
" ['<CR>'] = cmp.mapping.confirm({ |
||||
" behavior = cmp.ConfirmBehavior.Insert, |
||||
" select = true, |
||||
" }) |
||||
" }, |
||||
" |
||||
" -- Installed sources |
||||
" sources = { |
||||
" { name = 'nvim_lsp' }, |
||||
" { name = 'vsnip' }, |
||||
" { name = 'path' }, |
||||
" { name = 'buffer' }, |
||||
" }, |
||||
" }) |
||||
" EOF |
||||
" |
||||
" " Set updatetime for CursorHold |
||||
" " 300ms of no cursor movement to trigger CursorHold |
||||
" set updatetime=300 |
||||
" " Show diagnostic popup on cursor hold |
||||
" autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false }) |
||||
" |
||||
" " Goto previous/next diagnostic warning/error |
||||
" nnoremap <silent> g[ <cmd>lua vim.diagnostic.goto_prev()<CR> |
||||
" nnoremap <silent> g] <cmd>lua vim.diagnostic.goto_next()<CR> |
||||
" |
||||
" " have a fixed column for the diagnostics to appear in |
||||
" " this removes the jitter when warnings/errors flow in |
||||
" set signcolumn=yes |
@ -0,0 +1,10 @@ |
||||
local api = vim.api |
||||
local M = {} |
||||
function M.makeScratch() |
||||
api.nvim_command("enew") -- equivalent to :enew |
||||
vim.bo[0].buftype=nofile |
||||
vim.bo[0].bufhidden=hide |
||||
vim.bo[0].swapfile=false |
||||
end |
||||
return M |
||||
|
Loading…
Reference in new issue