Update gols. Update lsp-signature config. Adds smoth scrolling. Adds highlight for current word.

This commit is contained in:
Mariano Uvalle 2022-01-09 13:58:55 -08:00
parent 91f122bcd1
commit 24acdf848a
6 changed files with 46 additions and 17 deletions

View file

@ -18,6 +18,6 @@ require('lsp.go-ls')
require('nv-compe')
-- Function signatures
require('lsp_signature')
-- require('lsp_signature')
require('nv-prettier')

View file

@ -1,6 +1,10 @@
vim.cmd("colorscheme palenight")
vim.g.lightline={
colorscheme='palenight'
}
vim.api.nvim_set_option('background', 'dark')
vim.api.nvim_set_option('termguicolors', true)
-- vim_current_word
vim.cmd([[
colorscheme palenight
highlight ColorColumn ctermbg=0 guibg=grey
hi CurrentWord guibg=#444444
hi CurrentWordTwins guibg=#606060
]])

View file

@ -34,8 +34,12 @@ vim.g.go_code_completion_enabled = 0
-- Disable gopls for the same reasons as above.
vim.g.go_gopls_enabled = 0
-- Use goimports for both formatting and imports.
vim.g.go_fmt_command = 'goimports'
-- Simplify code when formatting.
vim.g.go_fmt_command = 'gofmt'
vim.g.go_fmt_options = {
gofmt = '-s',
}
vim.g.go_imports_mode = 'goimports'
-- Could confilg with lsp saga, should experiment.

View file

@ -1,9 +0,0 @@
require'lsp_signature'.on_attach({
bind = true,
floating_window = true,
hint_enable = true,
fix_pos = true,
handler_opts = {
border = "single" -- double, single, shadow, none
},
})

View file

@ -29,6 +29,7 @@ return require('packer').startup(function(use)
use 'sheerun/vim-polyglot'
use {'prettier/vim-prettier', run = "yarn install"}
use {'styled-components/vim-styled-components', branch = "main"}
use 'dominikduda/vim_current_word'
use 'airblade/vim-rooter'
@ -51,6 +52,7 @@ return require('packer').startup(function(use)
use 'jiangmiao/auto-pairs'
use 'itchyny/lightline.vim'
use 'itchyny/vim-gitbranch'
-- Golang
use 'fatih/vim-go'
@ -64,4 +66,7 @@ return require('packer').startup(function(use)
-- Comments
use 'tpope/vim-commentary'
-- Smooth scrolling
use 'psliwka/vim-smoothie'
end)

View file

@ -22,7 +22,6 @@ vim.o.updatetime = 300 -- Faster completion
vim.o.timeoutlen = 500 -- By default timeoutlen is 1000 ms
vim.cmd(":set number relativenumber")
vim.cmd("highlight ColorColumn ctermbg=0 guibg=grey")
------ Folding
-- vim.o.foldlevel = 99
@ -35,3 +34,29 @@ vim.cmd("highlight ColorColumn ctermbg=0 guibg=grey")
-- autocmd BufWinEnter * silent! loadview
-- augroup END
-- ]])
-- Show full file path in lightline.
vim.cmd([[
let g:lightline = {
\ 'colorscheme' : 'palenight',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component_function': {
\ 'filename': 'FilenameForLightline',
\ 'gitbranch': 'gitbranch#name'
\ }
\ }
function! FilenameForLightline()
let root = fnamemodify(get(b:, 'gitbranch_path'), ':h:h')
let path = expand('%:p')
if path[:len(root)-1] ==# root
return path[len(root)+1:]
endif
return expand('%')
endfunction
]])