Compare commits
No commits in common. "d735c8b0ed9c07730f941b200cbd719fc6e7ac2b" and "b377ae9995a08534172032e4698372fe4295a6ae" have entirely different histories.
d735c8b0ed
...
b377ae9995
@ -137,19 +137,13 @@ call plug#begin('~/.config/nvim/plugged')
|
|||||||
|
|
||||||
" LSP
|
" LSP
|
||||||
Plug 'neovim/nvim-lspconfig'
|
Plug 'neovim/nvim-lspconfig'
|
||||||
|
Plug 'neovim/nvim-lspconfig'
|
||||||
Plug 'hrsh7th/nvim-cmp'
|
Plug 'hrsh7th/nvim-cmp'
|
||||||
Plug 'hrsh7th/cmp-buffer'
|
|
||||||
Plug 'hrsh7th/cmp-path'
|
|
||||||
Plug 'hrsh7th/cmp-cmdline'
|
|
||||||
Plug 'hrsh7th/cmp-nvim-lsp'
|
Plug 'hrsh7th/cmp-nvim-lsp'
|
||||||
Plug 'saadparwaiz1/cmp_luasnip'
|
Plug 'saadparwaiz1/cmp_luasnip'
|
||||||
Plug 'L3MON4D3/LuaSnip'
|
Plug 'L3MON4D3/LuaSnip'
|
||||||
Plug 'sbdchd/neoformat'
|
Plug 'sbdchd/neoformat'
|
||||||
|
|
||||||
Plug 'hrsh7th/cmp-vsnip'
|
|
||||||
Plug 'hrsh7th/nvim-vsnip'
|
|
||||||
|
|
||||||
|
|
||||||
" Telescope
|
" Telescope
|
||||||
Plug 'nvim-lua/plenary.nvim'
|
Plug 'nvim-lua/plenary.nvim'
|
||||||
Plug 'nvim-telescope/telescope.nvim'
|
Plug 'nvim-telescope/telescope.nvim'
|
||||||
@ -181,7 +175,7 @@ end
|
|||||||
|
|
||||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||||
-- map buffer local keybindings when the language server attaches
|
-- map buffer local keybindings when the language server attaches
|
||||||
local servers = { 'pyright', 'bashls', 'yamlls', 'ansiblels' }
|
local servers = { 'pyright', 'bashls' }
|
||||||
for _, lsp in pairs(servers) do
|
for _, lsp in pairs(servers) do
|
||||||
require('lspconfig')[lsp].setup {
|
require('lspconfig')[lsp].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
@ -201,7 +195,6 @@ cmp.setup {
|
|||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
luasnip.lsp_expand(args.body)
|
luasnip.lsp_expand(args.body)
|
||||||
|
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
@ -234,30 +227,9 @@ cmp.setup {
|
|||||||
sources = {
|
sources = {
|
||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'luasnip' },
|
{ name = 'luasnip' },
|
||||||
{ name = 'vsnip' },
|
|
||||||
{ name = 'ultisnips' },
|
|
||||||
{ name = 'snippy' },
|
|
||||||
{ name = 'path' }
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
cmp.setup.cmdline(':', {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
|
|
||||||
{ name = 'path' }
|
|
||||||
}, {
|
|
||||||
{ name = 'cmdline' }
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
cmp.setup.cmdline('/', {
|
|
||||||
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = {
|
|
||||||
{ name = 'buffer' }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
" Neoformat
|
" Neoformat
|
||||||
@ -265,12 +237,6 @@ let g:neoformat_try_formatprg = 1
|
|||||||
let g:neoformat_basic_format_trim = 1
|
let g:neoformat_basic_format_trim = 1
|
||||||
let g:neoformat_only_msg_on_error = 1
|
let g:neoformat_only_msg_on_error = 1
|
||||||
autocmd BufWritePre * undojoin | Neoformat
|
autocmd BufWritePre * undojoin | Neoformat
|
||||||
let g:neoformat_python_black = {
|
|
||||||
\ 'exe': 'black',
|
|
||||||
\ 'stdin': 1,
|
|
||||||
\ 'args': ['--line-length', '80', '-q', '-'],
|
|
||||||
\ }
|
|
||||||
let g:neoformat_enabled_python = ['black']
|
|
||||||
|
|
||||||
" Ebuild
|
" Ebuild
|
||||||
let g:shfmt_opt="-ci"
|
let g:shfmt_opt="-ci"
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
npm -g i pyright bash-language-server --force
|
npm -g i pyright bash-language-server
|
||||||
npm -g i yaml-language-server --force
|
|
||||||
npm -g i @ansible/ansible-language-server --force
|
|
||||||
GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@latest
|
GO111MODULE=on go install mvdan.cc/sh/v3/cmd/shfmt@latest
|
||||||
pip install black
|
pip install black
|
||||||
pip3 install black
|
pip3 install black
|
||||||
|
Loading…
x
Reference in New Issue
Block a user