Fix up color scheme

This commit is contained in:
Leon Grünewald 2022-04-10 15:43:02 +02:00
parent 8dfabd16d6
commit df9619122c
2 changed files with 26 additions and 32 deletions

View file

@ -3,16 +3,22 @@ source ~/.vimrc
lua << EOF
local nvim_lsp = require('lspconfig')
local coq = require('coq')
local null_ls = require('null-ls')
require('colorizer').setup()
require('feline').setup()
require('bufferline').setup{}
require('indent_blankline').setup {
-- for example, context is off by default, use this to turn it on
show_current_context = true,
show_current_context_start = true,
local null_ls = require('null-ls');
null_ls.setup{
sources = {
null_ls.builtins.diagnostics.php,
null_ls.builtins.formatting.clang_format,
null_ls.builtins.formatting.rustfmt,
null_ls.builtins.formatting.eslint,
null_ls.builtins.formatting.phpcsfixer,
null_ls.builtins.formatting.prettier,
null_ls.builtins.formatting.phpcbf,
}
}
require('colorizer').setup{}
require('feline').setup{}
require('bufferline').setup{}
local servers = { 'html', 'clangd', 'vimls', 'vuels', 'phpactor', 'rust_analyzer', 'tsserver', 'pyright'}
@ -27,19 +33,12 @@ local on_attach = function (client, bufnr)
buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
-- buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
-- buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
-- buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
-- buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
-- buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
-- buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
-- buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
-- buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
-- buf_set_keymap('n', '<space>e', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
-- buf_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
-- buf_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
-- buf_set_keymap('n', '<space>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
buf_set_keymap('n', '=', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
end
@ -53,15 +52,4 @@ for _, lsp in ipairs(servers) do
))
end
null_ls.setup({
sources = {
null_ls.builtins.diagnostics.php,
null_ls.builtins.formatting.clang_format,
null_ls.builtins.formatting.rustfmt,
null_ls.builtins.formatting.eslint,
null_ls.builtins.formatting.phpcsfixer,
null_ls.builtins.formatting.prettier,
null_ls.builtins.formatting.phpcbf,
}
});
EOF

8
.vimrc
View file

@ -19,7 +19,6 @@ if has('nvim')
Plug 'ray-x/lsp_signature.nvim'
Plug 'jose-elias-alvarez/null-ls.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'lukas-reineke/indent-blankline.nvim'
Plug 'norcalli/nvim-colorizer.lua'
endif
Plug 'andymass/vim-matchup'
@ -32,6 +31,8 @@ Plug 'justinmk/vim-sneak'
Plug 'alvan/vim-closetag'
Plug 'mipmip/vim-fluid'
Plug 'puremourning/vimspector'
Plug 'ghifarit53/tokyonight-vim'
call plug#end()
if has('nvim')
@ -84,3 +85,8 @@ set fileformats=unix,dos,mac
" Enable term color
set tgc
let g:tokyonight_style = 'night' " available: night, storm
let g:tokyonight_enable_italic = 0
colorscheme tokyonight