removed dynamic colorschemes

This commit is contained in:
Ivar Fatland
2023-07-29 13:19:41 +02:00
parent be9f972eb7
commit aa2b2c8d88
+31 -25
View File
@@ -1,7 +1,7 @@
local keymap = { local keymap = {
leader_key = ';', leader_key = ';',
-- Normal mode -------------------------------------------------------- -- Normal mode --------------------------------------------------------------------------------------
telescope_search_for_files_in_working_directory = '<Space>d', telescope_search_for_files_in_working_directory = '<Space>d',
telescope_search_for_previously_opened_files = '<Space><Space>', telescope_search_for_previously_opened_files = '<Space><Space>',
telescope_live_grep = '<Space>g', telescope_live_grep = '<Space>g',
@@ -39,11 +39,11 @@ local keymap = {
--> Splits the current line with comma separated items in paranthesis into multiple lines. --> Splits the current line with comma separated items in paranthesis into multiple lines.
--> Works on all types of parenthesis, and is aware of strings. --> Works on all types of parenthesis, and is aware of strings.
-- Insert / Selection mode -------------------------------------------- -- Insert / Selection mode --------------------------------------------------------------------------
snippet_confirm = '<C-j>', snippet_confirm = '<c-j>',
snippet_jump_forward = '<C-k>', snippet_jump_forward = '<c-k>',
snippet_jump_backward = '<C-h>', snippet_jump_backward = '<c-h>',
snippet_jump_to_end = '<C-l>', snippet_jump_to_end = '<c-l>',
--> Edit snippets for the current file with the custom S command. --> Edit snippets for the current file with the custom S command.
--> Follow the printed instructions on failure. --> Follow the printed instructions on failure.
} }
@@ -51,12 +51,8 @@ local keymap = {
local TAB_WIDTH = 4 local TAB_WIDTH = 4
---@type installed_themes ---@type installed_themes
local default_theme = 'gruvbox' local colorscheme = 'gruvbox'
vim.o.termguicolors = true
---@type { [string]: installed_themes }
local file_specific_themes = {
markdown = 'vscode',
}
vim.g.mapleader = keymap.leader_key vim.g.mapleader = keymap.leader_key
vim.g.maplocalleader = keymap.leader_key vim.g.maplocalleader = keymap.leader_key
@@ -84,7 +80,6 @@ vim.g.python_indent = { -- Fixes retarded default python indentation.
searchpair_timeout = 300, searchpair_timeout = 300,
} }
-- Will only run the first time nvim launches to install 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'
@@ -97,7 +92,6 @@ local ensure_packer = function()
end end
local packer_bootstrap = ensure_packer() local packer_bootstrap = ensure_packer()
-- Packages
local function packer_startup(use) local function packer_startup(use)
use 'wbthomason/packer.nvim' use 'wbthomason/packer.nvim'
use 'lervag/vimtex' -- Provides autocompile on save and stuff. (Could probably just replace this thing with something custom) use 'lervag/vimtex' -- Provides autocompile on save and stuff. (Could probably just replace this thing with something custom)
@@ -149,23 +143,15 @@ local function packer_startup(use)
require('packer').sync() require('packer').sync()
end end
vim.cmd('colorscheme ' .. colorscheme)
vim.g.vimtex_view_method = 'zathura' vim.g.vimtex_view_method = 'zathura'
vim.g.vimtex_syntax_enabled = false vim.g.vimtex_syntax_enabled = false
vim.api.nvim_create_autocmd(
{'BufEnter'},
{
callback = function(_)
local theme = file_specific_themes[vim.api.nvim_buf_get_option(0, "filetype")] or default_theme
vim.o.termguicolors = theme ~= 'default'
vim.cmd(" colorscheme " .. theme .. " ")
end
}
)
vim.g.loaded_netrw = 1 -- Disables some built in plugin vim.g.loaded_netrw = 1 -- Disables some built in plugin
vim.g.loaded_netrwPlugin = 1 -- Disables some built in plugin vim.g.loaded_netrwPlugin = 1 -- Disables some built in plugin
require('nvim-tree').setup() require'nvim-tree'.setup()
vim.keymap.set('n', keymap.navigation_toggle_file_explorer, '<cmd>NvimTreeFindFileToggle<CR>', {silent = true}) vim.keymap.set('n', keymap.navigation_toggle_file_explorer, '<cmd>NvimTreeFindFileToggle<CR>', {silent = true})
require('nvim-treesitter.configs').setup { require('nvim-treesitter.configs').setup {
@@ -470,6 +456,26 @@ return require('packer').startup(packer_startup)
---@alias installed_themes ---@alias installed_themes
---| 'blue'
---| 'darkblue'
---| 'default' ---| 'default'
---| 'delek'
---| 'desert'
---| 'elflord'
---| 'evening'
---| 'gruvbox' ---| 'gruvbox'
---| 'habamax'
---| 'industry'
---| 'koehler'
---| 'lunaperche'
---| 'morning'
---| 'murphy'
---| 'pablo'
---| 'peachpuff'
---| 'quiet'
---| 'ron'
---| 'shine'
---| 'slate'
---| 'torte'
---| 'vscode' ---| 'vscode'
---| 'zellner'