Refine some more and correct mistakes

This commit is contained in:
David Holland 2022-09-09 13:48:48 +02:00
parent 535aa5c2c7
commit 2168ae0c71
Signed by: DustVoice
GPG Key ID: 47068995A14EDCA9
2 changed files with 46 additions and 43 deletions

View File

@ -258,33 +258,26 @@ return require('packer').startup(function(use)
} }
use { use {
{
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-cmdline',
{ 'petertriho/cmp-git', requires = 'nvim-lua/plenary.nvim' },
{ 'saadparwaiz1/cmp_luasnip', requires = 'L3MON4D3/LuaSnip' },
{ 'mtoohey31/cmp-fish', ft = 'fish' },
{
'saecki/crates.nvim',
event = { "BufRead Cargo.toml" },
requires = { { 'nvim-lua/plenary.nvim' } },
config = function()
require('crates').setup()
end,
},
},
{
'hrsh7th/nvim-cmp', 'hrsh7th/nvim-cmp',
after = { requires = {
'cmp-nvim-lsp', 'hrsh7th/cmp-nvim-lsp',
'cmp-buffer', 'hrsh7th/cmp-buffer',
'cmp-path', 'hrsh7th/cmp-path',
'cmp-cmdline', 'hrsh7th/cmp-cmdline',
'cmp-git', { 'petertriho/cmp-git', requires = 'nvim-lua/plenary.nvim' },
'cmp_luasnip', { 'saadparwaiz1/cmp_luasnip', requires = 'L3MON4D3/LuaSnip' },
{ 'mtoohey31/cmp-fish', ft = 'fish' },
{
'saecki/crates.nvim',
event = { "BufRead Cargo.toml" },
requires = { { 'nvim-lua/plenary.nvim' } },
config = function()
require('crates').setup()
end,
},
--'dmitmel/cmp-cmdline-history',
'kdheepak/cmp-latex-symbols',
'hrsh7th/cmp-nvim-lsp-signature-help',
}, },
config = function() config = function()
local cmp = require("cmp") local cmp = require("cmp")
@ -312,8 +305,10 @@ return require('packer').startup(function(use)
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = 'nvim_lsp' }, { name = 'nvim_lsp' },
{ name = 'luasnip' }, { name = 'luasnip' },
{ name = 'nvim_lsp_signature_help' },
{ name = 'latex_symbols' },
}, { }, {
{ name = 'buffer' }, { name = 'buffer', keyword_length = 3 },
}) })
} }
@ -322,7 +317,7 @@ return require('packer').startup(function(use)
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
}, { }, {
{ name = 'buffer' }, { name = 'buffer', keyword_length = 3 },
}) })
}) })
@ -336,7 +331,7 @@ return require('packer').startup(function(use)
cmp.setup.cmdline('/', { cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(), mapping = cmp.mapping.preset.cmdline(),
sources = { sources = {
{ name = 'buffer' } { name = 'buffer', keyword_length = 3 }
} }
}) })
@ -344,12 +339,20 @@ return require('packer').startup(function(use)
cmp.setup.cmdline(':', { cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(), mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = 'path' } { name = 'path', keyword_length = 3 }
}, { }, {
{ name = 'cmdline' } { name = 'cmdline', keyword_length = 3 }
}) })
}) })
-- for _, cmd_type in ipairs({':', '/', '?', '@'}) do
-- cmp.setup.cmdline(cmd_type, {
-- sources = {
-- { name = 'cmdline_history', keyword_length = 3 },
-- },
-- })
-- end
vim.api.nvim_create_autocmd("BufRead", { vim.api.nvim_create_autocmd("BufRead", {
group = vim.api.nvim_create_augroup("CmpSourceCargo", { clear = true }), group = vim.api.nvim_create_augroup("CmpSourceCargo", { clear = true }),
pattern = "Cargo.toml", pattern = "Cargo.toml",
@ -358,8 +361,7 @@ return require('packer').startup(function(use)
end, end,
}) })
end, end,
}, }
}
use 'tami5/lspsaga.nvim' use 'tami5/lspsaga.nvim'
end end
@ -473,6 +475,7 @@ return require('packer').startup(function(use)
-- === -- ===
use { use {
"themercorp/themer.lua", "themercorp/themer.lua",
opt = false,
config = function() config = function()
require("themer").setup({ require("themer").setup({
colorscheme = "dracula", colorscheme = "dracula",
@ -488,8 +491,8 @@ return require('packer').startup(function(use)
} }
if vim.g.use_alt_colorschemes == true then if vim.g.use_alt_colorschemes == true then
use {'dracula/vim', as = 'dracula.vim'} --use {'dracula/vim', as = 'dracula.vim'}
use {'Mofiqul/dracula.nvim', as = 'dracula.nvim'} --use {'Mofiqul/dracula.nvim', as = 'dracula.nvim'}
use {'catppuccin/nvim', as = 'catppuccin.nvim'} use {'catppuccin/nvim', as = 'catppuccin.nvim'}
use 'ajmwagar/vim-deus' use 'ajmwagar/vim-deus'

View File

@ -37,19 +37,19 @@ if vim.g.platform == "linux" then
else else
vim.opt.termguicolors = false vim.opt.termguicolors = false
vim.api.nvim_create_autocmd('ColorScheme', { --vim.api.nvim_create_autocmd('ColorScheme', {
pattern = 'themer_dracula', --pattern = 'themer_dracula',
command = 'hi Visual cterm=reverse', --command = 'hi Visual cterm=reverse',
}) --})
end end
elseif vim.g.platform == "xterm" then elseif vim.g.platform == "xterm" then
vim.opt.termguicolors = false vim.opt.termguicolors = false
vim.opt.guicursor = "" vim.opt.guicursor = ""
vim.opt.t_Co = "" vim.opt.t_Co = ""
vim.api.nvim_create_autocmd('ColorScheme', { --vim.api.nvim_create_autocmd('ColorScheme', {
pattern = 'themer_dracula', --pattern = 'themer_dracula',
command = 'hi Visual cterm=reverse', --command = 'hi Visual cterm=reverse',
}) --})
else else
vim.opt.termguicolors = true vim.opt.termguicolors = true
end end