a
This commit is contained in:
parent
0237a7bae5
commit
c2aa612b75
3 changed files with 112 additions and 49 deletions
|
@ -111,7 +111,7 @@ font:
|
|||
# - (macOS) Menlo
|
||||
# - (Linux/BSD) monospace
|
||||
# - (Windows) Consolas
|
||||
family: "Roboto Mono"
|
||||
family: "PragmataPro"
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Regular
|
||||
|
@ -150,7 +150,7 @@ font:
|
|||
#style: Bold Italic
|
||||
|
||||
# Point size
|
||||
size: 10.0
|
||||
size: 12.0
|
||||
|
||||
# Offset is the extra space around each character. `offset.y` can be thought
|
||||
# of as modifying the line spacing, and `offset.x` as modifying the letter
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[memory]
|
||||
command=/usr/lib/i3blocks/memory/memory
|
||||
command=/usr/lib/i3blocks/memory
|
||||
label=MEM
|
||||
interval=20
|
||||
|
||||
|
@ -9,13 +9,13 @@ interval=3600
|
|||
color=#A4C2F4
|
||||
|
||||
[volume]
|
||||
command=/usr/lib/i3blocks/volume/volume
|
||||
command=/usr/lib/i3blocks/volume
|
||||
LABEL=VOL
|
||||
interval=once
|
||||
signal=10
|
||||
|
||||
[battery-poly]
|
||||
command=/usr/lib/i3blocks/battery-poly/battery-poly
|
||||
command=/usr/lib/i3blocks/battery-poly
|
||||
LABEL=BAT
|
||||
interval=5
|
||||
color=#999999
|
||||
|
|
|
@ -3,9 +3,8 @@ call plug#begin(stdpath('data') . '/plugged')
|
|||
Plug 'vim-airline/vim-airline'
|
||||
exe 'source' (stdpath('config') . '/airline.vim')
|
||||
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
exe 'source' (stdpath('config') . '/coc.vim')
|
||||
" Plug 'file://'.expand('~/Projects/coc-nvim-rs/')
|
||||
" Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
" exe 'source' (stdpath('config') . '/coc.vim')
|
||||
|
||||
Plug 'preservim/nerdtree'
|
||||
exe 'source' (stdpath('config') . '/nerdtree.vim')
|
||||
|
@ -13,38 +12,21 @@ exe 'source' (stdpath('config') . '/nerdtree.vim')
|
|||
" Plug 'ctrlpvim/ctrlp.vim'
|
||||
let g:ctrlp_user_command = 'rg %s --files --color=never --glob ""'
|
||||
|
||||
Plug 'neovim/nvim-lspconfig'
|
||||
Plug 'hrsh7th/nvim-compe'
|
||||
|
||||
Plug 'FStarLang/VimFStar', {'for': 'fstar'}
|
||||
Plug 'LnL7/vim-nix'
|
||||
Plug 'ashinkarov/nvim-agda'
|
||||
" Plug 'ashinkarov/nvim-agda'
|
||||
Plug 'derekelkins/agda-vim'
|
||||
Plug 'evanleck/vim-svelte', {'branch': 'main'}
|
||||
Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'tomasiser/vim-code-dark'
|
||||
Plug 'editorconfig/editorconfig-vim'
|
||||
Plug 'ctrlpvim/ctrlp.vim'
|
||||
|
||||
" Plug 'jiangmiao/auto-pairs', { 'for': 'rust' }
|
||||
" Plug 'kovisoft/slimv', { 'for': 'lisp' }
|
||||
" Plug 'leafOfTree/vim-svelte-plugin'
|
||||
" Plug 'JuliaEditorSupport/julia-vim'
|
||||
|
||||
" Plug 'mhinz/vim-startify'
|
||||
" Plug 'tpope/vim-sleuth'
|
||||
|
||||
" Language plugins
|
||||
" Plug 'kovisoft/slimv'
|
||||
" Plug 'vmchale/dhall-vim'
|
||||
" Plug 'qnighy/lalrpop.vim'
|
||||
" Plug 'cespare/vim-toml'
|
||||
" Plug 'GutenYe/json5.vim'
|
||||
" Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
|
||||
" Plug 'pest-parser/pest.vim', { 'for': 'pest' }
|
||||
" Plug 'zah/nim.vim'
|
||||
|
||||
" Plug 'godlygeek/tabular'
|
||||
" Plug 'plasticboy/vim-markdown'
|
||||
|
||||
" Plug 'aurieh/discord.nvim', { 'do': ':UpdateRemotePlugins'}
|
||||
Plug 'wakatime/vim-wakatime'
|
||||
Plug 'andweeb/presence.nvim'
|
||||
|
||||
call plug#end()
|
||||
|
||||
|
@ -59,7 +41,7 @@ let g:vim_markdown_toml_frontmatter = 1
|
|||
colorscheme codedark
|
||||
|
||||
set splitright
|
||||
set number
|
||||
set number relativenumber
|
||||
set cursorline
|
||||
set hidden
|
||||
set modeline
|
||||
|
@ -69,38 +51,119 @@ set shiftwidth=4
|
|||
set expandtab
|
||||
set formatoptions+=t
|
||||
set colorcolumn=80
|
||||
set textwidth=80
|
||||
|
||||
syntax on
|
||||
filetype on
|
||||
filetype plugin indent on
|
||||
|
||||
augroup numbertoggle
|
||||
autocmd!
|
||||
autocmd BufEnter,FocusGained,InsertLeave,WinEnter * if &nu && mode() != "i" | set rnu | endif
|
||||
autocmd BufLeave,FocusLost,InsertEnter,WinLeave * if &nu | set nornu | endif
|
||||
augroup END
|
||||
|
||||
" Binds
|
||||
|
||||
let mapleader = ";"
|
||||
let maplocalleader = ";"
|
||||
" nnoremap ; :
|
||||
|
||||
nnoremap T :vsplit<BAR>vertical resize 54<BAR>terminal<CR>i
|
||||
|
||||
imap kj <Esc>
|
||||
" imap ;; <Esc>:w<CR>i
|
||||
|
||||
nmap <F8> :TagbarToggle<CR>
|
||||
" nmap ;; :w<CR>
|
||||
|
||||
" let g:LanguageClient_serverCommands = {
|
||||
" \ 'rust': ['rust-analyzer'],
|
||||
" \ }
|
||||
" nnoremap <F5> :call LanguageClient_contextMenu()<CR>
|
||||
" function LC_maps()
|
||||
" if has_key(g:LanguageClient_serverCommands, &filetype)
|
||||
" nnoremap <buffer> <silent> K :call LanguageClient#textDocument_hover()<cr>
|
||||
" nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR>
|
||||
" nnoremap <buffer> <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
|
||||
" endif
|
||||
" endfunction
|
||||
" autocmd FileType * call LC_maps()
|
||||
|
||||
" Plugin-related configs
|
||||
|
||||
let g:go_fmt_command = "goimports"
|
||||
|
||||
" LSP
|
||||
|
||||
nnoremap <silent> gd <cmd>lua vim.lsp.buf.definition()<CR>
|
||||
nnoremap <silent> gD <cmd>lua vim.lsp.buf.declaration()<CR>
|
||||
nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>
|
||||
nnoremap <silent> gi <cmd>lua vim.lsp.buf.implementation()<CR>
|
||||
nnoremap <silent> K <cmd>lua vim.lsp.buf.hover()<CR>
|
||||
nnoremap <silent> <C-k> <cmd>lua vim.lsp.buf.signature_help()<CR>
|
||||
nnoremap <silent> <space>k <cmd>lua vim.lsp.diagnostic.goto_prev()<CR>
|
||||
nnoremap <silent> <space>j <cmd>lua vim.lsp.diagnostic.goto_next()<CR>
|
||||
|
||||
lua << EOF
|
||||
vim.o.completeopt = "menuone,noselect"
|
||||
|
||||
require'compe'.setup {
|
||||
enabled = true;
|
||||
autocomplete = true;
|
||||
debug = false;
|
||||
min_length = 1;
|
||||
preselect = 'enable';
|
||||
throttle_time = 80;
|
||||
source_timeout = 200;
|
||||
incomplete_delay = 400;
|
||||
max_abbr_width = 100;
|
||||
max_kind_width = 100;
|
||||
max_menu_width = 100;
|
||||
documentation = false;
|
||||
|
||||
source = {
|
||||
path = true;
|
||||
buffer = true;
|
||||
calc = true;
|
||||
vsnip = true;
|
||||
nvim_lsp = true;
|
||||
nvim_lua = true;
|
||||
spell = true;
|
||||
tags = true;
|
||||
snippets_nvim = true;
|
||||
treesitter = true;
|
||||
};
|
||||
}
|
||||
local t = function(str)
|
||||
return vim.api.nvim_replace_termcodes(str, true, true, true)
|
||||
end
|
||||
|
||||
local check_back_space = function()
|
||||
local col = vim.fn.col('.') - 1
|
||||
if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- Use (s-)tab to:
|
||||
--- move to prev/next item in completion menuone
|
||||
--- jump to prev/next snippet's placeholder
|
||||
_G.tab_complete = function()
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
return t "<C-n>"
|
||||
elseif vim.fn.call("vsnip#available", {1}) == 1 then
|
||||
return t "<Plug>(vsnip-expand-or-jump)"
|
||||
elseif check_back_space() then
|
||||
return t "<Tab>"
|
||||
else
|
||||
return vim.fn['compe#complete']()
|
||||
end
|
||||
end
|
||||
_G.s_tab_complete = function()
|
||||
if vim.fn.pumvisible() == 1 then
|
||||
return t "<C-p>"
|
||||
elseif vim.fn.call("vsnip#jumpable", {-1}) == 1 then
|
||||
return t "<Plug>(vsnip-jump-prev)"
|
||||
else
|
||||
-- If <S-Tab> is not working in your terminal, change it to <C-h>
|
||||
return t "<S-Tab>"
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true})
|
||||
vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true})
|
||||
vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
|
||||
vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true})
|
||||
|
||||
require'lspconfig'.rust_analyzer.setup{}
|
||||
require'lspconfig'.pyright.setup{}
|
||||
EOF
|
||||
|
||||
" vim: set sw=2 :
|
||||
|
|
Loading…
Reference in a new issue