nvim: swapped explorer and tagger for new lua plugins

master
tiyn 1 year ago
parent edd82ee7d9
commit a065c3d401

@ -66,4 +66,3 @@ require('keymap')
-- load general colorscheme -- load general colorscheme
require('colorscheme') require('colorscheme')

@ -2,7 +2,7 @@
-- read files correctly -- read files correctly
vim.filetype.add({ vim.filetype.add({
extension = { extension = {
c = 'c', c = 'c',
h = 'c', h = 'c',
html = 'html', html = 'html',
@ -13,96 +13,112 @@ extension = {
nim = 'nim', nim = 'nim',
py = 'python', py = 'python',
tex = 'tex', tex = 'tex',
}}) }
})
-- delete trailing whitespaces on save -- delete trailing whitespaces on save
vim.api.nvim_create_autocmd({'BufWritePre'}, vim.api.nvim_create_autocmd({ 'BufWritePre' },
{pattern = {'*'}, {
command = [[%s/\s\+$//e]], pattern = { '*' },
}) command = [[%s/\s\+$//e]],
})
-- settings for filetype: c -- settings for filetype: c
vim.api.nvim_create_autocmd({'VimLeave'}, vim.api.nvim_create_autocmd({ 'VimLeave' },
{pattern = {'c'}, {
command = '!cclear' pattern = { 'c' },
}) command = '!cclear'
})
vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{pattern = {'c'}, {
command = 'set colorcolumn=80' pattern = { 'c' },
}) command = 'set colorcolumn=80'
})
-- settings for filetype: java -- settings for filetype: java
vim.api.nvim_create_autocmd({'FileType'}, vim.api.nvim_create_autocmd({ 'FileType' },
{pattern = {'java'}, {
command = 'setlocal shiftwidth=2 softtabstop=2', pattern = { 'java' },
}) command = 'setlocal shiftwidth=2 softtabstop=2',
})
vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{pattern = {'java'}, {
command = 'set colorcolumn=100' pattern = { 'java' },
}) command = 'set colorcolumn=100'
})
-- settings for filetype: javascript -- settings for filetype: javascript
vim.api.nvim_create_autocmd({'FileType'}, vim.api.nvim_create_autocmd({ 'FileType' },
{pattern = {'javascript'}, {
command = 'setlocal shiftwidth=2 softtabstop=2', pattern = { 'javascript' },
}) command = 'setlocal shiftwidth=2 softtabstop=2',
})
-- settings for filetype: lua -- settings for filetype: lua
vim.api.nvim_create_autocmd({'FileType'}, vim.api.nvim_create_autocmd({ 'FileType' },
{pattern = {'lua'}, {
command = 'setlocal shiftwidth=2 softtabstop=2', pattern = { 'lua' },
}) command = 'setlocal shiftwidth=2 softtabstop=2',
})
vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{pattern = {'lua'}, {
command = 'set colorcolumn=100' pattern = { 'lua' },
}) command = 'set colorcolumn=100'
})
-- settings for filetype: markdown -- settings for filetype: markdown
vim.api.nvim_create_autocmd({'FileType'}, vim.api.nvim_create_autocmd({ 'FileType' },
{pattern = {'markdown'}, {
command = 'setlocal shiftwidth=2 softtabstop=2', pattern = { 'markdown' },
}) command = 'setlocal shiftwidth=2 softtabstop=2',
})
vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{pattern = {'markdown'}, {
command = 'set colorcolumn=100' pattern = { 'markdown' },
}) command = 'set colorcolumn=100'
})
vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{pattern = {'markdown'}, {
command = 'set conceallevel=2' pattern = { 'markdown' },
}) command = 'set conceallevel=2'
})
-- settings for filetype: nim -- settings for filetype: nim
vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{pattern = {'nim'}, {
command = 'set colorcolumn=80' pattern = { 'nim' },
}) command = 'set colorcolumn=80'
})
-- settings for filetype: python -- settings for filetype: python
vim.api.nvim_create_autocmd({'BufEnter', 'FileType'}, vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
{pattern = {'python'}, {
command = 'set colorcolumn=80' pattern = { 'python' },
}) command = 'set colorcolumn=80'
})
-- settings for filetype: tex -- settings for filetype: tex
vim.api.nvim_create_autocmd({'VimLeave'}, vim.api.nvim_create_autocmd({ 'VimLeave' },
{pattern = {'tex'}, {
command = '!texclear %' pattern = { 'tex' },
}) command = '!texclear %'
})
vim.api.nvim_create_autocmd({'BufEnter', 'FileType'},
{pattern = {'tex'}, vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' },
command = 'set colorcolumn=80' {
}) pattern = { 'tex' },
command = 'set colorcolumn=80'
})

@ -3,4 +3,4 @@
-- basic color settings -- basic color settings
vim.o.background = 'dark' vim.o.background = 'dark'
vim.cmd('colorscheme tccs') vim.cmd('colorscheme tccs')
vim.api.nvim_set_hl(0, 'colorcolumn', {bg='#772222'}) vim.api.nvim_set_hl(0, 'colorcolumn', { bg = '#772222' })

@ -4,56 +4,56 @@
vim.g.mapleader = "," vim.g.mapleader = ","
-- shortcut for split navigation -- shortcut for split navigation
vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', {noremap = true}) vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', { noremap = true })
vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', {noremap = true}) vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', { noremap = true })
vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', {noremap = true}) vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', { noremap = true })
vim.api.nvim_set_keymap('n', '<C-l>', '<C-w>l', {noremap = true}) vim.api.nvim_set_keymap('n', '<C-l>', '<C-w>l', { noremap = true })
-- unmap unwanted commands -- unmap unwanted commands
vim.api.nvim_set_keymap('n', '<F1>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('n', '<F1>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('n', '<F4>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('n', '<F4>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('n', '<F9>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('n', '<F9>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('n', '<F10>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('n', '<F10>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('n', '<F11>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('n', '<F11>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('n', '<F12>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('n', '<F12>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('i', '<F2>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('i', '<F2>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('i', '<F3>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('i', '<F3>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('i', '<F4>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('i', '<F4>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('i', '<F5>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('i', '<F5>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('i', '<F6>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('i', '<F6>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('i', '<F7>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('i', '<F7>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('i', '<F8>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('i', '<F8>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('i', '<F9>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('i', '<F9>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('i', '<F10>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('i', '<F10>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('i', '<F11>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('i', '<F11>', '<NOP>', { noremap = true })
vim.api.nvim_set_keymap('i', '<F12>', '<NOP>', {noremap = true}) vim.api.nvim_set_keymap('i', '<F12>', '<NOP>', { noremap = true })
-- mapping Dictionaries -- mapping Dictionaries
vim.api.nvim_set_keymap('n', '<F6>', ':setlocal spell! spelllang=de_de<CR>', {noremap = true}) vim.api.nvim_set_keymap('n', '<F6>', ':setlocal spell! spelllang=de_de<CR>', { noremap = true })
vim.api.nvim_set_keymap('n', '<F7>', ':setlocal spell! spelllang=en_us<CR>', {noremap = true}) vim.api.nvim_set_keymap('n', '<F7>', ':setlocal spell! spelllang=en_us<CR>', { noremap = true })
-- compiler for languages -- compiler for languages
vim.api.nvim_set_keymap('n', '<leader>c', ':w! | !compiler <c-r>%<CR>', {noremap = true}) vim.api.nvim_set_keymap('n', '<leader>c', ':w! | !compiler <c-r>%<CR>', { noremap = true })
-- open corresponding file (pdf/html/...) -- open corresponding file (pdf/html/...)
vim.api.nvim_set_keymap('n', '<leader>p', ':!opout <c-r>%<CR><CR>', {noremap = true}) vim.api.nvim_set_keymap('n', '<leader>p', ':!opout <c-r>%<CR><CR>', { noremap = true })
-- save file as sudo on files that require root permission -- save file as sudo on files that require root permission
vim.api.nvim_set_keymap('c', 'w!!', '"silent! write !sudo tee % >/dev/null" <bar> edit!', {noremap = true}) vim.api.nvim_set_keymap('c', 'w!!', '"silent! write !sudo tee % >/dev/null" <bar> edit!', { noremap = true })
-- alias for replacing -- alias for replacing
vim.api.nvim_set_keymap('n', '<leader>ss', ':%s//gI<Left><Left><Left>', {noremap = true}) vim.api.nvim_set_keymap('n', '<leader>ss', ':%s//gI<Left><Left><Left>', { noremap = true })
-- irc compatibility for interactivity -- irc compatibility for interactivity
vim.api.nvim_set_keymap('n', '<leader>is', ':.w >> in<cr>dd', {noremap = true}) vim.api.nvim_set_keymap('n', '<leader>is', ':.w >> in<cr>dd', { noremap = true })
-- majutsushi/tagbar -- majutsushi/tagbar
vim.api.nvim_set_keymap('n', '<F3>', ':TagbarToggle<CR>', {}) vim.api.nvim_set_keymap('n', '<F3>', ':Navbuddy<CR>', {})
-- scrooloose/nerdtree -- scrooloose/nerdtree
vim.api.nvim_set_keymap('n', '<F2>', ':NERDTreeToggle<CR>', {}) vim.api.nvim_set_keymap('n', '<F2>', ':Neotree toggle<CR>', {})
-- tpope/vim-fugitive -- tpope/vim-fugitive
vim.api.nvim_set_keymap('n', '<leader>ga', ':Git add %:p<CR><CR>', { noremap = true }) vim.api.nvim_set_keymap('n', '<leader>ga', ':Git add %:p<CR><CR>', { noremap = true })

@ -3,9 +3,9 @@
-- bootstrap packer -- bootstrap packer
local ensure_packer = function() local ensure_packer = function()
local fn = vim.fn local fn = vim.fn
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
vim.cmd [[packadd packer.nvim]] vim.cmd [[packadd packer.nvim]]
return true return true
end end
@ -16,98 +16,113 @@ local packer_bootstrap = ensure_packer()
-- load plugins with packer -- load plugins with packer
return require("packer").startup(function(use) return require("packer").startup(function(use)
-- package manager (first entry) -- package manager (first entry)
use {'wbthomason/packer.nvim'} use { 'wbthomason/packer.nvim' }
-- improved java syntax highlighting -- improved java syntax highlighting
use {'uiiaoo/java-syntax.vim', use { 'uiiaoo/java-syntax.vim',
ft = {'java'}} ft = { 'java' } }
-- custom statusline -- custom statusline
use {'itchyny/lightline.vim', use { 'itchyny/lightline.vim',
require = {"tiyn/vim-tccs"}} require = { "tiyn/vim-tccs" } }
-- latex asynchronous pdf rendering -- show signature while typing
use {'donRaphaco/neotex', use { 'ray-x/lsp_signature.nvim' }
ft = {'tex'}}
-- latex asynchronous pdf rendering
-- navigating folders with a file tree use { 'donRaphaco/neotex',
use {'scrooloose/nerdtree', ft = { 'tex' } }
cmd = 'NERDTreeToggle',
requires = 'ryanoasis/vim-devicons'} -- fileexplorer on the side
use {
-- nim language support "nvim-neo-tree/neo-tree.nvim",
use {'zah/nim.vim', branch = "v3.x",
ft = {'nim'}} requires = {
"nvim-lua/plenary.nvim",
-- automatic closing of brackets "nvim-tree/nvim-web-devicons",
use {'windwp/nvim-autopairs'} "MunifTanjim/nui.nvim",
}
-- autocompletion and its sources }
use {'hrsh7th/nvim-cmp',
requires = {'hrsh7th/cmp-buffer', -- nim language support
'hrsh7th/cmp-path', use { 'zah/nim.vim',
'hrsh7th/cmp-nvim-lsp', ft = { 'nim' } }
'antoinemadec/fixcursorhold.nvim',
'l3mon4d3/luasnip', -- automatic closing of brackets
'saadparwaiz1/cmp_luasnip', use { 'windwp/nvim-autopairs' }
'neovim/nvim-lspconfig',
'onsails/lspkind-nvim', -- autocompletion and its sources
'williamboman/mason.nvim', use { 'hrsh7th/nvim-cmp',
'williamboman/mason-lspconfig.nvim', requires = { 'hrsh7th/cmp-buffer',
'jose-elias-alvarez/null-ls.nvim', 'hrsh7th/cmp-path',
'LostNeophyte/null-ls-embedded', 'hrsh7th/cmp-nvim-lsp',
'nvim-lua/plenary.nvim', 'lukas-reineke/cmp-under-comparator',
'jay-babu/mason-null-ls.nvim'}} 'antoinemadec/fixcursorhold.nvim',
'l3mon4d3/luasnip',
-- showing color of hex values, etc 'saadparwaiz1/cmp_luasnip',
use {'norcalli/nvim-colorizer.lua'} 'neovim/nvim-lspconfig',
'onsails/lspkind-nvim',
-- better language highlighting by improved parsing 'williamboman/mason.nvim',
use {'nvim-treesitter/nvim-treesitter'} 'williamboman/mason-lspconfig.nvim',
'jose-elias-alvarez/null-ls.nvim',
-- automatically close html-tags 'LostNeophyte/null-ls-embedded',
use {'windwp/nvim-ts-autotag', 'nvim-lua/plenary.nvim',
requires = {'nvim-treesitter/nvim-treesitter'}} 'jay-babu/mason-null-ls.nvim' } }
-- colorful brackets -- showing color of hex values, etc
use {'luochen1990/rainbow'} use { 'norcalli/nvim-colorizer.lua' }
-- show tags -- show tags
use {'majutsushi/tagbar', use {
cmd = 'TagbarToggle'} "SmiteshP/nvim-navbuddy",
requires = {
-- todo symbols and highlighting "neovim/nvim-lspconfig",
use {'folke/todo-comments.nvim', "SmiteshP/nvim-navic",
requires = {'nvim-lua/plenary.nvim'}} "MunifTanjim/nui.nvim",
}
-- git wrapper }
use {'tpope/vim-fugitive'}
-- better language highlighting by improved parsing
-- indicate git diff status of line use { 'nvim-treesitter/nvim-treesitter' }
use {'airblade/vim-gitgutter'}
-- automatically close html-tags
-- golang language support use { 'windwp/nvim-ts-autotag',
use {'fatih/vim-go', requires = { 'nvim-treesitter/nvim-treesitter' } }
ft = {'go'}}
-- colorful brackets
-- markdown language support use { 'luochen1990/rainbow' }
use {'preservim/vim-markdown',
ft = {'md'}, -- todo symbols and highlighting
requires = {'godlygeek/tabular'}} use { 'folke/todo-comments.nvim',
requires = { 'nvim-lua/plenary.nvim' } }
-- bulk renamer
use {'qpkorr/vim-renamer'} -- git wrapper
use { 'tpope/vim-fugitive' }
-- additional quote/parantheses funtions
use {'tpope/vim-surround'} -- indicate git diff status of line
use { 'airblade/vim-gitgutter' }
-- colorscheme
use {'tiyn/vim-tccs'} -- golang language support
use { 'fatih/vim-go',
-- package manager sync (last entry) ft = { 'go' } }
if packer_bootstrap then
require('packer').sync() -- markdown language support
end use { 'preservim/vim-markdown',
ft = { 'md' },
requires = { 'godlygeek/tabular' } }
-- bulk renamer
use { 'qpkorr/vim-renamer' }
-- additional quote/parantheses funtions
use { 'tpope/vim-surround' }
-- colorscheme
use { 'tiyn/vim-tccs' }
-- package manager sync (last entry)
if packer_bootstrap then
require('packer').sync()
end
end) end)

@ -1,2 +1,2 @@
-- itchyny/lightline.vim -- itchyny/lightline.vim
vim.g.lightline = { colorscheme = 'tccs'} vim.g.lightline = { colorscheme = 'tccs' }

@ -1,2 +0,0 @@
-- scrooloose/nerdtree
vim.g.NERDTreeWinPos = 'left'

@ -1,21 +1,14 @@
-- hrsh7th/nvim-cmp -- hrsh7th/nvim-cmp
-- mason package manager
require("mason").setup()
require("mason-lspconfig").setup({
-- automatically install language servers setup below for lspconfig
automatic_setup = true,
})
-- jose-elias-alvarez/null-ls.nvim -- jose-elias-alvarez/null-ls.nvim
local null_ls = require("null-ls") local null_ls = require("null-ls")
null_ls.setup({ null_ls.setup({
sources = { sources = {
require("null-ls-embedded").nls_source, require("null-ls-embedded").nls_source,
null_ls.builtins.formatting.black, null_ls.builtins.formatting.black,
null_ls.builtins.formatting.mdformat, null_ls.builtins.formatting.mdformat,
}, },
}) })
require("null-ls").setup({ require("null-ls").setup({
@ -27,9 +20,17 @@ require("null-ls").setup({
}, },
}) })
-- mason package manager
require("mason").setup()
require("mason-lspconfig").setup({
-- automatically install language servers setup below for lspconfig
automatic_setup = true,
})
require("mason-null-ls").setup({ require("mason-null-ls").setup({
automatic_installation = true, automatic_installation = true,
ensure_installed = {} ensure_installed = {}
}) })
-- Add additional capabilities supported by nvim-cmp -- Add additional capabilities supported by nvim-cmp
@ -43,6 +44,18 @@ local cmp = require("cmp")
local luasnip = require("luasnip") local luasnip = require("luasnip")
local lspkind = require("lspkind") local lspkind = require("lspkind")
cmp.setup { cmp.setup {
sorting = {
comparators = {
cmp.config.compare.offset,
cmp.config.compare.exact,
cmp.config.compare.score,
require "cmp-under-comparator".under,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,
cmp.config.compare.order,
},
},
snippet = { snippet = {
expand = function(args) expand = function(args)
luasnip.lsp_expand(args.body) luasnip.lsp_expand(args.body)
@ -51,27 +64,28 @@ cmp.setup {
mapping = { mapping = {
['<S-Tab>'] = cmp.mapping(function(fallback) ['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_prev_item() cmp.select_prev_item()
elseif luasnip.jumpable(-1) then elseif luasnip.jumpable(-1) then
luasnip.jump(-1) luasnip.jump(-1)
else else
fallback() fallback()
end end
end, { "i", "s" }), end, { "i", "s" }),
['<Tab>'] = cmp.mapping(function(fallback) ['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then if cmp.visible() then
cmp.select_next_item() cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump() luasnip.expand_or_jump()
else else
fallback() fallback()
end end
end, { "i", "s" }), 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,
select = true, select = true,
}}, }
},
sources = { sources = {
{ name = 'nvim_lsp' }, { name = 'nvim_lsp' },
{ name = 'path' }, { name = 'path' },
@ -84,10 +98,10 @@ cmp.setup {
preset = "codicons", preset = "codicons",
maxwidth = 50, maxwidth = 50,
menu = { menu = {
nvim_lsp = "[LSP]", nvim_lsp = "[LSP]",
path = "[PATH]", path = "[PATH]",
buffer = "[BUF]", buffer = "[BUF]",
luasnip = "[SNIP]", luasnip = "[SNIP]",
}, },
symbol_map = { symbol_map = {
Text = "", Text = "",
@ -124,33 +138,47 @@ require("luasnip.loaders.from_snipmate").lazy_load()
-- neovim/nvim-lspconfig -- neovim/nvim-lspconfig
local nvim_lsp = require('lspconfig') local nvim_lsp = require('lspconfig')
require "lsp_signature".setup({
bind = true,
handler_opts = {
border = "rounded"
}
})
local navbuddy = require("nvim-navbuddy")
local attach_func = function(client, bufnr)
navbuddy.attach(client, bufnr)
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", "texlab", "ccls", "nimls", "marksman" } local servers = { "pyright", "bashls", "texlab", "ccls", "nimls", "marksman" }
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 = attach_func,
capabilities=capabilities, capabilities = capabilities,
flags = { flags = {
debounce_text_changes = 150 debounce_text_changes = 150
} }
} }
end end
require'lspconfig'.jdtls.setup{ require 'lspconfig'.jdtls.setup {
on_attach=on_attach, on_attach = attach_func,
flags = { flags = {
debounce_text_changes = 150 debounce_text_changes = 150
}, },
cmd = { 'jdtls' } cmd = { 'jdtls' }
} }
require'lspconfig'.lua_ls.setup { require 'lspconfig'.lua_ls.setup {
on_attach = attach_func,
settings = { settings = {
Lua = { Lua = {
runtime = { version = 'LuaJIT' }, runtime = { version = 'LuaJIT' },
diagnostics = { globals = {'vim'} }, diagnostics = { globals = { 'vim' } },
workspace = { library = vim.api.nvim_get_runtime_file("", true) }, workspace = { library = vim.api.nvim_get_runtime_file("", true) },
telemetry = { enable = false }, telemetry = { enable = false },
}, },

@ -1,5 +1,5 @@
-- norcalli/nvim-colorizer.lua -- norcalli/nvim-colorizer.lua
require 'colorizer'.setup { require 'colorizer'.setup {
'*'; '*',
'!markdown'; '!markdown',
} }

@ -1,21 +1,21 @@
-- folke/todo-comments.nvim -- folke/todo-comments.nvim
require 'todo-comments'.setup { require 'todo-comments'.setup {
signs = true, -- show icons in the signs column signs = true, -- show icons in the signs column
sign_priority = 8, -- sign priority sign_priority = 8, -- sign priority
-- keywords recognized as todo comments -- keywords recognized as todo comments
keywords = { keywords = {
ERRO = { icon = "", color = "error"}, ERRO = { icon = "", color = "error" },
TODO = { icon = "", color = "info" }, TODO = { icon = "", color = "info" },
HACK = { icon = "", color = "warning"}, HACK = { icon = "", color = "warning" },
WARN = { icon = "", color = "warning"}, WARN = { icon = "", color = "warning" },
PERF = { icon = "", color = "default"}, PERF = { icon = "", color = "default" },
NOTE = { icon = "", color = "hint"}, NOTE = { icon = "", color = "hint" },
TEST = { icon = "", color = "test"}, TEST = { icon = "", color = "test" },
}, },
gui_style = { gui_style = {
fg = "NONE", -- The gui style to use for the fg highlight group. fg = "NONE", -- The gui style to use for the fg highlight group.
bg = "BOLD", -- The gui style to use for the bg highlight group. bg = "BOLD", -- The gui style to use for the bg highlight group.
}, },
merge_keywords = true, -- when true, custom keywords will be merged with the defaults merge_keywords = true, -- when true, custom keywords will be merged with the defaults
-- highlighting of the line containing the todo comment -- highlighting of the line containing the todo comment
@ -23,16 +23,16 @@ require 'todo-comments'.setup {
-- * keyword: highlights of the keyword -- * keyword: highlights of the keyword
-- * after: highlights after the keyword (todo text) -- * after: highlights after the keyword (todo text)
highlight = { highlight = {
multiline = true, -- enable multine todo comments multiline = true, -- enable multine todo comments
multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword
multiline_context = 10, -- extra lines that will be re-evaluated when changing a line multiline_context = 10, -- extra lines that will be re-evaluated when changing a line
before = "", -- "fg" or "bg" or empty before = "", -- "fg" or "bg" or empty
keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg) keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg)
after = "fg", -- "fg" or "bg" or empty after = "fg", -- "fg" or "bg" or empty
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex) pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex)
comments_only = true, -- uses treesitter to match keywords in comments only comments_only = true, -- uses treesitter to match keywords in comments only
max_line_len = 400, -- ignore lines longer than this max_line_len = 400, -- ignore lines longer than this
exclude = {}, -- list of file types to exclude highlighting exclude = {}, -- list of file types to exclude highlighting
}, },
-- list of named colors where we try to extract the guifg from the -- list of named colors where we try to extract the guifg from the
-- list of highlight groups or use the hex color if hl not found as a fallback -- list of highlight groups or use the hex color if hl not found as a fallback

Loading…
Cancel
Save