few small fixes

This commit is contained in:
2022-10-27 15:20:21 +08:00
parent 0e1bf5aad4
commit 45464380bc
7 changed files with 118 additions and 81 deletions

View File

@@ -1,8 +1,8 @@
return {
-- Yes, I use the Mate desktop environment
template_dir = '~/templates',
external_term = 'mate-terminal',
external_filemgr = 'caja',
external_pdfviewer = 'atril',
external_term = 'gnome-terminal',
external_filemgr = 'nautilus',
external_pdfviewer = 'evince',
lsp_path = vim.env.HOME .. '/.local/share/lsp_servers'
}

View File

@@ -9,6 +9,7 @@ local defs = require('defaults')
ct.augroup('templates',
{'BufNewFile', '*.c', '0r', defs.template_dir .. '/c_stdio.c'},
{'BufNewFile', '*.cpp', '0r', defs.template_dir .. '/cpp_iostream.cpp'},
{'BufNewFile', '*.go', '0r', defs.template_dir .. '/go.go'},
{'BufNewFile', '*.html', '0r', defs.template_dir .. '/html.html'},
{'BufNewFile', '*.html', '0r', defs.template_dir .. '/html.html'},
{'BufNewFile', '*.py', '0r', defs.template_dir .. '/py.py'},

View File

@@ -4,12 +4,11 @@
-- Load required tools
local pk_use = require 'packer'.use
local ct = require 'conftool'
--
-- Tree Sitter
--
--[[
pk_use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate',
@@ -37,6 +36,7 @@ pk_use {
}
end
}
]]--
--
-- Autocompletion
@@ -45,7 +45,7 @@ pk_use {
'ms-jpq/coq_nvim',
branch = 'coq',
config = function()
vim.cmd([[autocmd VimEnter * COQnow]])
vim.cmd([[autocmd VimEnter * COQnow -s]])
end
}
pk_use {
@@ -66,17 +66,8 @@ pk_use {
'fatih/vim-go',
ft = 'go'
}
pk_use {
'lervag/vimtex',
ft = 'tex',
config = function()
local defs = require 'defaults'
vim.g.vimtex_view_general_viewer = defs.external_pdfviewer
vim.g.vimtex_compiler_latexmk_engines = { _ = '-xelatex'}
vim.g.vimtex_compiler_progname = 'nvim'
end
}
pk_use 'udalov/kotlin-vim'
--
-- Language Server
@@ -85,6 +76,14 @@ pk_use {
-- Basic commands
pk_use 'nanotee/nvim-lsp-basics'
-- Show Code Outline/Symbols tree window
pk_use {
'stevearc/aerial.nvim',
config = function()
require('aerial').setup()
end
}
-- Language Server Installer
pk_use {
'williamboman/mason.nvim',
@@ -96,7 +95,8 @@ pk_use {
'williamboman/mason-lspconfig.nvim',
requires = {
'williamboman/mason.nvim',
'ms-jpq/coq_nvim'
'ms-jpq/coq_nvim',
'stevearc/aerial.nvim'
},
config = function()
local masonlsp = require 'mason-lspconfig'
@@ -114,6 +114,7 @@ pk_use {
local basics = require('lsp_basics')
basics.make_lsp_commands(client, bufnr)
basics.make_lsp_mappings(client, bufnr)
require('aerial').on_attach(client, bufnr)
end
})
end
@@ -121,15 +122,20 @@ pk_use {
end
}
pk_use {'neovim/nvim-lspconfig'}
pk_use {
'neovim/nvim-lspconfig',
config = function()
-- disable inline error messages
vim.diagnostic.config({virtual_text = false})
end
}
--
-- Show code diagnostics in a separate buffer window
--
pk_use {
'folke/trouble.nvim',
config = function()
require('trouble').setup {
height = 5,
icons = false,
fold_open = "v",
fold_closed = ">",
@@ -147,8 +153,19 @@ pk_use {
}
--
-- Debugger Adapter Protocol
-- Latex Live Preview
--
pk_use {
'xuhdev/vim-latex-live-preview',
ft = 'tex',
setup = function()
vim.g.livepreview_previewer = require('defs').external_pdfviewer
vim.g.livepreview_engine = "xelatex"
end
}
-- Debugger Adapter Protocol
--[[
pk_use {
'mfussenegger/nvim-dap',

View File

@@ -51,8 +51,7 @@ pk_use {
--
vim.g.netrw_liststyle = 3 -- tree style display
vim.g.netrw_banner = 0 -- no banner needed
vim.g.netrw_browse_split = 4
vim.g.netrw_winsize = 15 -- small window size
vim.g.netrw_browse_split = 0
vim.g.netrw_chgwin = 1
--

View File

@@ -20,10 +20,26 @@ pk_use {
--}
--]]
pk_use {
'Th3Whit3Wolf/one-nvim',
'Shatur/neovim-ayu',
config = function()
require('conftool').set({'background', "light"})
vim.cmd [[colorscheme one-nvim]]
local ct = require('conftool')
local hr = os.date('*t').hour
--[[
if hr >= 21 then
ct.set({'background', 'dark'})
elseif hr >= 7 then
ct.set({'background', 'light'})
elseif hr >= 0 then
ct.set({'background', 'light'})
end
]]--
ct.set({'background', 'light'})
require('ayu').setup {
mirage = false,
}
vim.cmd [[colorscheme ayu]]
end
}