mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-04-19 16:27:45 +02:00
Compare commits
No commits in common. "c81fc673fb9bd69a70522373f5170bc37c670479" and "e83b2add69ccffc61ad399b7300a3dfbc5d544bf" have entirely different histories.
c81fc673fb
...
e83b2add69
@ -19,17 +19,14 @@ Plug 'hrsh7th/nvim-cmp' " autocompletion
|
|||||||
Plug 'hrsh7th/cmp-nvim-lsp' " autocompletion bridge to lsp
|
Plug 'hrsh7th/cmp-nvim-lsp' " autocompletion bridge to lsp
|
||||||
Plug 'itchyny/lightline.vim' " fancy statusline
|
Plug 'itchyny/lightline.vim' " fancy statusline
|
||||||
Plug 'junegunn/fzf.vim' " quickly jump files using fzf
|
Plug 'junegunn/fzf.vim' " quickly jump files using fzf
|
||||||
Plug 'L3MON4D3/LuaSnip' " Snippet support
|
|
||||||
Plug 'luochen1990/rainbow' " colorized matching brackets
|
Plug 'luochen1990/rainbow' " colorized matching brackets
|
||||||
Plug 'majutsushi/tagbar', {'on': 'TagbarToggle'} " show tags
|
Plug 'majutsushi/tagbar', {'on': 'TagbarToggle'} " show tags
|
||||||
Plug 'mattesgroeger/vim-bookmarks' " Set Bookmarks
|
Plug 'mattesgroeger/vim-bookmarks' " Set Bookmarks
|
||||||
Plug 'neovim/nvim-lspconfig' " Language server client
|
Plug 'neovim/nvim-lspconfig' " Language server client
|
||||||
Plug 'onsails/lspkind-nvim' " icons on completion
|
|
||||||
Plug 'qpkorr/vim-renamer' " bulk renamer
|
Plug 'qpkorr/vim-renamer' " bulk renamer
|
||||||
Plug 'raimondi/delimitmate' " automatic closing of brackets
|
Plug 'raimondi/delimitmate' " automatic closing of brackets
|
||||||
Plug 'rrethy/vim-hexokinase' , {'do': 'make hexokinase'} " color Preview
|
Plug 'rrethy/vim-hexokinase' , {'do': 'make hexokinase'} " color Preview
|
||||||
Plug 'ryanoasis/vim-devicons' " enable icons for vim
|
Plug 'ryanoasis/vim-devicons' " enable icons for vim
|
||||||
Plug 'saadparwaiz1/cmp_luasnip' " Add luasnips to cmp
|
|
||||||
Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'} " filetree
|
Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'} " filetree
|
||||||
Plug 'tiyn/vim-tccs' " custom colorscheme
|
Plug 'tiyn/vim-tccs' " custom colorscheme
|
||||||
Plug 'tpope/vim-fugitive' " git wrapper
|
Plug 'tpope/vim-fugitive' " git wrapper
|
||||||
@ -117,40 +114,17 @@ let g:bookmark_highlight_lines = 1
|
|||||||
lua << EOF
|
lua << EOF
|
||||||
-- Add additional capabilities supported by nvim-cmp
|
-- Add additional capabilities supported by nvim-cmp
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
|
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||||
|
|
||||||
-- Set completeopt to have a better completion experience
|
-- Set completeopt to have a better completion experience
|
||||||
vim.o.completeopt = 'menuone,noselect'
|
vim.o.completeopt = 'menuone,noselect'
|
||||||
|
|
||||||
-- nvim-cmp setup
|
-- nvim-cmp setup
|
||||||
local cmp = require("cmp")
|
local cmp = require 'cmp'
|
||||||
local luasnip = require("luasnip")
|
|
||||||
local lspkind = require("lspkind")
|
|
||||||
cmp.setup {
|
cmp.setup {
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
luasnip.lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = {
|
mapping = {
|
||||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||||
if cmp.visible() then
|
['<Tab>'] = cmp.mapping.select_next_item(),
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif luasnip.jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
['<Tab>'] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
elseif luasnip.expand_or_jumpable() then
|
|
||||||
luasnip.expand_or_jump()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
['<C-e>'] = cmp.mapping.close(),
|
['<C-e>'] = cmp.mapping.close(),
|
||||||
['<CR>'] = cmp.mapping.confirm {
|
['<CR>'] = cmp.mapping.confirm {
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
@ -160,51 +134,9 @@ cmp.setup {
|
|||||||
{ name = 'nvim_lsp' },
|
{ name = 'nvim_lsp' },
|
||||||
{ name = 'path'},
|
{ name = 'path'},
|
||||||
{ name = 'buffer' },
|
{ name = 'buffer' },
|
||||||
{ name = 'luasnip' },
|
|
||||||
},
|
|
||||||
formatting = {
|
|
||||||
format = lspkind.cmp_format({
|
|
||||||
mode = "symbol_text",
|
|
||||||
preset = "codicons",
|
|
||||||
maxwidth = 50,
|
|
||||||
menu = {
|
|
||||||
nvim_lsp = "[LSP]",
|
|
||||||
path = "[PATH]",
|
|
||||||
buffer = "[BUF]",
|
|
||||||
luasnip = "[SNIP]",
|
|
||||||
},
|
|
||||||
symbol_map = {
|
|
||||||
Text = "",
|
|
||||||
Method = "",
|
|
||||||
Function = "",
|
|
||||||
Constructor = "",
|
|
||||||
Field = "ﰠ",
|
|
||||||
Variable = "",
|
|
||||||
Class = "ﴯ",
|
|
||||||
Interface = "",
|
|
||||||
Module = "",
|
|
||||||
Property = "ﰠ",
|
|
||||||
Unit = "塞",
|
|
||||||
Value = "",
|
|
||||||
Enum = "",
|
|
||||||
Keyword = "",
|
|
||||||
Snippet = "",
|
|
||||||
Color = "",
|
|
||||||
File = "",
|
|
||||||
Reference = "",
|
|
||||||
Folder = "",
|
|
||||||
EnumMember = "",
|
|
||||||
Constant = "",
|
|
||||||
Struct = "פּ",
|
|
||||||
Event = "",
|
|
||||||
Operator = "",
|
|
||||||
TypeParameter = ""
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
require("luasnip.loaders.from_snipmate").lazy_load()
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
" neovim/nvim-lspconfig
|
" neovim/nvim-lspconfig
|
||||||
@ -233,7 +165,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", "tsserver", "texlab", "ccls", "gopls", "hls", "nimls", "marksman" }
|
local servers = { "pyright", "bashls", "tsserver", "texlab", "ccls", "gopls", "hls", "nimls" }
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup {
|
nvim_lsp[lsp].setup {
|
||||||
on_attach=on_attach,
|
on_attach=on_attach,
|
||||||
@ -244,7 +176,6 @@ for _, lsp in ipairs(servers) do
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
require'lspconfig'.jdtls.setup{
|
require'lspconfig'.jdtls.setup{
|
||||||
on_attach=on_attach,
|
on_attach=on_attach,
|
||||||
flags = {
|
flags = {
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
# Section
|
|
||||||
snippet sec \section
|
|
||||||
\\section{${1:section name}}%
|
|
||||||
\\label{sec:${2:$1}}
|
|
||||||
${0}
|
|
||||||
# Section without number
|
|
||||||
snippet sec* \section*
|
|
||||||
\\section*{${1:section name}}%
|
|
||||||
\\label{sec:${2:$1}}
|
|
||||||
${0}
|
|
Loading…
x
Reference in New Issue
Block a user