Browse Source

Everything should be default now

my-config
Gustavo Prieto 4 years ago
parent
commit
7ef3bd2075
  1. 2
      install.sh
  2. 16
      lua/plugins/configs/lsp.lua

2
install.sh

@ -162,7 +162,7 @@ update_repo() {
log_success "Successfully updated doom-nvim, more demons were released in your terminal!"
else
log_info "Trying to clone doom-nvim ..."
git clone -q -b "$1" https://github.com/NTBBloodbath/doom-nvim.git "$HOME/.config/doom-nvim"
git clone -q -b "$1" https://github.com/NTBBloodbath/doom-nvim "$HOME/.config/doom-nvim"
if [ $? -eq 0 ]; then
log_success "Successfully cloned doom-nvim, some demons were released in your terminal!"
else

16
lua/plugins/configs/lsp.lua

@ -149,6 +149,22 @@ local on_attach = function(client, bufnr)
'<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>',
opts
)
-- Set some keybinds conditional on server capabilities
if client.resolved_capabilities.document_formatting then
Map(
'n',
'<space>f',
'<cmd>lua vim.lsp.buf.formatting()<CR>',
opts
)
elseif client.resolved_capabilities.document_range_formatting then
Map(
'n',
'<space>f',
'<cmd>lua vim.lsp.buf.range_formatting()<CR>',
opts
)
end
-- Set autocommands conditional on server_capabilities
if client.resolved_capabilities.document_highlight then
Api.nvim_exec(

Loading…
Cancel
Save