git
This commit is contained in:
parent
a759eda48e
commit
6cfcedb33d
2 changed files with 14 additions and 4 deletions
|
@ -18,7 +18,7 @@
|
||||||
autostash = false
|
autostash = false
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
pager = delta
|
pager = less
|
||||||
|
|
||||||
[delta]
|
[delta]
|
||||||
side-by-side = true
|
side-by-side = true
|
||||||
|
|
|
@ -36,7 +36,17 @@ function M.setup()
|
||||||
|
|
||||||
-- Use a loop to conveniently both setup defined servers
|
-- Use a loop to conveniently both setup defined servers
|
||||||
-- and map buffer local keybindings when the language server attaches
|
-- and map buffer local keybindings when the language server attaches
|
||||||
local servers = { 'phpactor', 'gopls', 'clangd', 'zls', 'hls', 'tsserver', 'sumneko_lua', 'perlls' }
|
local servers = {
|
||||||
|
'phpactor',
|
||||||
|
'gopls',
|
||||||
|
'clangd',
|
||||||
|
'zls',
|
||||||
|
'hls',
|
||||||
|
'tsserver',
|
||||||
|
'sumneko_lua',
|
||||||
|
'perlls',
|
||||||
|
'rust_analyzer',
|
||||||
|
}
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup {
|
nvim_lsp[lsp].setup {
|
||||||
on_attach = M.on_attach,
|
on_attach = M.on_attach,
|
||||||
|
@ -53,8 +63,8 @@ function M.setup()
|
||||||
return u.search_ancestors(startpath, function(path)
|
return u.search_ancestors(startpath, function(path)
|
||||||
return not string.find(path, '/vendor/') and (
|
return not string.find(path, '/vendor/') and (
|
||||||
u.path.exists(u.path.join(path, 'composer.json'))
|
u.path.exists(u.path.join(path, 'composer.json'))
|
||||||
or u.path.exists(u.path.join(path, '.git'))
|
or u.path.exists(u.path.join(path, '.git'))
|
||||||
)
|
)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue