merge deneb and hermia
This commit is contained in:
commit
08d8a22709
5 changed files with 168 additions and 152 deletions
|
|
@ -1,3 +1,7 @@
|
|||
function fish_user_key_bindings
|
||||
fzf_key_bindings
|
||||
end
|
||||
|
||||
function fsize
|
||||
sed -i "s/size:.*/size: $argv/" $HOME/.config/alacritty/alacritty.yml
|
||||
end
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ set-window-option -g window-style fg=#aaaaaa,bg=terminal
|
|||
set-window-option -g window-active-style fg=terminal,bg=terminal
|
||||
|
||||
set -g status-left '#[fg=green][ #H ][ '
|
||||
set -g status-right '#[fg=green]][ #[bright]#[fg=blue]%Y-%m-%d #[fg=white]%I:%M #[dim]#[fg=green]]'
|
||||
set -g status-right '#[fg=green]][ #{pane_width}x#{pane_height} #[bright]#[fg=blue]%Y-%m-%d #[fg=white]%I:%M #[dim]#[fg=green]]'
|
||||
|
||||
# Notifying if other windows has activities
|
||||
setw -g monitor-activity on
|
||||
|
|
|
|||
|
|
@ -25,12 +25,21 @@ nvim_lsp.rust_analyzer.setup({
|
|||
nvim_lsp.gopls.setup({ on_attach = on_attach })
|
||||
nvim_lsp.pyright.setup({ on_attach = on_attach })
|
||||
nvim_lsp.clangd.setup({ on_attach = on_attach })
|
||||
nvim_lsp.tsserver.setup {
|
||||
cmd = { "/home/barak/.yarn/bin/typescript-language-server", "--stdio" }
|
||||
}
|
||||
nvim_lsp.vuels.setup {
|
||||
cmd = { "/home/barak/.yarn/bin/vls" }
|
||||
}
|
||||
|
||||
nvim_lsp.svelte.setup {
|
||||
cmd = { "/home/barak/.yarn/bin/svelteserver", "--stdio" }
|
||||
}
|
||||
|
||||
local runtime_path = vim.split(package.path, ';')
|
||||
table.insert(runtime_path, "lua/?.lua")
|
||||
table.insert(runtime_path, "lua/?/init.lua")
|
||||
|
||||
|
||||
require 'lspconfig'.sumneko_lua.setup {
|
||||
settings = {
|
||||
Lua = {
|
||||
|
|
@ -60,13 +69,15 @@ require('go').setup()
|
|||
|
||||
function org_imports(wait_ms)
|
||||
local params = vim.lsp.util.make_range_params()
|
||||
|
||||
params.context = { only = { "source.organizeImports" } }
|
||||
|
||||
local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params, wait_ms)
|
||||
|
||||
for _, res in pairs(result or {}) do
|
||||
for _, r in pairs(res.result or {}) do
|
||||
if r.edit then
|
||||
vim.lsp.util.apply_workspace_edit(r.edit)
|
||||
vim.lsp.util.apply_workspace_edit(r.edit, "utf-8")
|
||||
else
|
||||
vim.lsp.buf.execute_command(r.command)
|
||||
end
|
||||
|
|
@ -463,7 +474,8 @@ local function rust_whereify_line(line, var_name)
|
|||
local brace = string.find(out, "%{")
|
||||
if brace == nil then brace = string.len(out) end
|
||||
|
||||
out = string.insert(out, "\n"..whitespace.."where\n"..whitespace.." "..var_name..": ,\n"..whitespace, brace - 1)
|
||||
out = string.insert(out, "\n" .. whitespace .. "where\n" .. whitespace .. " " .. var_name .. ": ,\n" .. whitespace,
|
||||
brace - 1)
|
||||
|
||||
return string.split(out, "\n")
|
||||
end
|
||||
|
|
|
|||
6
.vimrc
6
.vimrc
|
|
@ -171,7 +171,7 @@ Plug 'plytophogy/vim-virtualenv'
|
|||
Plug 'lunaru/vim-less'
|
||||
Plug 'hylang/vim-hy', {'for': 'hy'}
|
||||
"Plug 'mhartington/nvim-typescript'
|
||||
Plug 'leafgarland/typescript-vim'
|
||||
"Plug 'leafgarland/typescript-vim'
|
||||
Plug 'leafOfTree/vim-svelte-plugin'
|
||||
"Plug 'posva/vim-vue'
|
||||
Plug 'Shougo/context_filetype.vim'
|
||||
|
|
@ -275,7 +275,7 @@ nnoremap <silent> gW <cmd>lua vim.lsp.buf.workspace_symbol()<CR>
|
|||
"nnoremap <silent> gd <cmd>lua vim.lsp.buf.declaration()<CR>
|
||||
nnoremap <silent> ga <cmd>lua vim.lsp.buf.code_action()<CR>
|
||||
"nnoremap <silent> ga <cmd>lua require('telescope.builtin').lsp_code_actions({initial_mode = "normal"})<cr>
|
||||
vnoremap <silent> ga <cmd>lua vim.lsp.buf.range_code_actions()<CR>
|
||||
vnoremap <silent> ga <cmd>lua vim.lsp.buf.range_code_action()<CR>
|
||||
"vnoremap <silent> ga :<C-U>lua require('telescope.builtin').lsp_range_code_actions({initial_mode = "normal"})<cr>
|
||||
"nnoremap <silent> ge <cmd>lua vim.lsp.diagnostic.show_line_diagnostics({show_header = false, focusable = false})<CR>
|
||||
"nnoremap <silent> ge <cmd>lua vim.diagnostic.open_float({focusable = false})<CR>
|
||||
|
|
@ -296,7 +296,7 @@ autocmd BufWritePre *.lua lua vim.lsp.buf.formatting_sync(nil, 1000)
|
|||
autocmd BufWritePre *.py lua vim.lsp.buf.formatting_sync(nil, 1000)
|
||||
autocmd BufWritePre *.rs lua vim.lsp.buf.formatting_seq_sync(nil, 1000)
|
||||
autocmd BufWritePre *.go lua vim.lsp.buf.formatting_seq_sync(nil, 1000)
|
||||
autocmd BufWritePre *.go :silent! lua org_imports(3000)
|
||||
autocmd BufWritePre *.go silent! lua org_imports(3000)
|
||||
|
||||
" Goto previous/next diagnostic warning/error
|
||||
nnoremap <silent> g[ <cmd>lua vim.diagnostic.goto_prev()<CR>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/local/bin/perl
|
||||
#!/usr/bin/perl
|
||||
|
||||
use Getopt::Std;
|
||||
getopts('u');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue