mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-10-11 20:11:16 +02:00
nvim: switched to init.lua
This commit is contained in:
2
.config/nvim/plugin/lightline.lua
Normal file
2
.config/nvim/plugin/lightline.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- itchyny/lightline.vim
|
||||
vim.g.lightline = { colorscheme = 'tccs'}
|
2
.config/nvim/plugin/neotex.lua
Normal file
2
.config/nvim/plugin/neotex.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- donRaphaco/neotex
|
||||
vim.g.neotex_enabled = 2
|
2
.config/nvim/plugin/nerdtree.lua
Normal file
2
.config/nvim/plugin/nerdtree.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- scrooloose/nerdtree
|
||||
vim.g.NERDTreeWinPos = 'left'
|
115
.config/nvim/plugin/nvim-cmp.lua
Normal file
115
.config/nvim/plugin/nvim-cmp.lua
Normal file
@@ -0,0 +1,115 @@
|
||||
-- hrsh7th/nvim-cmp
|
||||
-- Add additional capabilities supported by nvim-cmp
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
|
||||
-- Set completeopt to have a better completion experience
|
||||
vim.o.completeopt = 'menuone,noselect'
|
||||
|
||||
-- nvim-cmp setup
|
||||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
local lspkind = require("lspkind")
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<S-Tab>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
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(),
|
||||
['<CR>'] = cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}},
|
||||
sources = {
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'path' },
|
||||
{ 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()
|
||||
|
||||
|
||||
-- neovim/nvim-lspconfig
|
||||
local nvim_lsp = require('lspconfig')
|
||||
|
||||
-- Use a loop to conveniently call 'setup' on multiple servers and
|
||||
-- map buffer local keybindings when the language server attaches
|
||||
local servers = { "pyright", "bashls", "tsserver", "texlab", "ccls", "gopls", "hls", "nimls", "marksman" }
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach=on_attach,
|
||||
capabilities=capabilities,
|
||||
flags = {
|
||||
debounce_text_changes = 150
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
require'lspconfig'.jdtls.setup{
|
||||
on_attach=on_attach,
|
||||
flags = {
|
||||
debounce_text_changes = 150
|
||||
},
|
||||
cmd = { 'jdtls' }
|
||||
}
|
2
.config/nvim/plugin/nvim-colorizer.lua
Normal file
2
.config/nvim/plugin/nvim-colorizer.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- norcalli/nvim-colorizer.lua
|
||||
require 'colorizer'.setup()
|
2
.config/nvim/plugin/rainbow.lua
Normal file
2
.config/nvim/plugin/rainbow.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- luochen1990/rainbow
|
||||
vim.g.rainbow_active = 1
|
2
.config/nvim/plugin/vim-go.lua
Normal file
2
.config/nvim/plugin/vim-go.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- fatih/vim-go
|
||||
vim.g.go_def_mapping_enabled = 0
|
3
.config/nvim/plugin/vim-markdown.lua
Normal file
3
.config/nvim/plugin/vim-markdown.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- preservim/vim-markdown
|
||||
vim.g.vim_markdown_folding_style_pythonic = 1
|
||||
vim.g.vim_markdown_folding_disabled = 1
|
Reference in New Issue
Block a user