Commit 0cf479db authored by Tim van Deurzen's avatar Tim van Deurzen

Update neovim and git configurations.

parent 63540859
[user]
email = tim@kompiler.org
name = Tim van Deurzen
[alias]
co = checkout
br = branch
ci = commit
st = status
di = diff --word-diff=plain --color-moved=plain
[pull]
rebase = true
[url "ssh://git@gitlab.dopey.blockport.io"]
insteadOf = https://gitlab.dopey.blockport.io
[core]
editor = nvim
pager = delta
[delta]
features = line-numbers decorations side-by-side
plus-style = "syntax bold auto"
minus-style = "syntax bold italic auto"
syntax-theme = "gruvbox-light"
navigate = true
[interactive]
diffFilter = delta --color-only
......@@ -9,7 +9,7 @@ local function apply_buffer_window_options(options)
end
local function basic_configuration()
options = {
local options = {
hidden = true;
fileformats = "unix,mac,dos";
modeline = true;
......@@ -72,7 +72,7 @@ local function basic_configuration()
langnoremap = true;
}
buffer_window_options = {
local buffer_window_options = {
formatoptions = "qroctn";
shiftwidth = 4;
tabstop = 4;
......
......@@ -26,6 +26,9 @@ local keymap = {
s = {'<Cmd>Lspsaga lsp_finder<CR>', 'find'},
p = {'<Cmd>Lspsaga preview_definition<CR>', 'preview definition'},
f = {'<Cmd>lua vim.lsp.buf.formatting()<CR>', 'format'},
d = {'<Cmd>lua vim.lsp.buf.definition()<CR>', 'go to definition'},
i = {'<Cmd>lua vim.lsp.buf.implementation()<CR>', 'go to definition'},
t = {'<Cmd>LspTroubleToggle lsp_workspace_diagnostics<CR>', 'open LspTrouble'},
},
......@@ -33,6 +36,7 @@ local keymap = {
name = '+telescope',
p = {'<Cmd>Telescope project<CR>', 'projects'},
d = {'<Cmd>Telescope lsp_workspace_diagnostics<CR>', 'diagnostics'},
}
}
......
......@@ -19,6 +19,16 @@ lsp_config.rust_analyzer.setup{
capabilities = capabilities,
}
lsp_config.yamlls.setup{
capabilities = capabilities,
}
lsp_config.dartls.setup{}
lsp_config.ccls.setup{
capabilities = capabilities,
}
lsp_config.sumneko_lua.setup{
cmd = {'/usr/bin/lua-language-server'},
capabilities = capabilities,
......@@ -61,3 +71,22 @@ vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
update_in_insert = true,
}
)
do
local default_handler = vim.lsp.handlers["textdocument/publishdiagnostics"]
vim.lsp.handlers["textdocument/publishdiagnostics"] = function(err, method, result, client_id, bufnr, config)
default_handler(err, method, result, client_id, bufnr, config)
local diagnostics = vim.lsp.diagnostic.get_all()
local qflist = {}
for bufnr_, diagnostic in pairs(diagnostics) do
for _, d in ipairs(diagnostic) do
d.bufnr = bufnr_
d.lnum = d.range.start.line + 1
d.col = d.range.start.character + 1
d.text = d.message
table.insert(qflist, d)
end
end
vim.lsp.util.set_qflist(qflist)
end
end
......@@ -10,7 +10,8 @@ return require('packer').startup(function()
requires = {'tjdevries/colorbuddy.vim'},
config = function()
require('colorbuddy').colorscheme('gruvbuddy')
--require('colorbuddy').colorscheme('gruvbox')
vim.cmd[[colo gruvbox]]
end
}
......@@ -165,7 +166,7 @@ return require('packer').startup(function()
},
}
vim.api.nvim_command [[autocmd CursorHold,CursorHoldI * :lua require('lspsaga.signaturehelp').signature_help()]]
-- vim.api.nvim_command [[autocmd CursorHold,CursorHoldI * :lua require('lspsaga.signaturehelp').signature_help()]]
end
}
use {
......@@ -185,4 +186,39 @@ return require('packer').startup(function()
}
end
}
use {
"folke/lsp-trouble.nvim",
requires = "kyazdani42/nvim-web-devicons",
config = function()
require("trouble").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
end
}
use {
"ray-x/lsp_signature.nvim",
config = function()
require('lsp_signature').on_attach({
bind = true,
handler_opts = {
border = "single"
}
})
end
}
use {
'lewis6991/gitsigns.nvim',
requires = {
'nvim-lua/plenary.nvim'
},
config = function()
require('gitsigns').setup()
end
}
end)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment