Compare commits

..

1 Commits
master ... coc

Author SHA1 Message Date
74c068a2b8 Switch to CoC for language servers. 2019-06-20 20:37:39 -07:00
16 changed files with 228 additions and 792 deletions

View File

@ -27,6 +27,9 @@ window:
x: 10
y: 20
# Display tabs using this many cells (changes require restart)
tabspaces: 8
# When true, bold text is drawn using the bright variant of colors.
draw_bold_text_with_bright_colors: true
@ -51,7 +54,7 @@ font:
# style: Italic
# Point size of the font
size: 12.0
size: 10.0
# Offset is the extra space around each character. offset.y can be thought of
# as modifying the linespacing, and offset.x as modifying the letter spacing.
@ -72,7 +75,7 @@ font:
use_thin_strokes: true
# Should display the render timer
# render_timer: false
render_timer: false
# Colors (Pencil Dark)
# colors:
@ -179,12 +182,12 @@ colors:
#
# To completely disable the visual bell, set its duration to 0.
#
bell:
visual_bell:
animation: EaseOutExpo
duration: 0
# Background opacity
# background_opacity: 1.0
background_opacity: 1.0
# Mouse bindings
#

View File

@ -30,7 +30,7 @@ font pango:Source Code Pro 8
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec alacritty
bindsym $mod+Return exec i3-sensible-terminal
# kill focused window
bindsym $mod+Shift+q kill
@ -134,8 +134,7 @@ bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
# bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
bindsym $mod+Shift+e exec i3-msg exit
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
@ -171,16 +170,13 @@ bindsym $mod+r mode "resize"
# mode hide
# }
# Polybar and Wallpaper
# Polybar
exec_always --no-startup-id ~/.polybar.sh
# Compton
exec_always --no-startup-id compton
# Autorandr
# exec_always autorandr --change
# Remove window borders
for_window [class="^.*"] border pixel 2
for_window [class="^.*"] border pixel 0
# Set up gaps
gaps inner 5
gaps inner 20
# Browser shortcut
bindsym $mod+Shift+b exec firefox
# Compton shortcut
@ -189,9 +185,3 @@ bindsym $mod+Shift+p exec compton
bindsym $mod+Shift+u exec ~/.software/abacus-fx/bin/fx
# Screenshot
bindsym $mod+Shift+s exec scrot
bindsym $mod+Shift+f exec scrot -s
bindsym $mod+Shift+o exec alacritty --command ~/projects/ppl-cli/script/open_float.sh
client.focused #428df5 #428df5 #428df5 #428df5 #428df5
client.focused_inactive #2e3440 #2e3440 #2e3440 #2e3440 #2e3440
client.unfocused #2e3440 #2e3440 #2e3440 #2e3440 #2e3440

Binary file not shown.

Before

Width:  |  Height:  |  Size: 652 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 851 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 944 KiB

View File

@ -1,9 +0,0 @@
export BG_PATH=~/background
cd $BG_PATH
FILENAME=$(basename $(ls *.jpg | sort -R | head -n 1) .jpg)
SUB="s/^primary = #[a-z0-9]*/primary = #${FILENAME}/"
echo $FILENAME > color
sed -i "$SUB" ~/.config/polybar/config
SUB="s/^client.focused .*/client.focused #${FILENAME} #${FILENAME} #${FILENAME} #${FILENAME} #${FILENAME}/"
sed -i "$SUB" ~/.config/i3/config
${0%/*}/refresh.sh

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

View File

@ -1 +0,0 @@
436394

View File

@ -1,2 +0,0 @@
PT=${BG_PATH:-~/background}
cat $PT/color | xargs -I {} feh --bg-scale "$PT/{}.jpg"

View File

@ -1,37 +0,0 @@
snippet md "map with do" w
map do |${1:e}|
$2
end
$0
endsnippet
snippet m{ "map with {" w
map({ |${1:e}| $2 })
endsnippet
snippet ed "each with do" w
each do |${1:e}|
$2
end
$0
endsnippet
snippet e{ "each with {" w
each({ |${1:e}| $2 })
endsnippet
snippet b "apply block" w
${1:min_by}({|${2:e}| $3 })
endsnippet
snippet set "create set" w
Set(${1:Int32}).new
endsnippet
snippet ha "create hash" w
Hash($1).new
endsnippet
snippet in "includes?" w
includes?($1)
endsnippet

View File

@ -1,69 +0,0 @@
snippet eq
\begin{equation*}
$1
\end{equation*}
endsnippet
snippet al
\begin{aligned}
$1
\end{aligned}
endsnippet
snippet fr
\frac{$1}{$2}
endsnippet
snippet sec
\section*{$1}
endsnippet
snippet ssec
\subsection*{$1}
endsnippet
snippet ol
\begin{itemize}
$1
\end{itemize}
endsnippet
snippet alist
\begin{enumerate}[label=\alph*)]
$1
\end{enumerate}
endsnippet
snippet li
\item
endsnippet
snippet sum
\sum_{$1}^{$2} $3
endsnippet
snippet rel
\text{Rel}($1)
endsnippet
snippet a
\alpha
endsnippet
snippet e
\epsilon
endsnippet
snippet hs
\begin{lstlisting}[language=Haskell]
$1
\end{lstlisting}
endsnippet
snippet ns
\needscite{}
endsnippet
snippet todo
\TODO{$1}
endsnippet

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
{
"languageserver": {
"haskell": {
"command": "hie-wrapper",
"args": ["--lsp"],
"filetypes": [ "haskell" ],
"rootPatterns": [ ".git", "stack.yaml" ]
},
"rust": {
"command": "rustup",
"args": ["run", "stable", "rls" ],
"filetypes": [ "rust" ],
"rootPatterns": [ ".git", "cargo.toml" ]
},
"clangd": {
"command": "clangd",
"filetypes": [ "c", "cpp" ],
"rootPatterns": [".git"]
},
"crystal": {
"command": "scry",
"filetypes": [ "crystal" ],
"rootPatterns": [".git", "shard.yml"]
},
"javascript": {
"command": "javascript-typescript-stdio",
"filetypes": [ "javascript" ],
"rootPatterns": [".git" ]
},
"elm": {
"command": "elm-language-server",
"args": ["--stdio"],
"filetypes": ["elm"],
"rootPatterns": [".git", "elm.json"],
"initializationOptions": {
"runtime": "node",
"elmPath": "elm"
}
}
}
}

View File

@ -1,57 +1,17 @@
call plug#begin('~/.config/nvim/plugged')
" Language Tools
Plug 'hrsh7th/nvim-compe'
Plug 'neovim/nvim-lspconfig'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
Plug 'junegunn/fzf.vim'
Plug 'SirVer/ultisnips'
Plug 'luochen1990/rainbow'
" Plug 'enomsg/vim-haskellConcealPlus' " This one isn't always good.
" Languages
Plug 'evanleck/vim-svelte'
Plug 'LnL7/vim-nix'
Plug 'whonore/Coqtail'
Plug 'wlangstroth/vim-racket'
Plug 'lervag/vimtex'
Plug 'idris-hackers/idris-vim'
Plug 'rhysd/vim-crystal'
Plug 'elmcast/elm-vim'
Plug 'ap/vim-css-color'
Plug 'vim-scripts/avrasm.vim'
Plug 'idris-hackers/idris-vim'
Plug 'elixir-editors/vim-elixir'
Plug 'guersam/vim-j'
Plug 'wlangstroth/vim-racket'
Plug 'derekelkins/agda-vim'
Plug 'ftorres16/spice.vim'
Plug 'vmware/differential-datalog', {'rtp': 'tools/vim'}
Plug 'FStarLang/VimFStar', {'for': 'fstar'}
Plug 'purescript-contrib/purescript-vim'
" Plug '~/Documents/software/chapel/highlight/vim'
" Plug 'ashinkarov/nvim-agda'
" Themes
Plug 'arcticicestudio/nord-vim'
" Editing Tools
Plug 'junegunn/goyo.vim'
Plug 'iamcco/markdown-preview.vim'
Plug 'junegunn/limelight.vim'
Plug 'luochen1990/rainbow'
Plug 'simrat39/symbols-outline.nvim'
Plug 'folke/todo-comments.nvim'
" AI (Yes, you heard me)
Plug 'aduros/ai.vim'
Plug 'github/copilot.vim'
" Misc
Plug 'uga-rosa/utf8.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'airblade/vim-gitgutter'
Plug 'f-person/git-blame.nvim'
Plug 'wakatime/vim-wakatime'
call plug#end()
set exrc " Execute local vimscripts
@ -60,129 +20,8 @@ set expandtab " Expand tabs into spaces
set number " Set line numbers
set mouse=a " Allow mouse
set signcolumn=yes " Always show extra column
set guifont=Iosevka:h35 " Use Ioeska in frontends.
set hidden
autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red
autocmd ColorScheme * highlight Comment ctermfg=green
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ " Highlight trailing whitespace
autocmd BufRead,BufNewFile *.v set filetype=coq " Coq is not Verilog
autocmd BufNewFile,BufRead *.cir set filetype=spice " LTSpice is Spice
autocmd BufRead,BufNewFile *.dl set filetype=dl " Datalog is Datalog
autocmd FileType crystal setlocal shiftwidth=2 " Crystal likes 2-wide indent
autocmd FileType cpp setlocal shiftwidth=2 " Chapel has two-wide indents
autocmd BufRead,BufNewFile *.ast set filetype=ast " AST files are from Chapel.
autocmd VimEnter * Copilot enable
" Settings for Rainbow
let g:rainbow_active = 1
" Settings for Limelight
let g:limelight_conceal_ctermfg = 8
" Settings for Vim's LaTeX plugin
let g:tex_flavor = 'latex'
let g:vimtex_quickfix_open_on_warning = 0
let g:vimtex_view_general_viewer = 'okular'
let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
" Settings for UltiSnips
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-k>"
let g:UltiSnipsJumpBackwardTrigger="<c-j>"
" Settings for FZF
let g:fzf_action = { 'enter': 'tab drop' }
" Settings for Neovide
let g:neovide_cursor_vfx_mode="ripple"
colorscheme nord
hi Comment guifg=#A3BE8C
lua require('lspconfig').hls.setup{}
lua require('lspconfig').rls.setup{}
lua require('lspconfig').clangd.setup{}
lua require('lspconfig').tsserver.setup{}
lua require('lspconfig').elmls.setup{}
lua require('lspconfig').pylsp.setup{}
lua require('lspconfig').purescriptls.setup{}
lua require('lspconfig').pyright.setup{}
" All these language servers can be used for symbols-outline
lua require("symbols-outline").setup()
" nmap <silent>K <Plug>(lcn-menu)
nmap <silent>M <cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>
nmap <silent>? <cmd>lua vim.lsp.buf.hover()<CR>
nmap <silent>K <cmd>lua vim.lsp.buf.rename()<CR>
nmap <silent><space>d <cmd>lua vim.lsp.buf.definition()<CR>
nmap <silent><space>D <cmd>lua vim.lsp.buf.declaration()<CR>
nmap <silent><space>i <cmd>lua vim.lsp.buf.implementation()<CR>
nmap <silent><space>r <cmd>lua vim.lsp.buf.references()<CR>
" Ctrl-e to open file in new tab (or jump to it)
nmap <c-e> :Files<CR>
" Autocompletion
set completeopt=menuone,noselect
let g:compe = {}
let g:compe.enabled = v:true
let g:compe.source = {
\ 'path': v:true,
\ 'buffer': v:true,
\ 'nvim_lsp': v:true,
\ }
" Highlight 80th column
let &colorcolumn="80,".join(range(120,999),",")
" Racket settings
au BufReadPost *.rkt,*.rktl set filetype=racket
au filetype racket set lisp
au filetype racket set autoindent
" Coq Settings
function! g:CoqtailHighlight()
hi default link CoqtailChecked Visual
hi default link CoqtailSent PmenuSel
endfunction
lua << EOF
local lspconfig = require 'lspconfig'
local configs = require 'lspconfig.configs'
local util = require 'lspconfig.util'
local todocomments = require 'todo-comments'
todocomments.setup {
search = { command = "ag", },
}
configs.chplcheck = {
default_config = {
cmd = {"chplcheck", "--lsp", "--enable-rule", "UnusedFormal", "--enable-rule", "UnusedLoopIndex"},
filetypes = {'chpl'},
autostart = true,
single_file_support = true,
root_dir = util.find_git_ancestor,
settings = {},
},
}
configs.chpllsp = {
default_config = {
cmd = {"/Users/daniel.fedorin/Documents/software/chapel/tools/chpl-language-server/chpl-language-server", "--resolver"},
filetypes = {'chpl'},
autostart = true,
single_file_support = true,
root_dir = util.find_git_ancestor,
settings = {},
},
}
lspconfig.chplcheck.setup{}
lspconfig.chpllsp.setup{}
vim.cmd("autocmd BufRead,BufNewFile *.chpl set filetype=chpl")
vim.lsp.inlay_hint.enable(true, nil)
EOF

View File

@ -14,48 +14,42 @@ background-alt = #3b4252
;foreground = ${xrdb:color7:#222}
foreground = #d8dee9
foreground-alt = #e5e9f0
primary = #cf5fb4
primary = #b48ead
secondary = #a3be8c
alert = #bf616a
[bar/example]
dpi-x = 220
dpi-y = 200
;monitor = ${env:MONITOR:HDMI-1}
width = 100%
height = 3%
height = 27
;offset-x = 1%
;offset-y = 1%
radius = 20%
radius = 6.0
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 5%
line-size = 3
line-color = #f00
border-size = 4
border-color = #00000000
padding-left = 2
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = Iosevka:pixelsize=9;1
font-1 = Ionicons:pixelsize=9;1
font-2 = Weather Icons:size=7;1
; font-0 = fixed:pixelsize=10;1
; font-1 = Wuncon Siji:pixelsize=12;1
font-0 = fixed:pixelsize=10;1
font-1 = Wuncon Siji:pixelsize=12;1
;font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
;font-2 = siji:pixelsize=10;1
modules-left = bspwm i3
modules-center =
modules-right = openweathermap-fullfeatured filesystem volume memory cpu battery temperature date wlan powermenu
modules-right = filesystem volume memory cpu battery temperature date wlan powermenu
tray-position = right
tray-padding = 2
@ -76,12 +70,6 @@ tray-padding = 2
cursor-click = pointer
cursor-scroll = ns-resize
[module/openweathermap-fullfeatured]
type = custom/script
exec = ~/software/polybar-scripts/polybar-scripts/openweathermap-fullfeatured/openweathermap-fullfeatured.sh
interval = 600
label-font = 3
[module/xwindow]
type = internal/xwindow
label = %title:0:30:...%
@ -108,7 +96,7 @@ interval = 25
mount-0 = /
label-mounted = %{F}%mountpoint%%{F-}: %percentage_used%%
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.foreground-alt}
@ -145,7 +133,7 @@ label-mode-foreground = #000
label-mode-background = ${colors.primary}
; focused = Active workspace on focused monitor
label-focused = %index%!
label-focused = %index%
label-focused-background = ${module/bspwm.label-focused-background}
label-focused-underline = ${module/bspwm.label-focused-underline}
label-focused-padding = ${module/bspwm.label-focused-padding}
@ -203,17 +191,17 @@ card = intel_backlight
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = " "
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = ${colors.primary}
format-underline = #f90000
label = %percentage:2%%
[module/memory]
type = internal/memory
interval = 2
format-prefix = " "
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
format-underline = ${colors.primary}
format-underline = #4bffdc
label = %percentage_used%%
[module/wlan]
@ -261,12 +249,12 @@ interval = 5
date =
date-alt = " %Y-%m-%d"
time = %H:%M
time = %H:%M
time-alt = %H:%M:%S
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = ${colors.primary}
format-underline = #0a6cf5
label = %date% %time%
@ -282,13 +270,13 @@ format-muted-foreground = ${colors.foreground-alt}
label-muted = sound muted
bar-volume-width = 10
bar-volume-foreground-0 = ${colors.primary}
bar-volume-foreground-1 = ${colors.primary}
bar-volume-foreground-2 = ${colors.primary}
bar-volume-foreground-3 = ${colors.primary}
bar-volume-foreground-4 = ${colors.primary}
bar-volume-foreground-5 = ${colors.primary}
bar-volume-foreground-6 = ${colors.primary}
bar-volume-foreground-0 = #55aa55
bar-volume-foreground-1 = #55aa55
bar-volume-foreground-2 = #55aa55
bar-volume-foreground-3 = #55aa55
bar-volume-foreground-4 = #55aa55
bar-volume-foreground-5 = #f5a70a
bar-volume-foreground-6 = #ff5555
bar-volume-gradient = false
bar-volume-indicator = |
bar-volume-indicator-font = 2
@ -305,7 +293,7 @@ adapter = ADP1
full-at = 98
format-charging = <animation-charging> <label-charging>
format-charging-underline = ${colors.primary}
format-charging-underline = #ffb52a
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
@ -314,11 +302,14 @@ format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = 
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
@ -328,7 +319,7 @@ thermal-zone = 0
warn-temperature = 60
format = <ramp> <label>
format-underline = ${colors.primary}
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
@ -336,9 +327,9 @@ label = %temperature%
label-warn = %temperature%
label-warn-foreground = ${colors.secondary}
ramp-0 =
ramp-1 =
ramp-2 =
ramp-0 =
ramp-1 =
ramp-2 =
ramp-foreground = ${colors.foreground-alt}
[module/powermenu]

View File

@ -1,4 +1,2 @@
set mouse
set -sg escape-time 0
set -g default-terminal "screen-256color"
set -ag terminal-overrides ",xterm-256color:RGB"