mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2025-01-08 22:44:00 -05:00
0f2574a887
neovim: - highlight: + adjust treesitter groups for nord (TSField as fg doesn't look good in yaml files). Also add highlight for TSNote, TSWarning, TSDanger (notes such as 'TODO', 'FIXME', ...) + rewrite the way theme is set (now 'g:colors_name' is used properly instead of a hacky variable 'g:global_theme'). Also make setting theme more modular + add 'highlight_languages' groups for other syntaxes (html, markdown) that are not covered with treesitter - mappings: properly move ':Telescope lsp_range_code_action' to visual block + avoid mappings for <C-x> and <C-a> (number decrement/increment) - null-ls.nvim: add basic config, load before nvim-lspconfig - plugins: add nvim-treesitter/playground - feline.nvim: lazy loaded on VimEnter - nvim-lightbulb: only refresh on CursorHold (previously stopped working after entering INSERT mode) system: - tlp: update config for v1.4.0 setup: add ani-cli to scripts.sh
30 lines
700 B
Lua
30 lines
700 B
Lua
local M = {}
|
|
|
|
function M.set(theme)
|
|
-- Reset everything
|
|
vim.api.nvim_command('hi clear')
|
|
if vim.fn.exists('syntax_on') then vim.api.nvim_command('syntax reset') end
|
|
vim.opt.background = 'dark'
|
|
|
|
-- Get theme specs
|
|
local t = require('themes.' .. theme)
|
|
vim.g.colors_name = theme
|
|
|
|
-- Load highlight groups
|
|
local async
|
|
async = vim.loop.new_async(vim.schedule_wrap(function()
|
|
t.set_vim_termcolors()
|
|
t.highlight_plugins()
|
|
t.highlight_languages()
|
|
t.highlight_treesitter()
|
|
t.highlight_lsp()
|
|
async:close()
|
|
end))
|
|
|
|
t.highlight_editor()
|
|
t.highlight_syntax()
|
|
async:send() -- Load the rest later
|
|
end
|
|
|
|
return M
|