Nvim config rewrite

This commit is contained in:
2024-09-28 16:38:13 +01:00
parent cad1e93d95
commit 216a5c36b4
27 changed files with 144 additions and 1262 deletions

View File

@@ -1,6 +0,0 @@
column_width = 160
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferSingle"
call_parentheses = "None"

View File

@@ -1,24 +0,0 @@
================================================================================
INTRODUCTION *kickstart.nvim*
Kickstart.nvim is a project to help you get started on your neovim journey.
*kickstart-is-not*
It is not:
- Complete framework for every plugin under the sun
- Place to add every plugin that could ever be useful
*kickstart-is*
It is:
- Somewhere that has a good start for the most common "IDE" type features:
- autocompletion
- goto-definition
- find references
- fuzzy finding
- and hinting at what more can be done :)
- A place to _kickstart_ your journey.
- You should fork this project and use/modify it so that it matches your
style and preferences. If you don't want to do that, there are probably
other projects that would fit much better for you (and that's great!)!
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,3 +0,0 @@
kickstart-is kickstart.txt /*kickstart-is*
kickstart-is-not kickstart.txt /*kickstart-is-not*
kickstart.nvim kickstart.txt /*kickstart.nvim*

View File

@@ -1,10 +1,16 @@
------------------------------------------------------------------------------
-- GLOBAL
------------------------------------------------------------------------------
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.g.have_nerd_font = true
vim.wo.fillchars = 'eob: '
-- NOTE: OPTIONS
------------------------------------------------------------------------------
-- OPTIONS
-- See `:help vim.opt`
-- For more options, you can see `:help option-list`
------------------------------------------------------------------------------
vim.opt.number = true -- Enable line numbers
vim.opt.relativenumber = true -- Lines are relative (helps with jumping)
@@ -29,781 +35,159 @@ vim.opt.listchars = {
vim.opt.inccommand = 'split' -- Preview substitutions
vim.opt.cursorline = true
vim.opt.scrolloff = 10
vim.o.termguicolors = true
-- NOTE: Basic Keymaps
------------------------------------------------------------------------------
-- KEYMAPS
-- See `:help vim.keymap.set()`
------------------------------------------------------------------------------
-- Set highlight on search, but clear on pressing <Esc> in normal mode
vim.opt.hlsearch = true
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Diagnostic keymaps
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, {
desc = 'Go to previous [D]iagnostic message'
})
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, {
desc = 'Go to next [D]iagnostic message'
})
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, {
desc = 'Show diagnostic [E]rror messages'
})
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, {
desc = 'Open diagnostic [Q]uickfix list'
})
------------------------------------------------------------------------------
-- INSTALL LAZY.NVIM
------------------------------------------------------------------------------
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
-- is not what someone will guess without a bit more experience.
--
-- This won't work in all terminal emulators/tmux/etc. Try your own mapping
-- or just use <C-\><C-n> to exit terminal mode
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', {
desc = 'Exit terminal mode'
})
-- Keybinds to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows
--
-- See `:help wincmd` for a list of all window commands
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', {
desc = 'Move focus to the left window'
})
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', {
desc = 'Move focus to the right window'
})
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', {
desc = 'Move focus to the lower window'
})
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', {
desc = 'Move focus to the upper window'
})
-- NOTE: Basic Autocommands
-- See `:help lua-guide-autocommands`
-- Highlight when yanking (copying) text
-- Try it with `yap` in normal mode
-- See `:help vim.highlight.on_yank()`
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', {
clear = true
}),
callback = function()
vim.highlight.on_yank()
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({"git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath})
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo(
{{"Failed to clone lazy.nvim:\n", "ErrorMsg"}, {out, "WarningMsg"}, {"\nPress any key to exit..."}}, true, {})
vim.fn.getchar()
os.exit(1)
end
})
-- NOTE: Install `lazy.nvim` plugin manager
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
vim.fn.system {'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath}
end ---@diagnostic disable-next-line: undefined-field
end
vim.opt.rtp:prepend(lazypath)
-- NOTE: Configure and install plugins
--
-- To check the current status of your plugins, run
-- :Lazy
--
-- You can press `?` in this menu for help. Use `:q` to close the window
--
-- To update plugins you can run
-- :Lazy update
--
require('lazy').setup({'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
{
'numToStr/Comment.nvim',
opts = {}
}, -- "gc" to comment visual regions/lines
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
'lewis6991/gitsigns.nvim',
opts = {
signs = {
add = {
text = '+'
},
change = {
text = '~'
},
delete = {
text = '_'
},
topdelete = {
text = ''
},
changedelete = {
text = '~'
}
}
}
}, { -- Useful plugin to show you pending keybinds.
'folke/which-key.nvim',
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
config = function() -- This is the function that runs, AFTER loading
require('which-key').setup()
------------------------------------------------------------------------------
-- SET UP PLUGINS
------------------------------------------------------------------------------
-- Document existing key chains
require('which-key').register {
['<leader>c'] = {
name = '[C]ode',
_ = 'which_key_ignore'
},
['<leader>d'] = {
name = '[D]ocument',
_ = 'which_key_ignore'
},
['<leader>r'] = {
name = '[R]ename',
_ = 'which_key_ignore'
},
['<leader>s'] = {
name = '[S]earch',
_ = 'which_key_ignore'
},
['<leader>w'] = {
name = '[W]orkspace',
_ = 'which_key_ignore'
},
['<leader>t'] = {
name = '[T]oggle',
_ = 'which_key_ignore'
},
['<leader>h'] = {
name = 'Git [H]unk',
_ = 'which_key_ignore'
}
}
-- visual mode
require('which-key').register({
['<leader>h'] = {'Git [H]unk'}
}, {
mode = 'v'
})
end
}, { -- Fuzzy Finder (files, lsp, etc)
'nvim-telescope/telescope.nvim',
event = 'VimEnter',
branch = '0.1.x',
dependencies = {'nvim-lua/plenary.nvim',
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
'nvim-telescope/telescope-fzf-native.nvim',
-- `build` is used to run some command when the plugin is installed/updated.
-- This is only run then, not every time Neovim starts up.
build = 'make',
-- `cond` is a condition used to determine whether this plugin should be
-- installed and loaded.
cond = function()
return vim.fn.executable 'make' == 1
end
}, {'nvim-telescope/telescope-ui-select.nvim'}, -- Useful for getting pretty icons, but requires a Nerd Font.
{
'nvim-tree/nvim-web-devicons',
enabled = vim.g.have_nerd_font
}},
require('lazy').setup({{ -- Syntax Highlighting / Simple Code Completion
"nvim-treesitter/nvim-treesitter",
config = function()
-- Two important keymaps to use while in Telescope are:
-- - Insert mode: <c-/>
-- - Normal mode: ?
-- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()`
require('telescope').setup {
-- You can put your default mappings / updates / etc. in here
-- All the info you're looking for is in `:help telescope.setup()`
--
-- defaults = {
-- mappings = {
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' },
-- },
-- },
-- pickers = {}
extensions = {
['ui-select'] = {require('telescope.themes').get_dropdown()}
require'nvim-treesitter.configs'.setup {
ensure_installed = {"c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline", "bash", "python"},
auto_install = true,
highlight = {
enable = true
}
}
-- Enable Telescope extensions if they are installed
pcall(require('telescope').load_extension, 'fzf')
pcall(require('telescope').load_extension, 'ui-select')
-- See `:help telescope.builtin`
local builtin = require 'telescope.builtin'
vim.keymap.set('n', '<leader>sh', builtin.help_tags, {
desc = '[S]earch [H]elp'
})
vim.keymap.set('n', '<leader>sk', builtin.keymaps, {
desc = '[S]earch [K]eymaps'
})
vim.keymap.set('n', '<leader>sf', builtin.find_files, {
desc = '[S]earch [F]iles'
})
vim.keymap.set('n', '<leader>ss', builtin.builtin, {
desc = '[S]earch [S]elect Telescope'
})
vim.keymap.set('n', '<leader>sw', builtin.grep_string, {
desc = '[S]earch current [W]ord'
})
vim.keymap.set('n', '<leader>sg', builtin.live_grep, {
desc = '[S]earch by [G]rep'
})
vim.keymap.set('n', '<leader>sd', builtin.diagnostics, {
desc = '[S]earch [D]iagnostics'
})
vim.keymap.set('n', '<leader>sr', builtin.resume, {
desc = '[S]earch [R]esume'
})
vim.keymap.set('n', '<leader>s.', builtin.oldfiles, {
desc = '[S]earch Recent Files ("." for repeat)'
})
vim.keymap.set('n', '<leader><leader>', builtin.buffers, {
desc = '[ ] Find existing buffers'
})
-- Slightly advanced example of overriding default behavior and theme
vim.keymap.set('n', '<leader>/', function()
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown {
winblend = 10,
previewer = false
})
end, {
desc = '[/] Fuzzily search in current buffer'
})
-- It's also possible to pass additional configuration options.
-- See `:help telescope.builtin.live_grep()` for information about particular keys
vim.keymap.set('n', '<leader>s/', function()
builtin.live_grep {
grep_open_files = true,
prompt_title = 'Live Grep in Open Files'
}
end, {
desc = '[S]earch [/] in Open Files'
})
-- Shortcut for searching your Neovim configuration files
vim.keymap.set('n', '<leader>sn', function()
builtin.find_files {
cwd = vim.fn.stdpath 'config'
}
end, {
desc = '[S]earch [N]eovim files'
})
end
}, { -- NOTE: LSP Configuration & Plugins
'neovim/nvim-lspconfig',
dependencies = { -- Automatically install LSPs and related tools to stdpath for Neovim
{
'williamboman/mason.nvim',
config = true
}, 'williamboman/mason-lspconfig.nvim', 'WhoIsSethDaniel/mason-tool-installer.nvim',
-- Useful status updates for LSP.
-- `opts = {}` is the same as calling `require('fidget').setup({})`
{
'j-hui/fidget.nvim',
opts = {}
}, -- `neodev` configures Lua LSP for your Neovim config, runtime and plugins
-- used for completion, annotations and signatures of Neovim apis
{
'folke/neodev.nvim',
opts = {}
}},
config = function()
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-attach', {
clear = true
}),
callback = function(event)
local map = function(keys, func, desc)
vim.keymap.set('n', keys, func, {
buffer = event.buf,
desc = 'LSP: ' .. desc
})
end
-- Jump to the definition of the word under your cursor.
-- This is where a variable was first declared, or where a function is defined, etc.
-- To jump back, press <C-t>.
map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition')
-- Find references for the word under your cursor.
map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
-- Jump to the implementation of the word under your cursor.
-- Useful when your language has ways of declaring types without an actual implementation.
map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
-- Jump to the type of the word under your cursor.
-- Useful when you're not sure what type a variable is and you want to see
-- the definition of its *type*, not where it was *defined*.
map('<leader>D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition')
-- Fuzzy find all the symbols in your current document.
-- Symbols are things like variables, functions, types, etc.
map('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
-- Fuzzy find all the symbols in your current workspace.
-- Similar to document symbols, except searches over your entire project.
map('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')
-- Rename the variable under your cursor.
-- Most Language Servers support renaming across files, etc.
map('<leader>rn', vim.lsp.buf.rename, '[R]e[n]ame')
-- Execute a code action, usually your cursor needs to be on top of an error
-- or a suggestion from your LSP for this to activate.
map('<leader>ca', vim.lsp.buf.code_action, '[C]ode [A]ction')
-- Opens a popup that displays documentation about the word under your cursor
-- See `:help K` for why this keymap.
map('K', vim.lsp.buf.hover, 'Hover Documentation')
-- WARN: This is not Goto Definition, this is Goto Declaration.
-- For example, in C this would take you to the header.
map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration')
-- The following two autocommands are used to highlight references of the
-- word under your cursor when your cursor rests there for a little while.
-- See `:help CursorHold` for information about when this is executed
--
-- When you move your cursor, the highlights will be cleared (the second autocommand).
local client = vim.lsp.get_client_by_id(event.data.client_id)
if client and client.server_capabilities.documentHighlightProvider then
local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', {
clear = false
})
vim.api.nvim_create_autocmd({'CursorHold', 'CursorHoldI'}, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.document_highlight
})
vim.api.nvim_create_autocmd({'CursorMoved', 'CursorMovedI'}, {
buffer = event.buf,
group = highlight_augroup,
callback = vim.lsp.buf.clear_references
})
vim.api.nvim_create_autocmd('LspDetach', {
group = vim.api.nvim_create_augroup('kickstart-lsp-detach', {
clear = true
}),
callback = function(event2)
vim.lsp.buf.clear_references()
vim.api.nvim_clear_autocmds {
group = 'kickstart-lsp-highlight',
buffer = event2.buf
}
end
})
end
-- The following autocommand is used to enable inlay hints in your
-- code, if the language server you are using supports them
--
-- This may be unwanted, since they displace some of your code
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
map('<leader>th', function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
end, '[T]oggle Inlay [H]ints')
end
end
})
-- LSP servers and clients are able to communicate to each other what features they support.
-- By default, Neovim doesn't support everything that is in the LSP specification.
-- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities.
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_capabilities())
-- Enable the following language servers
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
--
-- Add any additional override configuration in the following tables. Available keys are:
-- - cmd (table): Override the default command used to start the server
-- - filetypes (table): Override the default list of associated filetypes for the server
-- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features.
-- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = {
-- clangd = {},
-- gopls = {},
-- pyright = {},
-- rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
-- Some languages (like typescript) have entire language plugins that can be useful:
-- https://github.com/pmizio/typescript-tools.nvim
--
-- But for many setups, the LSP (`tsserver`) will work just fine
-- tsserver = {},
--
lua_ls = {
-- cmd = {...},
-- filetypes = { ...},
-- capabilities = {},
settings = {
Lua = {
completion = {
callSnippet = 'Replace'
}
-- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings
-- diagnostics = { disable = { 'missing-fields' } },
}
}
}
}
-- Ensure the servers and tools above are installed
-- To check the current status of installed tools and/or manually install
-- other tools, you can run
-- :Mason
--
-- You can press `g?` for help in this menu.
require('mason').setup()
-- You can add other tools here that you want Mason to install
-- for you, so that they are available from within Neovim.
local ensure_installed = vim.tbl_keys(servers or {})
vim.list_extend(ensure_installed, {'stylua' -- Used to format Lua code
})
require('mason-tool-installer').setup {
ensure_installed = ensure_installed
}
require('mason-lspconfig').setup {
handlers = {function(server_name)
local server = servers[server_name] or {}
-- This handles overriding only values explicitly passed
-- by the server configuration above. Useful when disabling
-- certain features of an LSP (for example, turning off formatting for tsserver)
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
require('lspconfig')[server_name].setup(server)
end}
}
end
}, { -- Autoformat
'stevearc/conform.nvim',
lazy = false,
keys = {{
'<leader>f',
function()
require('conform').format {
async = true,
lsp_fallback = true
}
end,
mode = '',
desc = '[F]ormat buffer'
}},
opts = {
notify_on_error = false,
format_on_save = function(bufnr)
-- Disable "format_on_save lsp_fallback" for languages that don't
-- have a well standardized coding style. You can add additional
-- languages here or re-enable it for the disabled ones.
local disable_filetypes = {
c = true,
cpp = true
}
return {
timeout_ms = 500,
lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype]
}
end,
formatters_by_ft = {
lua = {'stylua'}
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--
-- You can use a sub-list to tell conform to run *until* a formatter
-- is found.
-- javascript = { { "prettierd", "prettier" } },
}
}
}, { -- Autocompletion
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
dependencies = { -- Snippet Engine & its associated nvim-cmp source
{
'L3MON4D3/LuaSnip',
build = (function()
-- Build Step is needed for regex support in snippets.
-- This step is not supported in many windows environments.
-- Remove the below condition to re-enable on windows.
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
return
end
return 'make install_jsregexp'
end)(),
dependencies = {
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
-- {
-- 'rafamadriz/friendly-snippets',
-- config = function()
-- require('luasnip.loaders.from_vscode').lazy_load()
-- end,
-- },
}
}, 'saadparwaiz1/cmp_luasnip', -- Adds other completion capabilities.
-- nvim-cmp does not ship with all sources by default. They are split
-- into multiple repos for maintenance purposes.
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-path'},
}, {
"Mofiqul/adwaita.nvim",
priority = 1000,
config = function()
-- See `:help cmp`
local cmp = require 'cmp'
local luasnip = require 'luasnip'
luasnip.config.setup {}
vim.g.adwaita_transparent = true
vim.cmd.colorscheme "adwaita"
end
}, {
'nvim-lualine/lualine.nvim',
dependencies = {'nvim-tree/nvim-web-devicons'},
config = function()
local colors = {
cyan = '#2aa1b3',
black = '#1f1f1f',
white = '#ffffff',
red = '#c01c28',
grey = '#303030',
yellow = '#a2734c',
green = '#26a269'
}
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end
},
completion = {
completeopt = 'menu,menuone,noinsert'
},
-- For an understanding of why these mappings were
-- chosen, you will need to read `:help ins-completion`
--
-- No, but seriously. Please read `:help ins-completion`, it is really good!
mapping = cmp.mapping.preset.insert {
-- Select the [n]ext item
['<C-n>'] = cmp.mapping.select_next_item(),
-- Select the [p]revious item
['<C-p>'] = cmp.mapping.select_prev_item(),
-- Scroll the documentation window [b]ack / [f]orward
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
-- Accept ([y]es) the completion.
-- This will auto-import if your LSP supports it.
-- This will expand snippets if the LSP sent a snippet.
['<C-y>'] = cmp.mapping.confirm {
select = true
local bubbles_theme = {
normal = {
a = {
fg = colors.black,
bg = colors.green
},
-- If you prefer more traditional completion keymaps,
-- you can uncomment the following lines
-- ['<CR>'] = cmp.mapping.confirm { select = true },
-- ['<Tab>'] = cmp.mapping.select_next_item(),
-- ['<S-Tab>'] = cmp.mapping.select_prev_item(),
-- Manually trigger a completion from nvim-cmp.
-- Generally you don't need this, because nvim-cmp will display
-- completions whenever it has completion options available.
['<C-Space>'] = cmp.mapping.complete {},
-- Think of <c-l> as moving to the right of your snippet expansion.
-- So if you have a snippet that's like:
-- function $name($args)
-- $body
-- end
--
-- <c-l> will move you to the right of each of the expansion locations.
-- <c-h> is similar, except moving you backwards.
['<C-l>'] = cmp.mapping(function()
if luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
end
end, {'i', 's'}),
['<C-h>'] = cmp.mapping(function()
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
end
end, {'i', 's'})
-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
b = {
fg = colors.white,
bg = colors.grey
},
c = {
fg = colors.white
}
},
sources = {{
name = 'nvim_lsp'
}, {
name = 'luasnip'
}, {
name = 'path'
}}
}
end
}, { -- You can easily change to a different colorscheme.
-- Change the name of the colorscheme plugin below, and then
-- change the command in the config to whatever the name of that colorscheme is.
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
'ellisonleao/gruvbox.nvim',
priority = 1000, -- Make sure to load this before all the other start plugins.
init = function()
-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'gruvbox'
-- You can configure highlights by doing something like:
vim.cmd.hi 'Comment gui=none'
end
}, -- Highlight todo, notes, etc in comments
{
'folke/todo-comments.nvim',
event = 'VimEnter',
dependencies = {'nvim-lua/plenary.nvim'},
opts = {
signs = false
}
}, { -- Collection of various small independent plugins/modules
'echasnovski/mini.nvim',
config = function()
-- Better Around/Inside textobjects
--
-- Examples:
-- - va) - [V]isually select [A]round [)]paren
-- - yinq - [Y]ank [I]nside [N]ext [']quote
-- - ci' - [C]hange [I]nside [']quote
require('mini.ai').setup {
n_lines = 500
}
insert = {
a = {
fg = colors.black,
bg = colors.yellow
}
},
visual = {
a = {
fg = colors.black,
bg = colors.cyan
}
},
replace = {
a = {
fg = colors.black,
bg = colors.red
}
},
-- Add/delete/replace surroundings (brackets, quotes, etc.)
--
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
-- - sd' - [S]urround [D]elete [']quotes
-- - sr)' - [S]urround [R]eplace [)] [']
require('mini.surround').setup()
-- Simple and easy statusline.
-- You could remove this setup call if you don't like it,
-- and try some other statusline plugin
local statusline = require 'mini.statusline'
-- set use_icons to true if you have a Nerd Font
statusline.setup {
use_icons = vim.g.have_nerd_font
}
-- You can configure sections in the statusline by overriding their
-- default behavior. For example, here we set the section for
-- cursor location to LINE:COLUMN
---@diagnostic disable-next-line: duplicate-set-field
statusline.section_location = function()
return '%2l:%-2v'
end
-- ... and there is more!
-- Check out: https://github.com/echasnovski/mini.nvim
end
}, { -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
opts = {
ensure_installed = {'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc'},
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
enable = true,
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
-- If you are experiencing weird indenting issues, add the language to
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
additional_vim_regex_highlighting = {'ruby'}
},
indent = {
enable = true,
disable = {'ruby'}
}
},
config = function(_, opts)
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
-- Prefer git instead of curl in order to improve connectivity in some environments
require('nvim-treesitter.install').prefer_git = true
---@diagnostic disable-next-line: missing-fields
require('nvim-treesitter.configs').setup(opts)
-- There are additional nvim-treesitter modules that you can use to interact
-- with nvim-treesitter. You should go explore a few and see what interests you:
--
-- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod`
-- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context
-- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects
end
}, -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the
-- init.lua. If you want these files, they are in the repository, so you can just download them and
-- place them in the correct locations.
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
-- Optional dependency
dependencies = {'hrsh7th/nvim-cmp'},
config = function()
require('nvim-autopairs').setup {}
-- If you want to automatically add `(` after selecting a function or method
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
local cmp = require 'cmp'
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
end
}, {
'nvim-neo-tree/neo-tree.nvim',
version = '*',
dependencies = {'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim'},
cmd = 'Neotree',
keys = {{'\\', ':Neotree reveal<CR>', {
desc = 'NeoTree reveal'
}}},
opts = {
filesystem = {
window = {
mappings = {
['\\'] = 'close_window'
inactive = {
a = {
fg = colors.white,
bg = colors.black
},
b = {
fg = colors.white,
bg = colors.black
},
c = {
fg = colors.white
}
}
}
}
} -- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart
--
-- Here are some example plugins that I've included in the Kickstart repository.
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
--
-- require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- This is the easiest way to modularize your config.
--
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins`
-- { import = 'custom.plugins' },
}, {
ui = {
-- If you are using a Nerd Font: set icons to an empty table which will use the
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
icons = vim.g.have_nerd_font and {} or {
cmd = '',
config = '🛠',
event = '📅',
ft = '📂',
init = '',
keys = '🗝',
plugin = '🔌',
runtime = '💻',
require = '🌙',
source = '📄',
start = '🚀',
task = '📌',
lazy = '💤 '
}
}
})
-- The line beneath this is called `modeline`. See `:help modeline`
-- vim: ts=2 sts=2 sw=2 et
require('lualine').setup {
options = {
icons_enabled = true,
theme = bubbles_theme,
component_separators = '',
section_separators = {
left = '',
right = ''
}
},
sections = {
lualine_a = {{
'mode',
separator = {
left = ''
},
right_padding = 2
}},
lualine_b = {'filename', 'branch'},
lualine_c = {'%=' --[[ add your center compoentnts here in place of this comment ]] },
lualine_x = {},
lualine_y = {'filetype', 'progress'},
lualine_z = {{
'location',
separator = {
right = ''
},
left_padding = 2
}}
},
inactive_sections = {
lualine_a = {'filename'},
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = {'location'}
},
tabline = {},
extensions = {}
}
end
}})

View File

@@ -1,5 +0,0 @@
-- You can add your own plugins here or in other files in this directory!
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}

View File

@@ -1,50 +0,0 @@
--[[
--
-- This file is not required for your own configuration,
-- but helps people determine if their system is setup correctly.
--
--]] local check_version = function()
local verstr = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch)
if not vim.version.cmp then
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
return
end
if vim.version.cmp(vim.version(), {0, 9, 4}) >= 0 then
vim.health.ok(string.format("Neovim version is: '%s'", verstr))
else
vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
end
end
local check_external_reqs = function()
-- Basic utils: `git`, `make`, `unzip`
for _, exe in ipairs {'git', 'make', 'unzip', 'rg'} do
local is_executable = vim.fn.executable(exe) == 1
if is_executable then
vim.health.ok(string.format("Found executable: '%s'", exe))
else
vim.health.warn(string.format("Could not find executable: '%s'", exe))
end
end
return true
end
return {
check = function()
vim.health.start 'kickstart.nvim'
vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
Fix only warnings for plugins and languages you intend to use.
Mason will give warnings for languages that are not installed.
You do not need to install, unless you want to use those languages!]]
local uv = vim.uv or vim.loop
vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
check_version()
check_external_reqs()
end
}

View File

@@ -1,102 +0,0 @@
-- debug.lua
--
-- Shows how to use the DAP plugin to debug your code.
--
-- Primarily focused on configuring the debugger for Go, but can
-- be extended to other languages as well. That's why it's called
-- kickstart.nvim and not kitchen-sink.nvim ;)
return {
-- NOTE: Yes, you can install new plugins here!
'mfussenegger/nvim-dap',
-- NOTE: And you can specify dependencies as well
dependencies = { -- Creates a beautiful debugger UI
'rcarriga/nvim-dap-ui', -- Required dependency for nvim-dap-ui
'nvim-neotest/nvim-nio', -- Installs the debug adapters for you
'williamboman/mason.nvim', 'jay-babu/mason-nvim-dap.nvim', -- Add your own debuggers here
'leoluz/nvim-dap-go'},
config = function()
local dap = require 'dap'
local dapui = require 'dapui'
require('mason-nvim-dap').setup {
-- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations
automatic_installation = true,
-- You can provide additional configuration to the handlers,
-- see mason-nvim-dap README for more information
handlers = {},
-- You'll need to check that you have the required things installed
-- online, please don't ask me how to install them :)
ensure_installed = { -- Update this to ensure that you have the debuggers for the langs you want
'delve'}
}
-- Basic debugging keymaps, feel free to change to your liking!
vim.keymap.set('n', '<F5>', dap.continue, {
desc = 'Debug: Start/Continue'
})
vim.keymap.set('n', '<F1>', dap.step_into, {
desc = 'Debug: Step Into'
})
vim.keymap.set('n', '<F2>', dap.step_over, {
desc = 'Debug: Step Over'
})
vim.keymap.set('n', '<F3>', dap.step_out, {
desc = 'Debug: Step Out'
})
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint, {
desc = 'Debug: Toggle Breakpoint'
})
vim.keymap.set('n', '<leader>B', function()
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
end, {
desc = 'Debug: Set Breakpoint'
})
-- Dap UI setup
-- For more information, see |:help nvim-dap-ui|
dapui.setup {
-- Set icons to characters that are more likely to work in every terminal.
-- Feel free to remove or use ones that you like more! :)
-- Don't feel like these are good choices.
icons = {
expanded = '',
collapsed = '',
current_frame = '*'
},
controls = {
icons = {
pause = '',
play = '',
step_into = '',
step_over = '',
step_out = '',
step_back = 'b',
run_last = '▶▶',
terminate = '',
disconnect = ''
}
}
}
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
vim.keymap.set('n', '<F7>', dapui.toggle, {
desc = 'Debug: See last session result.'
})
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close
-- Install golang specific config
require('dap-go').setup {
delve = {
-- On Windows delve must be run attached or it crashes.
-- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
detached = vim.fn.has 'win32' == 0
}
}
end
}

View File

@@ -1,94 +0,0 @@
-- Adds git related signs to the gutter, as well as utilities for managing changes
-- NOTE: gitsigns is already included in init.lua but contains only the base
-- config. This will add also the recommended keymaps.
return {{
'lewis6991/gitsigns.nvim',
opts = {
on_attach = function(bufnr)
local gitsigns = require 'gitsigns'
local function map(mode, l, r, opts)
opts = opts or {}
opts.buffer = bufnr
vim.keymap.set(mode, l, r, opts)
end
-- Navigation
map('n', ']c', function()
if vim.wo.diff then
vim.cmd.normal {
']c',
bang = true
}
else
gitsigns.nav_hunk 'next'
end
end, {
desc = 'Jump to next git [c]hange'
})
map('n', '[c', function()
if vim.wo.diff then
vim.cmd.normal {
'[c',
bang = true
}
else
gitsigns.nav_hunk 'prev'
end
end, {
desc = 'Jump to previous git [c]hange'
})
-- Actions
-- visual mode
map('v', '<leader>hs', function()
gitsigns.stage_hunk {vim.fn.line '.', vim.fn.line 'v'}
end, {
desc = 'stage git hunk'
})
map('v', '<leader>hr', function()
gitsigns.reset_hunk {vim.fn.line '.', vim.fn.line 'v'}
end, {
desc = 'reset git hunk'
})
-- normal mode
map('n', '<leader>hs', gitsigns.stage_hunk, {
desc = 'git [s]tage hunk'
})
map('n', '<leader>hr', gitsigns.reset_hunk, {
desc = 'git [r]eset hunk'
})
map('n', '<leader>hS', gitsigns.stage_buffer, {
desc = 'git [S]tage buffer'
})
map('n', '<leader>hu', gitsigns.undo_stage_hunk, {
desc = 'git [u]ndo stage hunk'
})
map('n', '<leader>hR', gitsigns.reset_buffer, {
desc = 'git [R]eset buffer'
})
map('n', '<leader>hp', gitsigns.preview_hunk, {
desc = 'git [p]review hunk'
})
map('n', '<leader>hb', gitsigns.blame_line, {
desc = 'git [b]lame line'
})
map('n', '<leader>hd', gitsigns.diffthis, {
desc = 'git [d]iff against index'
})
map('n', '<leader>hD', function()
gitsigns.diffthis '@'
end, {
desc = 'git [D]iff against last commit'
})
-- Toggles
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, {
desc = '[T]oggle git show [b]lame line'
})
map('n', '<leader>tD', gitsigns.toggle_deleted, {
desc = '[T]oggle git show [D]eleted'
})
end
}
}}

View File

@@ -1,7 +0,0 @@
return {{ -- Add indentation guides even on blank lines
'lukas-reineke/indent-blankline.nvim',
-- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help ibl`
main = 'ibl',
opts = {}
}}

View File

@@ -1,54 +0,0 @@
return {{ -- Linting
'mfussenegger/nvim-lint',
event = {'BufReadPre', 'BufNewFile'},
config = function()
local lint = require 'lint'
lint.linters_by_ft = {
markdown = {'markdownlint'}
}
-- To allow other plugins to add linters to require('lint').linters_by_ft,
-- instead set linters_by_ft like this:
-- lint.linters_by_ft = lint.linters_by_ft or {}
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
--
-- However, note that this will enable a set of default linters,
-- which will cause errors unless these tools are available:
-- {
-- clojure = { "clj-kondo" },
-- dockerfile = { "hadolint" },
-- inko = { "inko" },
-- janet = { "janet" },
-- json = { "jsonlint" },
-- markdown = { "vale" },
-- rst = { "vale" },
-- ruby = { "ruby" },
-- terraform = { "tflint" },
-- text = { "vale" }
-- }
--
-- You can disable the default linters by setting their filetypes to nil:
-- lint.linters_by_ft['clojure'] = nil
-- lint.linters_by_ft['dockerfile'] = nil
-- lint.linters_by_ft['inko'] = nil
-- lint.linters_by_ft['janet'] = nil
-- lint.linters_by_ft['json'] = nil
-- lint.linters_by_ft['markdown'] = nil
-- lint.linters_by_ft['rst'] = nil
-- lint.linters_by_ft['ruby'] = nil
-- lint.linters_by_ft['terraform'] = nil
-- lint.linters_by_ft['text'] = nil
-- Create autocommand which carries out the actual linting
-- on the specified events.
local lint_augroup = vim.api.nvim_create_augroup('lint', {
clear = true
})
vim.api.nvim_create_autocmd({'BufEnter', 'BufWritePost', 'InsertLeave'}, {
group = lint_augroup,
callback = function()
require('lint').try_lint()
end
})
end
}}

View File

@@ -1,21 +0,0 @@
-- Neo-tree is a Neovim plugin to browse the file system
-- https://github.com/nvim-neo-tree/neo-tree.nvim
return {
'nvim-neo-tree/neo-tree.nvim',
version = '*',
dependencies = {'nvim-lua/plenary.nvim', 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim'},
cmd = 'Neotree',
keys = {{'\\', ':Neotree reveal<CR>', {
desc = 'NeoTree reveal'
}}},
opts = {
filesystem = {
window = {
mappings = {
['\\'] = 'close_window'
}
}
}
}
}

View File

@@ -1,9 +1,6 @@
# easy reload config
bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded."
# Enable full colors
set-option -sa terminal-overrides ",xterm*:Tc"
# set window split
bind-key v split-window -h -c "#{pane_current_path}"
bind-key b split-window -v -c "#{pane_current_path}"
@@ -49,11 +46,17 @@ set -g mouse on
# VIM Options
set-option -g focus-events on
set-option -sa terminal-features ',foot:RGB'
# Truecolor support
set -g default-terminal "$TERM"
set -ag terminal-overrides ",$TERM:Tc"
# Remove confirm prompt when closing pane
bind-key x kill-pane
# Place statusbar at the top
set-option -g status-position top
# Load TMUX Plugins
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_right_separator " "

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,79 @@
" -----------------------------------------------------------------------------
" File: gruvbox.vim
" Description: Retro groove color scheme for Airline
" Author: morhetz <morhetz@gmail.com>
" Source: https://github.com/morhetz/gruvbox
" Last Modified: 12 Aug 2017
" -----------------------------------------------------------------------------
let g:airline#themes#gruvbox#palette = {}
function! airline#themes#gruvbox#refresh()
let M0 = airline#themes#get_highlight('Identifier')
let accents_group = airline#themes#get_highlight('Special')
let modified_group = [M0[0], '', M0[2], '', '']
let warning_group = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg'])
let error_group = airline#themes#get_highlight2(['Normal', 'bg'], ['WarningMsg', 'fg'])
let s:N1 = airline#themes#get_highlight2(['Normal', 'bg'], ['StatusLineNC', 'bg'])
let s:N2 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['Pmenu', 'bg'])
let s:N3 = airline#themes#get_highlight2(['StatusLineNC', 'bg'], ['CursorLine', 'bg'])
let g:airline#themes#gruvbox#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
let g:airline#themes#gruvbox#palette.normal_modified = { 'airline_c': modified_group }
let g:airline#themes#gruvbox#palette.normal.airline_warning = warning_group
let g:airline#themes#gruvbox#palette.normal_modified.airline_warning = warning_group
let g:airline#themes#gruvbox#palette.normal.airline_error = error_group
let g:airline#themes#gruvbox#palette.normal_modified.airline_error = error_group
let s:I1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Identifier', 'fg'])
let s:I2 = s:N2
let s:I3 = airline#themes#get_highlight2(['Normal', 'fg'], ['Pmenu', 'bg'])
let g:airline#themes#gruvbox#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#gruvbox#palette.insert_modified = g:airline#themes#gruvbox#palette.normal_modified
let g:airline#themes#gruvbox#palette.insert.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
let g:airline#themes#gruvbox#palette.insert_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
let g:airline#themes#gruvbox#palette.insert.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error
let g:airline#themes#gruvbox#palette.insert_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error
let s:R1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Structure', 'fg'])
let s:R2 = s:I2
let s:R3 = s:I3
let g:airline#themes#gruvbox#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
let g:airline#themes#gruvbox#palette.replace_modified = g:airline#themes#gruvbox#palette.normal_modified
let g:airline#themes#gruvbox#palette.replace.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
let g:airline#themes#gruvbox#palette.replace_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
let g:airline#themes#gruvbox#palette.replace.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error
let g:airline#themes#gruvbox#palette.replace_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error
let s:V1 = airline#themes#get_highlight2(['Normal', 'bg'], ['Question', 'fg'])
let s:V2 = s:N2
let s:V3 = airline#themes#get_highlight2(['Normal', 'bg'], ['TabLine', 'fg'])
let g:airline#themes#gruvbox#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
let g:airline#themes#gruvbox#palette.visual_modified = { 'airline_c': [ s:V3[0], '', s:V3[2], '', '' ] }
let g:airline#themes#gruvbox#palette.visual.airline_warning = g:airline#themes#gruvbox#palette.normal.airline_warning
let g:airline#themes#gruvbox#palette.visual_modified.airline_warning = g:airline#themes#gruvbox#palette.normal_modified.airline_warning
let g:airline#themes#gruvbox#palette.visual.airline_error = g:airline#themes#gruvbox#palette.normal.airline_error
let g:airline#themes#gruvbox#palette.visual_modified.airline_error = g:airline#themes#gruvbox#palette.normal_modified.airline_error
let s:IA = airline#themes#get_highlight2(['TabLine', 'fg'], ['CursorLine', 'bg'])
let g:airline#themes#gruvbox#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA)
let g:airline#themes#gruvbox#palette.inactive_modified = { 'airline_c': modified_group }
let g:airline#themes#gruvbox#palette.accents = { 'red': accents_group }
let s:TF = airline#themes#get_highlight2(['Normal', 'bg'], ['Normal', 'bg'])
let g:airline#themes#gruvbox#palette.tabline = {
\ 'airline_tab': s:N2,
\ 'airline_tabsel': s:N1,
\ 'airline_tabtype': s:V1,
\ 'airline_tabfill': s:TF,
\ 'airline_tabhid': s:IA,
\ 'airline_tabmod': s:I1
\ }
endfunction
call airline#themes#gruvbox#refresh()
" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker:

View File

@@ -0,0 +1,41 @@
" -----------------------------------------------------------------------------
" File: gruvbox.vim
" Description: Retro groove color scheme for Vim
" Author: morhetz <morhetz@gmail.com>
" Source: https://github.com/morhetz/gruvbox
" Last Modified: 09 Apr 2014
" -----------------------------------------------------------------------------
function! gruvbox#invert_signs_toggle()
if g:gruvbox_invert_signs == 0
let g:gruvbox_invert_signs=1
else
let g:gruvbox_invert_signs=0
endif
colorscheme gruvbox
endfunction
" Search Highlighting {{{
function! gruvbox#hls_show()
set hlsearch
call GruvboxHlsShowCursor()
endfunction
function! gruvbox#hls_hide()
set nohlsearch
call GruvboxHlsHideCursor()
endfunction
function! gruvbox#hls_toggle()
if &hlsearch
call gruvbox#hls_hide()
else
call gruvbox#hls_show()
endif
endfunction
" }}}
" vim: set sw=2 ts=2 sts=2 et tw=80 ft=vim fdm=marker:

View File

@@ -0,0 +1,57 @@
" -----------------------------------------------------------------------------
" File: gruvbox.vim
" Description: Gruvbox colorscheme for Lightline (itchyny/lightline.vim)
" Author: gmoe <me@griffinmoe.com>
" Source: https://github.com/morhetz/gruvbox
" Last Modified: 20 Sep 2017
" -----------------------------------------------------------------------------
function! s:getGruvColor(group)
let guiColor = synIDattr(hlID(a:group), "fg", "gui")
let termColor = synIDattr(hlID(a:group), "fg", "cterm")
return [ guiColor, termColor ]
endfunction
if exists('g:lightline')
let s:bg0 = s:getGruvColor('GruvboxBg0')
let s:bg1 = s:getGruvColor('GruvboxBg1')
let s:bg2 = s:getGruvColor('GruvboxBg2')
let s:bg4 = s:getGruvColor('GruvboxBg4')
let s:fg1 = s:getGruvColor('GruvboxFg1')
let s:fg4 = s:getGruvColor('GruvboxFg4')
let s:yellow = s:getGruvColor('GruvboxYellow')
let s:blue = s:getGruvColor('GruvboxBlue')
let s:aqua = s:getGruvColor('GruvboxAqua')
let s:orange = s:getGruvColor('GruvboxOrange')
let s:green = s:getGruvColor('GruvboxGreen')
let s:p = {'normal':{}, 'inactive':{}, 'insert':{}, 'replace':{}, 'visual':{}, 'tabline':{}, 'terminal':{}}
let s:p.normal.left = [ [ s:bg0, s:fg4, 'bold' ], [ s:fg4, s:bg2 ] ]
let s:p.normal.right = [ [ s:bg0, s:fg4 ], [ s:fg4, s:bg2 ] ]
let s:p.normal.middle = [ [ s:fg4, s:bg1 ] ]
let s:p.inactive.right = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ]
let s:p.inactive.left = [ [ s:bg4, s:bg1 ], [ s:bg4, s:bg1 ] ]
let s:p.inactive.middle = [ [ s:bg4, s:bg1 ] ]
let s:p.insert.left = [ [ s:bg0, s:blue, 'bold' ], [ s:fg1, s:bg2 ] ]
let s:p.insert.right = [ [ s:bg0, s:blue ], [ s:fg1, s:bg2 ] ]
let s:p.insert.middle = [ [ s:fg4, s:bg2 ] ]
let s:p.terminal.left = [ [ s:bg0, s:green, 'bold' ], [ s:fg1, s:bg2 ] ]
let s:p.terminal.right = [ [ s:bg0, s:green ], [ s:fg1, s:bg2 ] ]
let s:p.terminal.middle = [ [ s:fg4, s:bg2 ] ]
let s:p.replace.left = [ [ s:bg0, s:aqua, 'bold' ], [ s:fg1, s:bg2 ] ]
let s:p.replace.right = [ [ s:bg0, s:aqua ], [ s:fg1, s:bg2 ] ]
let s:p.replace.middle = [ [ s:fg4, s:bg2 ] ]
let s:p.visual.left = [ [ s:bg0, s:orange, 'bold' ], [ s:bg0, s:bg4 ] ]
let s:p.visual.right = [ [ s:bg0, s:orange ], [ s:bg0, s:bg4 ] ]
let s:p.visual.middle = [ [ s:fg4, s:bg1 ] ]
let s:p.tabline.left = [ [ s:fg4, s:bg2 ] ]
let s:p.tabline.tabsel = [ [ s:bg0, s:fg4 ] ]
let s:p.tabline.middle = [ [ s:bg0, s:bg0 ] ]
let s:p.tabline.right = [ [ s:bg0, s:orange ] ]
let s:p.normal.error = [ [ s:bg0, s:orange ] ]
let s:p.normal.warning = [ [ s:bg2, s:yellow ] ]
let g:lightline#colorscheme#gruvbox#palette = lightline#colorscheme#flatten(s:p)
endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,118 @@
#!/bin/sh
if [ "${TERM%%-*}" = "screen" ]; then
if [ -n "$TMUX" ]; then
printf "\033Ptmux;\033\033]4;236;rgb:32/30/2f\007\033\\"
printf "\033Ptmux;\033\033]4;234;rgb:1d/20/21\007\033\\"
printf "\033Ptmux;\033\033]4;235;rgb:28/28/28\007\033\\"
printf "\033Ptmux;\033\033]4;237;rgb:3c/38/36\007\033\\"
printf "\033Ptmux;\033\033]4;239;rgb:50/49/45\007\033\\"
printf "\033Ptmux;\033\033]4;241;rgb:66/5c/54\007\033\\"
printf "\033Ptmux;\033\033]4;243;rgb:7c/6f/64\007\033\\"
printf "\033Ptmux;\033\033]4;244;rgb:92/83/74\007\033\\"
printf "\033Ptmux;\033\033]4;245;rgb:92/83/74\007\033\\"
printf "\033Ptmux;\033\033]4;228;rgb:f2/e5/bc\007\033\\"
printf "\033Ptmux;\033\033]4;230;rgb:f9/f5/d7\007\033\\"
printf "\033Ptmux;\033\033]4;229;rgb:fb/f1/c7\007\033\\"
printf "\033Ptmux;\033\033]4;223;rgb:eb/db/b2\007\033\\"
printf "\033Ptmux;\033\033]4;250;rgb:d5/c4/a1\007\033\\"
printf "\033Ptmux;\033\033]4;248;rgb:bd/ae/93\007\033\\"
printf "\033Ptmux;\033\033]4;246;rgb:a8/99/84\007\033\\"
printf "\033Ptmux;\033\033]4;167;rgb:fb/49/34\007\033\\"
printf "\033Ptmux;\033\033]4;142;rgb:b8/bb/26\007\033\\"
printf "\033Ptmux;\033\033]4;214;rgb:fa/bd/2f\007\033\\"
printf "\033Ptmux;\033\033]4;109;rgb:83/a5/98\007\033\\"
printf "\033Ptmux;\033\033]4;175;rgb:d3/86/9b\007\033\\"
printf "\033Ptmux;\033\033]4;108;rgb:8e/c0/7c\007\033\\"
printf "\033Ptmux;\033\033]4;208;rgb:fe/80/19\007\033\\"
printf "\033Ptmux;\033\033]4;88;rgb:9d/00/06\007\033\\"
printf "\033Ptmux;\033\033]4;100;rgb:79/74/0e\007\033\\"
printf "\033Ptmux;\033\033]4;136;rgb:b5/76/14\007\033\\"
printf "\033Ptmux;\033\033]4;24;rgb:07/66/78\007\033\\"
printf "\033Ptmux;\033\033]4;96;rgb:8f/3f/71\007\033\\"
printf "\033Ptmux;\033\033]4;66;rgb:42/7b/58\007\033\\"
printf "\033Ptmux;\033\033]4;130;rgb:af/3a/03\007\033\\"
else
printf "\033P\033]4;236;rgb:32/30/2f\007\033\\"
printf "\033P\033]4;234;rgb:1d/20/21\007\033\\"
printf "\033P\033]4;235;rgb:28/28/28\007\033\\"
printf "\033P\033]4;237;rgb:3c/38/36\007\033\\"
printf "\033P\033]4;239;rgb:50/49/45\007\033\\"
printf "\033P\033]4;241;rgb:66/5c/54\007\033\\"
printf "\033P\033]4;243;rgb:7c/6f/64\007\033\\"
printf "\033P\033]4;244;rgb:92/83/74\007\033\\"
printf "\033P\033]4;245;rgb:92/83/74\007\033\\"
printf "\033P\033]4;228;rgb:f2/e5/bc\007\033\\"
printf "\033P\033]4;230;rgb:f9/f5/d7\007\033\\"
printf "\033P\033]4;229;rgb:fb/f1/c7\007\033\\"
printf "\033P\033]4;223;rgb:eb/db/b2\007\033\\"
printf "\033P\033]4;250;rgb:d5/c4/a1\007\033\\"
printf "\033P\033]4;248;rgb:bd/ae/93\007\033\\"
printf "\033P\033]4;246;rgb:a8/99/84\007\033\\"
printf "\033P\033]4;167;rgb:fb/49/34\007\033\\"
printf "\033P\033]4;142;rgb:b8/bb/26\007\033\\"
printf "\033P\033]4;214;rgb:fa/bd/2f\007\033\\"
printf "\033P\033]4;109;rgb:83/a5/98\007\033\\"
printf "\033P\033]4;175;rgb:d3/86/9b\007\033\\"
printf "\033P\033]4;108;rgb:8e/c0/7c\007\033\\"
printf "\033P\033]4;208;rgb:fe/80/19\007\033\\"
printf "\033P\033]4;88;rgb:9d/00/06\007\033\\"
printf "\033P\033]4;100;rgb:79/74/0e\007\033\\"
printf "\033P\033]4;136;rgb:b5/76/14\007\033\\"
printf "\033P\033]4;24;rgb:07/66/78\007\033\\"
printf "\033P\033]4;96;rgb:8f/3f/71\007\033\\"
printf "\033P\033]4;66;rgb:42/7b/58\007\033\\"
printf "\033P\033]4;130;rgb:af/3a/03\007\033\\"
fi
elif [ "$TERM" != "linux" ] && [ "$TERM" != "vt100" ] && [ "$TERM" != "vt220" ]; then
printf "\033]4;236;rgb:32/30/2f\033\\"
printf "\033]4;234;rgb:1d/20/21\033\\"
printf "\033]4;235;rgb:28/28/28\033\\"
printf "\033]4;237;rgb:3c/38/36\033\\"
printf "\033]4;239;rgb:50/49/45\033\\"
printf "\033]4;241;rgb:66/5c/54\033\\"
printf "\033]4;243;rgb:7c/6f/64\033\\"
printf "\033]4;244;rgb:92/83/74\033\\"
printf "\033]4;245;rgb:92/83/74\033\\"
printf "\033]4;228;rgb:f2/e5/bc\033\\"
printf "\033]4;230;rgb:f9/f5/d7\033\\"
printf "\033]4;229;rgb:fb/f1/c7\033\\"
printf "\033]4;223;rgb:eb/db/b2\033\\"
printf "\033]4;250;rgb:d5/c4/a1\033\\"
printf "\033]4;248;rgb:bd/ae/93\033\\"
printf "\033]4;246;rgb:a8/99/84\033\\"
printf "\033]4;167;rgb:fb/49/34\033\\"
printf "\033]4;142;rgb:b8/bb/26\033\\"
printf "\033]4;214;rgb:fa/bd/2f\033\\"
printf "\033]4;109;rgb:83/a5/98\033\\"
printf "\033]4;175;rgb:d3/86/9b\033\\"
printf "\033]4;108;rgb:8e/c0/7c\033\\"
printf "\033]4;208;rgb:fe/80/19\033\\"
printf "\033]4;88;rgb:9d/00/06\033\\"
printf "\033]4;100;rgb:79/74/0e\033\\"
printf "\033]4;136;rgb:b5/76/14\033\\"
printf "\033]4;24;rgb:07/66/78\033\\"
printf "\033]4;96;rgb:8f/3f/71\033\\"
printf "\033]4;66;rgb:42/7b/58\033\\"
printf "\033]4;130;rgb:af/3a/03\033\\"
fi

View File

@@ -0,0 +1,116 @@
#!/bin/sh
if [ "${TERM%%-*}" = "screen" ]; then
if [ -n "$TMUX" ]; then
printf "\033Ptmux;\033\033]4;236;rgb:26/24/23\007\033\\"
printf "\033Ptmux;\033\033]4;234;rgb:16/18/19\007\033\\"
printf "\033Ptmux;\033\033]4;235;rgb:1e/1e/1e\007\033\\"
printf "\033Ptmux;\033\033]4;237;rgb:2e/2a/29\007\033\\"
printf "\033Ptmux;\033\033]4;239;rgb:3f/39/35\007\033\\"
printf "\033Ptmux;\033\033]4;241;rgb:53/4a/42\007\033\\"
printf "\033Ptmux;\033\033]4;243;rgb:68/5c/51\007\033\\"
printf "\033Ptmux;\033\033]4;244;rgb:7f/70/61\007\033\\"
printf "\033Ptmux;\033\033]4;245;rgb:7f/70/61\007\033\\"
printf "\033Ptmux;\033\033]4;228;rgb:ef/df/ae\007\033\\"
printf "\033Ptmux;\033\033]4;230;rgb:f8/f4/cd\007\033\\"
printf "\033Ptmux;\033\033]4;229;rgb:fa/ee/bb\007\033\\"
printf "\033Ptmux;\033\033]4;223;rgb:e6/d4/a3\007\033\\"
printf "\033Ptmux;\033\033]4;250;rgb:cb/b8/90\007\033\\"
printf "\033Ptmux;\033\033]4;248;rgb:af/9f/81\007\033\\"
printf "\033Ptmux;\033\033]4;246;rgb:97/87/71\007\033\\"
printf "\033Ptmux;\033\033]4;167;rgb:f7/30/28\007\033\\"
printf "\033Ptmux;\033\033]4;142;rgb:aa/b0/1e\007\033\\"
printf "\033Ptmux;\033\033]4;214;rgb:f7/b1/25\007\033\\"
printf "\033Ptmux;\033\033]4;109;rgb:71/95/86\007\033\\"
printf "\033Ptmux;\033\033]4;175;rgb:c7/70/89\007\033\\"
printf "\033Ptmux;\033\033]4;108;rgb:7d/b6/69\007\033\\"
printf "\033Ptmux;\033\033]4;208;rgb:fb/6a/16\007\033\\"
printf "\033Ptmux;\033\033]4;88;rgb:89/00/09\007\033\\"
printf "\033Ptmux;\033\033]4;100;rgb:66/62/0d\007\033\\"
printf "\033Ptmux;\033\033]4;136;rgb:a5/63/11\007\033\\"
printf "\033Ptmux;\033\033]4;24;rgb:0e/53/65\007\033\\"
printf "\033Ptmux;\033\033]4;96;rgb:7b/2b/5e\007\033\\"
printf "\033Ptmux;\033\033]4;66;rgb:35/6a/46\007\033\\"
printf "\033Ptmux;\033\033]4;130;rgb:9d/28/07\007\033\\"
else
printf "\033P\033]4;236;rgb:26/24/23\007\033\\"
printf "\033P\033]4;234;rgb:16/18/19\007\033\\"
printf "\033P\033]4;235;rgb:1e/1e/1e\007\033\\"
printf "\033P\033]4;237;rgb:2e/2a/29\007\033\\"
printf "\033P\033]4;239;rgb:3f/39/35\007\033\\"
printf "\033P\033]4;241;rgb:53/4a/42\007\033\\"
printf "\033P\033]4;243;rgb:68/5c/51\007\033\\"
printf "\033P\033]4;244;rgb:7f/70/61\007\033\\"
printf "\033P\033]4;245;rgb:7f/70/61\007\033\\"
printf "\033P\033]4;228;rgb:ef/df/ae\007\033\\"
printf "\033P\033]4;230;rgb:f8/f4/cd\007\033\\"
printf "\033P\033]4;229;rgb:fa/ee/bb\007\033\\"
printf "\033P\033]4;223;rgb:e6/d4/a3\007\033\\"
printf "\033P\033]4;250;rgb:cb/b8/90\007\033\\"
printf "\033P\033]4;248;rgb:af/9f/81\007\033\\"
printf "\033P\033]4;246;rgb:97/87/71\007\033\\"
printf "\033P\033]4;167;rgb:f7/30/28\007\033\\"
printf "\033P\033]4;142;rgb:aa/b0/1e\007\033\\"
printf "\033P\033]4;214;rgb:f7/b1/25\007\033\\"
printf "\033P\033]4;109;rgb:71/95/86\007\033\\"
printf "\033P\033]4;175;rgb:c7/70/89\007\033\\"
printf "\033P\033]4;108;rgb:7d/b6/69\007\033\\"
printf "\033P\033]4;208;rgb:fb/6a/16\007\033\\"
printf "\033P\033]4;88;rgb:89/00/09\007\033\\"
printf "\033P\033]4;100;rgb:66/62/0d\007\033\\"
printf "\033P\033]4;136;rgb:a5/63/11\007\033\\"
printf "\033P\033]4;24;rgb:0e/53/65\007\033\\"
printf "\033P\033]4;96;rgb:7b/2b/5e\007\033\\"
printf "\033P\033]4;66;rgb:35/6a/46\007\033\\"
printf "\033P\033]4;130;rgb:9d/28/07\007\033\\"
fi
else
printf "\033]4;236;rgb:26/24/23\033\\"
printf "\033]4;234;rgb:16/18/19\033\\"
printf "\033]4;235;rgb:1e/1e/1e\033\\"
printf "\033]4;237;rgb:2e/2a/29\033\\"
printf "\033]4;239;rgb:3f/39/35\033\\"
printf "\033]4;241;rgb:53/4a/42\033\\"
printf "\033]4;243;rgb:68/5c/51\033\\"
printf "\033]4;244;rgb:7f/70/61\033\\"
printf "\033]4;245;rgb:7f/70/61\033\\"
printf "\033]4;228;rgb:ef/df/ae\033\\"
printf "\033]4;230;rgb:f8/f4/cd\033\\"
printf "\033]4;229;rgb:fa/ee/bb\033\\"
printf "\033]4;223;rgb:e6/d4/a3\033\\"
printf "\033]4;250;rgb:cb/b8/90\033\\"
printf "\033]4;248;rgb:af/9f/81\033\\"
printf "\033]4;246;rgb:97/87/71\033\\"
printf "\033]4;167;rgb:f7/30/28\033\\"
printf "\033]4;142;rgb:aa/b0/1e\033\\"
printf "\033]4;214;rgb:f7/b1/25\033\\"
printf "\033]4;109;rgb:71/95/86\033\\"
printf "\033]4;175;rgb:c7/70/89\033\\"
printf "\033]4;108;rgb:7d/b6/69\033\\"
printf "\033]4;208;rgb:fb/6a/16\033\\"
printf "\033]4;88;rgb:89/00/09\033\\"
printf "\033]4;100;rgb:66/62/0d\033\\"
printf "\033]4;136;rgb:a5/63/11\033\\"
printf "\033]4;24;rgb:0e/53/65\033\\"
printf "\033]4;96;rgb:7b/2b/5e\033\\"
printf "\033]4;66;rgb:35/6a/46\033\\"
printf "\033]4;130;rgb:9d/28/07\033\\"
fi

View File

@@ -0,0 +1,120 @@
" Vim Code Dark (airline theme)
" https://github.com/tomasiser/vim-code-dark
scriptencoding utf-8
let g:airline#themes#codedark#palette = {}
" Terminal colors (base16):
let s:cterm00 = "00"
let s:cterm03 = "08"
let s:cterm05 = "07"
let s:cterm07 = "15"
let s:cterm08 = "01"
let s:cterm0A = "03"
let s:cterm0B = "02"
let s:cterm0C = "06"
let s:cterm0D = "04"
let s:cterm0E = "05"
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = "18"
let s:cterm02 = "19"
let s:cterm04 = "20"
let s:cterm06 = "21"
let s:cterm09 = "16"
let s:cterm0F = "17"
else
let s:cterm01 = "00"
let s:cterm02 = "08"
let s:cterm04 = "07"
let s:cterm06 = "07"
let s:cterm09 = "06"
let s:cterm0F = "03"
endif
if &t_Co >= 256
let g:codedark_term256=1
elseif !exists("g:codedark_term256")
let g:codedark_term256=0
endif
let s:cdFront = {'gui': '#FFFFFF', 'cterm': (g:codedark_term256 ? '231' : s:cterm07)}
let s:cdFrontGray = {'gui': '#D4D4D4', 'cterm': (g:codedark_term256 ? '188' : s:cterm05)}
let s:cdBack = {'gui': '#1E1E1E', 'cterm': (g:codedark_term256 ? '234' : s:cterm00)}
let s:cdSelection = {'gui': '#264F78', 'cterm': (g:codedark_term256 ? '24' : s:cterm01)}
let s:cdBlue = {'gui': '#0A7ACA', 'cterm': (g:codedark_term256 ? '32' : s:cterm0D)}
let s:cdLightBlue = {'gui': '#5CB6F8', 'cterm': (g:codedark_term256 ? '75' : s:cterm0C)}
let s:cdYellow = {'gui': '#FFAF00', 'cterm': (g:codedark_term256 ? '214' : s:cterm0A)}
let s:cdRed = {'gui': '#F44747', 'cterm': (g:codedark_term256 ? '203' : s:cterm08)}
let s:cdDarkDarkDark = {'gui': '#262626', 'cterm': (g:codedark_term256 ? '235' : s:cterm01)}
let s:cdDarkDark = {'gui': '#303030', 'cterm': (g:codedark_term256 ? '236' : s:cterm02)}
let s:cdDark = {'gui': '#3C3C3C', 'cterm': (g:codedark_term256 ? '237' : s:cterm03)}
let s:Warning = [ s:cdRed.gui, s:cdDarkDark.gui, s:cdRed.cterm, s:cdDarkDark.cterm, 'none']
" Normal:
let s:N1 = [ s:cdFront.gui, s:cdBlue.gui, s:cdFront.cterm, s:cdBlue.cterm, 'none' ]
let s:N2 = [ s:cdFront.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDark.cterm, 'none' ]
let s:N3 = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none' ]
let s:NM = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none']
let g:airline#themes#codedark#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3)
let g:airline#themes#codedark#palette.normal_modified = { 'airline_c': s:NM }
let g:airline#themes#codedark#palette.normal.airline_warning = s:Warning
let g:airline#themes#codedark#palette.normal_modified.airline_warning = s:Warning
" Insert:
let s:I1 = [ s:cdBack.gui, s:cdYellow.gui, s:cdBack.cterm, s:cdYellow.cterm, 'none' ]
let s:I2 = [ s:cdFront.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDark.cterm, 'none' ]
let s:I3 = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none' ]
let s:IM = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none']
let g:airline#themes#codedark#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3)
let g:airline#themes#codedark#palette.insert_modified = { 'airline_c': s:IM }
let g:airline#themes#codedark#palette.insert.airline_warning = s:Warning
let g:airline#themes#codedark#palette.insert_modified.airline_warning = s:Warning
" Replace:
let s:R1 = [ s:cdBack.gui, s:cdYellow.gui, s:cdBack.cterm, s:cdYellow.cterm, 'none' ]
let s:R2 = [ s:cdFront.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDark.cterm, 'none' ]
let s:R3 = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none' ]
let s:RM = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none']
let g:airline#themes#codedark#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3)
let g:airline#themes#codedark#palette.replace_modified = { 'airline_c': s:RM }
let g:airline#themes#codedark#palette.replace.airline_warning = s:Warning
let g:airline#themes#codedark#palette.replace_modified.airline_warning = s:Warning
" Visual:
let s:V1 = [ s:cdLightBlue.gui, s:cdDark.gui, s:cdLightBlue.cterm, s:cdDark.cterm, 'none' ]
let s:V2 = [ s:cdFront.gui, s:cdDarkDark.gui, s:cdFront.cterm, s:cdDarkDark.cterm, 'none' ]
let s:V3 = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none' ]
let s:VM = [ s:cdFront.gui, s:cdDarkDarkDark.gui, s:cdFront.cterm, s:cdDarkDarkDark.cterm, 'none']
let g:airline#themes#codedark#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3)
let g:airline#themes#codedark#palette.visual_modified = { 'airline_c': s:VM }
let g:airline#themes#codedark#palette.visual.airline_warning = s:Warning
let g:airline#themes#codedark#palette.visual_modified.airline_warning = s:Warning
" Inactive:
let s:IA1 = [ s:cdFrontGray.gui, s:cdDark.gui, s:cdFrontGray.cterm, s:cdDark.cterm, 'none' ]
let s:IA2 = [ s:cdFrontGray.gui, s:cdDarkDark.gui, s:cdFrontGray.cterm, s:cdDarkDark.cterm, 'none' ]
let s:IA3 = [ s:cdFrontGray.gui, s:cdDarkDarkDark.gui, s:cdFrontGray.cterm, s:cdDarkDarkDark.cterm, 'none' ]
let s:IAM = [ s:cdFrontGray.gui, s:cdDarkDarkDark.gui, s:cdFrontGray.cterm, s:cdDarkDarkDark.cterm, 'none' ]
let g:airline#themes#codedark#palette.inactive = airline#themes#generate_color_map(s:IA1, s:IA2, s:IA3)
let g:airline#themes#codedark#palette.inactive_modified = { 'airline_c': s:IAM }
" Red accent for readonly:
let g:airline#themes#codedark#palette.accents = {
\ 'red': [ s:cdRed.gui, '', s:cdRed.cterm, '' ]
\ }

View File

@@ -0,0 +1,40 @@
" =============================================================================
" Filename: autoload/lightline/colorscheme/codedark.vim
" Author: artanikin
" License: MIT License
" Last Change: 2019/12/05 12:26:00
" =============================================================================
let s:term_red = 204
let s:term_green = 114
let s:term_yellow = 180
let s:term_blue = 39
let s:term_purple = 170
let s:term_white = 145
let s:term_black = 235
let s:term_grey = 236
let s:p = {'normal': {}, 'inactive': {}, 'insert': {}, 'replace': {}, 'visual': {}, 'tabline': {}}
let s:p.normal.left = [ [ '#262626', '#608B4E', s:term_black, s:term_green, 'bold' ], [ '#608B4E', '#262626', s:term_green, s:term_black ] ]
let s:p.normal.right = [ [ '#262626', '#608B4E', s:term_black, s:term_green ], [ '#D4D4D4', '#3C3C3C', s:term_white, s:term_grey ], [ '#608B4E', '#262626', s:term_green, s:term_black ] ]
let s:p.inactive.right = [ [ '#262626', '#569CD6', s:term_black, s:term_blue], [ '#D4D4D4', '#3C3C3C', s:term_white, s:term_grey ] ]
let s:p.inactive.left = s:p.inactive.right[1:]
" her
let s:p.insert.left = [ [ '#262626', '#569CD6', s:term_black, s:term_blue, 'bold' ], [ '#569CD6', '#262626', s:term_blue, s:term_black ] ]
let s:p.insert.right = [ [ '#262626', '#569CD6', s:term_black, s:term_blue ], [ '#D4D4D4', '#3C3C3C', s:term_white, s:term_grey ], [ '#569CD6', '#262626', s:term_blue, s:term_black ] ]
let s:p.replace.left = [ [ '#262626', '#D16969', s:term_black, s:term_red, 'bold' ], [ '#D16969', '#262626', s:term_red, s:term_black ] ]
let s:p.replace.right = [ [ '#262626', '#D16969', s:term_black, s:term_red, 'bold' ], s:p.normal.right[1], [ '#D16969', '#262626', s:term_red, s:term_black ] ]
let s:p.visual.left = [ [ '#262626', '#C586C0', s:term_black, s:term_purple, 'bold' ], [ '#C586C0', '#262626', s:term_purple, s:term_black ] ]
let s:p.visual.right = [ [ '#262626', '#C586C0', s:term_black, s:term_purple, 'bold' ], s:p.normal.right[1], [ '#C586C0', '#262626', s:term_purple, s:term_black ] ]
let s:p.normal.middle = [ [ '#D4D4D4', '#262626', s:term_white, s:term_black ] ]
let s:p.insert.middle = s:p.normal.middle
let s:p.replace.middle = s:p.normal.middle
let s:p.tabline.left = [ s:p.normal.left[1] ]
let s:p.tabline.tabsel = [ s:p.normal.left[0] ]
let s:p.tabline.middle = s:p.normal.middle
let s:p.tabline.right = [ s:p.normal.left[1] ]
let s:p.normal.error = [ [ '#262626', '#D16969', s:term_black, s:term_red ] ]
let s:p.normal.warning = [ [ '#262626', '#D7BA7D', s:term_black, s:term_yellow ] ]
let g:lightline#colorscheme#codedark#palette = lightline#colorscheme#fill(s:p)

View File

@@ -0,0 +1,18 @@
scheme: "codedark"
author: "Tomas Iser (https://github.com/tomasiser)"
base00: "1E1E1E"
base01: "262626"
base02: "303030"
base03: "3C3C3C"
base04: "808080"
base05: "D4D4D4"
base06: "E9E9E9"
base07: "FFFFFF"
base08: "D16969"
base09: "B5CEA8"
base0A: "D7BA7D"
base0B: "608B4E"
base0C: "9CDCFE"
base0D: "569CD6"
base0E: "C586C0"
base0F: "CE9178"

View File

@@ -0,0 +1,72 @@
Windows Registry Editor Version 5.00
; Base16 codedark
; schema by Tomas Iser (https://github.com/tomasiser)
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\codedark]
; Default Foreground
"Colour0"="212,212,212"
; Default Bold Foreground -- equals to non-bold
"Colour1"="212,212,212"
; Default Background
"Colour2"="30,30,30"
; Default Bold Background -- equals to non-bold
"Colour3"="30,30,30"
; Cursor Text -- equals to default background
"Colour4"="30,30,30"
; Cursor Colour -- equals to default foreground
"Colour5"="212,212,212"
; ANSI Black
"Colour6"="30,30,30"
; ANSI Black Bold
"Colour7"="60,60,60"
; ANSI Red
"Colour8"="209,105,105"
; ANSI Red Bold
"Colour9"="181,206,168"
; ANSI Green
"Colour10"="96,139,78"
; ANSI Green Bold
"Colour11"="38,38,38"
; ANSI Yellow
"Colour12"="215,186,125"
; ANSI Yellow Bold
"Colour13"="48,48,48"
; ANSI Blue
"Colour14"="86,156,214"
; ANSI Blue Bold
"Colour15"="128,128,128"
; ANSI Magenta
"Colour16"="197,134,192"
; ANSI Magenta Bold
"Colour17"="233,233,233"
; ANSI Cyan
"Colour18"="156,220,254"
; ANSI Cyan Bold
"Colour19"="206,145,120"
; ANSI White
"Colour20"="212,212,212"
; ANSI White Bold
"Colour21"="255,255,255"

View File

@@ -0,0 +1,123 @@
#!/bin/sh
# base16-shell (https://github.com/chriskempson/base16-shell)
# Base16 Shell template by Chris Kempson (http://chriskempson.com)
# codedark scheme by Tomas Iser (https://github.com/tomasiser)
# This script doesn't support linux console (use 'vconsole' template instead)
if [ "${TERM%%-*}" = 'linux' ]; then
return 2>/dev/null || exit 0
fi
color00="1E/1E/1E" # Base 00 - Black
color01="D1/69/69" # Base 08 - Red
color02="60/8B/4E" # Base 0B - Green
color03="D7/BA/7D" # Base 0A - Yellow
color04="56/9C/D6" # Base 0D - Blue
color05="C5/86/C0" # Base 0E - Magenta
color06="9C/DC/FE" # Base 0C - Cyan
color07="D4/D4/D4" # Base 05 - White
color08="3C/3C/3C" # Base 03 - Bright Black
color09=$color01 # Base 08 - Bright Red
color10=$color02 # Base 0B - Bright Green
color11=$color03 # Base 0A - Bright Yellow
color12=$color04 # Base 0D - Bright Blue
color13=$color05 # Base 0E - Bright Magenta
color14=$color06 # Base 0C - Bright Cyan
color15="FF/FF/FF" # Base 07 - Bright White
color16="B5/CE/A8" # Base 09
color17="CE/91/78" # Base 0F
color18="26/26/26" # Base 01
color19="30/30/30" # Base 02
color20="80/80/80" # Base 04
color21="E9/E9/E9" # Base 06
color_foreground="D4/D4/D4" # Base 05
color_background="1E/1E/1E" # Base 00
color_cursor="D4/D4/D4" # Base 05
if [ -n "$TMUX" ]; then
# Tell tmux to pass the escape sequences through
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
printf_template='\033Ptmux;\033\033]4;%d;rgb:%s\033\033\\\033\\'
printf_template_var='\033Ptmux;\033\033]%d;rgb:%s\033\033\\\033\\'
printf_template_custom='\033Ptmux;\033\033]%s%s\033\033\\\033\\'
elif [ "${TERM%%-*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
printf_template='\033P\033]4;%d;rgb:%s\033\\'
printf_template_var='\033P\033]%d;rgb:%s\033\\'
printf_template_custom='\033P\033]%s%s\033\\'
else
printf_template='\033]4;%d;rgb:%s\033\\'
printf_template_var='\033]%d;rgb:%s\033\\'
printf_template_custom='\033]%s%s\033\\'
fi
# 16 color space
printf $printf_template 0 $color00
printf $printf_template 1 $color01
printf $printf_template 2 $color02
printf $printf_template 3 $color03
printf $printf_template 4 $color04
printf $printf_template 5 $color05
printf $printf_template 6 $color06
printf $printf_template 7 $color07
printf $printf_template 8 $color08
printf $printf_template 9 $color09
printf $printf_template 10 $color10
printf $printf_template 11 $color11
printf $printf_template 12 $color12
printf $printf_template 13 $color13
printf $printf_template 14 $color14
printf $printf_template 15 $color15
# 256 color space
printf $printf_template 16 $color16
printf $printf_template 17 $color17
printf $printf_template 18 $color18
printf $printf_template 19 $color19
printf $printf_template 20 $color20
printf $printf_template 21 $color21
# foreground / background / cursor color
if [ -n "$ITERM_SESSION_ID" ]; then
# iTerm2 proprietary escape codes
printf $printf_template_custom Pg D4D4D4 # forground
printf $printf_template_custom Ph 1E1E1E # background
printf $printf_template_custom Pi D4D4D4 # bold color
printf $printf_template_custom Pj 303030 # selection color
printf $printf_template_custom Pk D4D4D4 # selected text color
printf $printf_template_custom Pl D4D4D4 # cursor
printf $printf_template_custom Pm 1E1E1E # cursor text
else
printf $printf_template_var 10 $color_foreground
printf $printf_template_var 11 $color_background
printf $printf_template_custom 12 ";7" # cursor (reverse video)
fi
# clean up
unset printf_template
unset printf_template_var
unset color00
unset color01
unset color02
unset color03
unset color04
unset color05
unset color06
unset color07
unset color08
unset color09
unset color10
unset color11
unset color12
unset color13
unset color14
unset color15
unset color16
unset color17
unset color18
unset color19
unset color20
unset color21
unset color_foreground
unset color_background
unset color_cursor

View File

@@ -0,0 +1,656 @@
" Vim Code Dark (color scheme)
" https://github.com/tomasiser/vim-code-dark
scriptencoding utf-8
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name="codedark"
" Highlighting function (inspiration from https://github.com/chriskempson/base16-vim)
if &t_Co >= 256
let g:codedark_term256=1
elseif !exists("g:codedark_term256")
let g:codedark_term256=0
endif
fun! <sid>hi(group, fg, bg, attr, sp)
if !empty(a:fg)
exec "hi " . a:group . " guifg=" . a:fg.gui . " ctermfg=" . (g:codedark_term256 ? a:fg.cterm256 : a:fg.cterm)
endif
if !empty(a:bg)
exec "hi " . a:group . " guibg=" . a:bg.gui . " ctermbg=" . (g:codedark_term256 ? a:bg.cterm256 : a:bg.cterm)
endif
if a:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr
endif
if !empty(a:sp)
exec "hi " . a:group . " guisp=" . a:sp.gui
endif
endfun
" Choose old or new name for Treesitter groups depending on Neovim version
fun! <sid>hiTS(g_new, g_old, fg, bg, attr, sp)
call <sid>hi(has("nvim-0.8.0") ? a:g_new : a:g_old, a:fg, a:bg, a:attr, a:sp)
endfun
fun! <sid>hiTSlink(g_new, g_old, link)
exec "hi! link " . (has("nvim-0.8.0") ? a:g_new : a:g_old) . " " . a:link
endfun
" ------------------
" Color definitions:
" ------------------
" Terminal colors (base16):
let s:cterm00 = "00"
let s:cterm03 = "08"
let s:cterm05 = "07"
let s:cterm07 = "15"
let s:cterm08 = "01"
let s:cterm0A = "03"
let s:cterm0B = "02"
let s:cterm0C = "06"
let s:cterm0D = "04"
let s:cterm0E = "05"
if exists('base16colorspace') && base16colorspace == "256"
let s:cterm01 = "18"
let s:cterm02 = "19"
let s:cterm04 = "20"
let s:cterm06 = "21"
let s:cterm09 = "16"
let s:cterm0F = "17"
else
let s:cterm01 = "00"
let s:cterm02 = "08"
let s:cterm04 = "07"
let s:cterm06 = "07"
let s:cterm09 = "06"
let s:cterm0F = "03"
endif
" General appearance colors:
" (some of them may be unused)
" Transparent background
if !exists("g:codedark_transparent")
let g:codedark_transparent=0
endif
if !exists("g:codedark_modern")
let g:codedark_modern=0
endif
let s:cdNone = {'gui': 'NONE', 'cterm': 'NONE', 'cterm256': 'NONE'}
let s:cdFront = {'gui': '#D4D4D4', 'cterm': s:cterm05, 'cterm256': '188'}
let s:cdBack = {'gui': '#1E1E1E', 'cterm': s:cterm00, 'cterm256': '234'}
if g:codedark_modern | let s:cdBack = {'gui': '#1f1f1f', 'cterm': 'NONE', 'cterm256': '234'} | endif
if g:codedark_transparent | let s:cdBack = {'gui': 'NONE', 'cterm': 'NONE', 'cterm256': 'NONE'} | endif
let s:cdTabCurrent = {'gui': '#1E1E1E', 'cterm': s:cterm00, 'cterm256': '234'}
if g:codedark_modern | let s:cdTabCurrent = {'gui': '#1f1f1f', 'cterm': s:cterm00, 'cterm256': '234'} | endif
let s:cdTabOther = {'gui': '#2D2D2D', 'cterm': s:cterm01, 'cterm256': '236'}
if g:codedark_modern | let s:cdTabOther = {'gui': '#181818', 'cterm': s:cterm01, 'cterm256': '236'} | endif
let s:cdTabOutside = {'gui': '#252526', 'cterm': s:cterm01, 'cterm256': '235'}
if g:codedark_modern | let s:cdTabOutside = {'gui': '#181818', 'cterm': s:cterm01, 'cterm256': '236'} | endif
let s:cdLeftDark = {'gui': '#252526', 'cterm': s:cterm01, 'cterm256': '235'}
let s:cdLeftMid = {'gui': '#373737', 'cterm': s:cterm03, 'cterm256': '237'}
if g:codedark_modern | let s:cdLeftMid = {'gui': '#181818', 'cterm': 'NONE', 'cterm256': '237'} | endif
let s:cdLeftLight = {'gui': '#3F3F46', 'cterm': s:cterm03, 'cterm256': '238'}
let s:cdPopupFront = {'gui': '#BBBBBB', 'cterm': s:cterm06, 'cterm256': '250'}
let s:cdPopupBack = {'gui': '#2D2D30', 'cterm': s:cterm01, 'cterm256': '236'}
let s:cdPopupHighlightBlue = {'gui': '#073655', 'cterm': s:cterm0D, 'cterm256': '24'}
let s:cdPopupHighlightGray = {'gui': '#3D3D40', 'cterm': s:cterm03, 'cterm256': '237'}
let s:cdSplitLight = {'gui': '#898989', 'cterm': s:cterm04, 'cterm256': '245'}
let s:cdSplitDark = {'gui': '#444444', 'cterm': s:cterm03, 'cterm256': '238'}
let s:cdSplitThumb = {'gui': '#424242', 'cterm': s:cterm04, 'cterm256': '238'}
let s:cdCursorDarkDark = {'gui': '#222222', 'cterm': s:cterm01, 'cterm256': '235'}
let s:cdCursorDark = {'gui': '#51504F', 'cterm': s:cterm03, 'cterm256': '239'}
let s:cdCursorLight = {'gui': '#AEAFAD', 'cterm': s:cterm04, 'cterm256': '145'}
let s:cdSelection = {'gui': '#264F78', 'cterm': s:cterm03, 'cterm256': '24'}
let s:cdLineNumber = {'gui': '#5A5A5A', 'cterm': s:cterm04, 'cterm256': '240'}
let s:cdDiffRedDark = {'gui': '#4B1818', 'cterm': s:cterm08, 'cterm256': '52'}
if g:codedark_modern | let s:cdDiffRedDark = {'gui': '#da3633', 'cterm': 'NONE', 'cterm256': '52'} | endif
let s:cdDiffRedLight = {'gui': '#6F1313', 'cterm': s:cterm08, 'cterm256': '52'}
let s:cdDiffRedLightLight = {'gui': '#FB0101', 'cterm': s:cterm08, 'cterm256': '09'}
let s:cdDiffGreenDark = {'gui': '#373D29', 'cterm': s:cterm0B, 'cterm256': '237'}
if g:codedark_modern | let s:cdDiffGreenDark = {'gui': '#238636', 'cterm': 'NONE', 'cterm256': '237'} | endif
let s:cdDiffGreenLight = {'gui': '#4B5632', 'cterm': s:cterm09, 'cterm256': '58'}
let s:cdDiffBlueLight = {'gui': '#87d7ff', 'cterm': s:cterm0C, 'cterm256': '117'}
let s:cdDiffBlue = {'gui': '#005f87', 'cterm': s:cterm0D, 'cterm256': '24'}
let s:cdSearchCurrent = {'gui': '#4B5632', 'cterm': s:cterm09, 'cterm256': '58'}
if g:codedark_modern | let s:cdSearchCurrent = {'gui': '#9e6a03', 'cterm': s:cterm09, 'cterm256': '58'} | endif
let s:cdSearch = {'gui': '#773800', 'cterm': s:cterm03, 'cterm256': '94'}
" Syntax colors:
if !exists("g:codedark_conservative")
let g:codedark_conservative=0
endif
" Italicized comments
if !exists("g:codedark_italics")
let g:codedark_italics=0
endif
let s:cdGray = {'gui': '#808080', 'cterm': s:cterm04, 'cterm256': '08'}
let s:cdViolet = {'gui': '#646695', 'cterm': s:cterm04, 'cterm256': '60'}
let s:cdBlue = {'gui': '#569CD6', 'cterm': s:cterm0D, 'cterm256': '75'}
let s:cdDarkBlue = {'gui': '#223E55', 'cterm': s:cterm0D, 'cterm256': '73'}
let s:cdLightBlue = {'gui': '#9CDCFE', 'cterm': s:cterm0C, 'cterm256': '117'}
if g:codedark_conservative | let s:cdLightBlue = s:cdFront | endif
let s:cdGreen = {'gui': '#6A9955', 'cterm': s:cterm0B, 'cterm256': '65'}
let s:cdBlueGreen = {'gui': '#4EC9B0', 'cterm': s:cterm0F, 'cterm256': '43'}
let s:cdLightGreen = {'gui': '#B5CEA8', 'cterm': s:cterm09, 'cterm256': '151'}
let s:cdRed = {'gui': '#F44747', 'cterm': s:cterm08, 'cterm256': '203'}
if g:codedark_modern | let s:cdRed = {'gui': '#f85149', 'cterm': s:cterm08, 'cterm256': '203'} | endif
let s:cdOrange = {'gui': '#CE9178', 'cterm': s:cterm0F, 'cterm256': '173'}
let s:cdLightRed = {'gui': '#D16969', 'cterm': s:cterm08, 'cterm256': '167'}
if g:codedark_conservative | let s:cdLightRed = s:cdOrange | endif
let s:cdYellowOrange = {'gui': '#D7BA7D', 'cterm': s:cterm0A, 'cterm256': '179'}
let s:cdYellow = {'gui': '#DCDCAA', 'cterm': s:cterm0A, 'cterm256': '187'}
if g:codedark_conservative | let s:cdYellow = s:cdFront | endif
let s:cdPink = {'gui': '#C586C0', 'cterm': s:cterm0E, 'cterm256': '176'}
if g:codedark_conservative | let s:cdPink = s:cdBlue | endif
let s:cdSilver = {'gui': '#C0C0C0', 'cterm': s:cterm05, 'cterm256': '7'}
" UI (built-in)
" <sid>hi(GROUP, FOREGROUND, BACKGROUND, ATTRIBUTE, SPECIAL)
call <sid>hi('Normal', s:cdFront, s:cdBack, 'none', {})
call <sid>hi('ColorColumn', {}, s:cdCursorDarkDark, 'none', {})
call <sid>hi('Cursor', s:cdCursorDark, s:cdCursorLight, 'none', {})
call <sid>hi('CursorLine', {}, s:cdCursorDarkDark, 'none', {})
hi! link CursorColumn CursorLine
call <sid>hi('Directory', s:cdBlue, s:cdNone, 'none', {})
call <sid>hi('DiffAdd', s:cdFront, s:cdDiffGreenLight, 'none', {})
call <sid>hi('DiffChange', s:cdFront, s:cdDiffBlue, 'none', {})
call <sid>hi('DiffDelete', s:cdFront, s:cdDiffRedLight, 'none', {})
call <sid>hi('DiffText', s:cdBack, s:cdDiffBlueLight, 'none', {})
call <sid>hi('EndOfBuffer', s:cdLineNumber, s:cdBack, 'none', {})
call <sid>hi('ErrorMsg', s:cdRed, s:cdBack, 'none', {})
call <sid>hi('VertSplit', s:cdSplitDark, s:cdBack, 'none', {})
call <sid>hi('Folded', s:cdLeftLight, s:cdLeftDark, 'underline', {})
call <sid>hi('FoldColumn', s:cdLineNumber, s:cdBack, 'none', {})
call <sid>hi('SignColumn', {}, s:cdBack, 'none', {})
call <sid>hi('IncSearch', s:cdNone, s:cdSearchCurrent, 'none', {})
call <sid>hi('LineNr', s:cdLineNumber, s:cdBack, 'none', {})
call <sid>hi('CursorLineNr', s:cdPopupFront, s:cdBack, 'none', {})
call <sid>hi('MatchParen', s:cdNone, s:cdCursorDark, 'none', {})
call <sid>hi('ModeMsg', s:cdFront, s:cdLeftDark, 'none', {})
hi! link MoreMsg ModeMsg
call <sid>hi('NonText', s:cdLineNumber, s:cdNone, 'none', {})
call <sid>hi('Pmenu', s:cdPopupFront, s:cdPopupBack, 'none', {})
call <sid>hi('PmenuSel', s:cdPopupFront, s:cdPopupHighlightBlue, 'none', {})
call <sid>hi('PmenuSbar', {}, s:cdPopupHighlightGray, 'none', {})
call <sid>hi('PmenuThumb', {}, s:cdPopupFront, 'none', {})
call <sid>hi('Question', s:cdBlue, s:cdBack, 'none', {})
call <sid>hi('Search', s:cdNone, s:cdSearch, 'none', {})
call <sid>hi('SpecialKey', s:cdLineNumber, s:cdNone, 'none', {})
call <sid>hi('StatusLine', s:cdFront, s:cdLeftMid, 'none', {})
call <sid>hi('StatusLineNC', s:cdFront, s:cdLeftDark, 'none', {})
call <sid>hi('TabLine', s:cdFront, s:cdTabOther, 'none', {})
call <sid>hi('TabLineFill', s:cdFront, s:cdTabOutside, 'none', {})
call <sid>hi('TabLineSel', s:cdFront, s:cdTabCurrent, 'none', {})
call <sid>hi('Title', s:cdNone, s:cdNone, 'bold', {})
call <sid>hi('Visual', s:cdNone, s:cdSelection, 'none', {})
hi! link VisualNOS Visual
call <sid>hi('WarningMsg', s:cdOrange, s:cdBack, 'none', {})
call <sid>hi('WildMenu', s:cdNone, s:cdSelection, 'none', {})
call <sid>hi('netrwMarkFile', s:cdFront, s:cdSelection, 'none', {})
" Legacy groups for official git.vim and diff.vim syntax
hi! link diffAdded DiffAdd
hi! link diffChanged DiffChange
hi! link diffRemoved DiffDelete
if g:codedark_italics | call <sid>hi('Comment', s:cdGreen, {}, 'italic', {}) | else | call <sid>hi('Comment', s:cdGreen, {}, 'none', {}) | endif
" SYNTAX HIGHLIGHT (built-in)
call <sid>hi('Constant', s:cdBlue, {}, 'none', {})
call <sid>hi('String', s:cdOrange, {}, 'none', {})
call <sid>hi('Character', s:cdOrange, {}, 'none', {})
call <sid>hi('Number', s:cdLightGreen, {}, 'none', {})
call <sid>hi('Boolean', s:cdBlue, {}, 'none', {})
hi! link Float Number
call <sid>hi('Identifier', s:cdLightBlue, {}, 'none', {})
call <sid>hi('Function', s:cdYellow, {}, 'none', {})
call <sid>hi('Statement', s:cdPink, {}, 'none', {})
call <sid>hi('Conditional', s:cdPink, {}, 'none', {})
call <sid>hi('Repeat', s:cdPink, {}, 'none', {})
call <sid>hi('Label', s:cdPink, {}, 'none', {})
call <sid>hi('Operator', s:cdFront, {}, 'none', {})
call <sid>hi('Keyword', s:cdPink, {}, 'none', {})
call <sid>hi('Exception', s:cdPink, {}, 'none', {})
call <sid>hi('PreProc', s:cdPink, {}, 'none', {})
call <sid>hi('Include', s:cdPink, {}, 'none', {})
call <sid>hi('Define', s:cdPink, {}, 'none', {})
call <sid>hi('Macro', s:cdPink, {}, 'none', {})
call <sid>hi('PreCondit', s:cdPink, {}, 'none', {})
call <sid>hi('Type', s:cdBlue, {}, 'none', {})
call <sid>hi('StorageClass', s:cdBlue, {}, 'none', {})
call <sid>hi('Structure', s:cdBlue, {}, 'none', {})
call <sid>hi('Typedef', s:cdBlue, {}, 'none', {})
call <sid>hi('Special', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('SpecialChar', s:cdFront, {}, 'none', {})
call <sid>hi('Tag', s:cdFront, {}, 'none', {})
call <sid>hi('Delimiter', s:cdFront, {}, 'none', {})
if g:codedark_italics | call <sid>hi('SpecialComment', s:cdGreen, {}, 'italic', {}) | else | call <sid>hi('SpecialComment', s:cdGreen, {}, 'none', {}) | endif
call <sid>hi('Debug', s:cdFront, {}, 'none', {})
call <sid>hi('Underlined', s:cdNone, {}, 'underline', {})
call <sid>hi("Conceal", s:cdFront, s:cdBack, 'none', {})
call <sid>hi('Ignore', s:cdBack, {}, 'none', {})
call <sid>hi('Error', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
call <sid>hi('Todo', s:cdNone, s:cdLeftMid, 'none', {})
call <sid>hi('SpellBad', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
call <sid>hi('SpellCap', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
call <sid>hi('SpellRare', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
call <sid>hi('SpellLocal', s:cdRed, s:cdBack, 'undercurl', s:cdRed)
" NEOVIM
" Make neovim specific groups load only on Neovim
if has("nvim")
" nvim-treesitter/nvim-treesitter (github)
call <sid>hiTSlink('@error', 'TSError', 'ErrorMsg')
call <sid>hiTSlink('@punctuation.delimiter', 'TSPunctDelimiter', 'Delimiter')
call <sid>hiTSlink('@punctuation.bracket', 'TSPunctBracket', 'Delimiter')
call <sid>hiTSlink('@punctuation.special', 'TSPunctSpecial', 'Delimiter')
" Constant
call <sid>hiTS('@constant', 'TSConstant', s:cdYellow, {}, 'none', {})
call <sid>hiTSlink('@constant.builtin', 'TSConstBuiltin', 'Constant')
call <sid>hiTS('@constant.macro', 'TSConstMacro', s:cdBlueGreen, {}, 'none', {})
call <sid>hiTSlink('@string', 'TSString', 'String')
call <sid>hiTSlink('@string.regex', 'TSStringRegex', 'String')
call <sid>hiTS('@string.escape', 'TSStringEscape', s:cdYellowOrange, {}, 'none', {})
call <sid>hiTSlink('@character', 'TSCharacter', 'Character')
call <sid>hiTSlink('@number', 'TSNumber', 'Number')
call <sid>hiTS('@boolean', 'TSBoolean', s:cdBlue, {}, 'none', {})
call <sid>hiTSlink('@float', 'TSFloat', 'Float')
call <sid>hiTS('@annotation', 'TSAnnotation', s:cdYellow, {}, 'none', {})
call <sid>hiTS('@attribute', 'TSAttribute', s:cdBlueGreen, {}, 'none', {})
call <sid>hiTS('@namespace', 'TSNamespace', s:cdBlueGreen, {}, 'none', {})
" Functions
call <sid>hiTSlink('@function.builtin', 'TSFuncBuiltin', 'Function')
call <sid>hiTSlink('@function', 'TSFunction','Function')
call <sid>hiTSlink('@function.macro', 'TSFuncMacro','Function')
call <sid>hiTS('@parameter', 'TSParameter', s:cdLightBlue, {}, 'none', {})
call <sid>hiTS('@parameter.reference', 'TSParameterReference', s:cdLightBlue, {}, 'none', {})
call <sid>hiTS('@method', 'TSMethod', s:cdYellow, {}, 'none', {})
call <sid>hiTS('@field', 'TSField', s:cdLightBlue, {}, 'none', {})
call <sid>hiTS('@property', 'TSProperty', s:cdLightBlue, {}, 'none', {})
call <sid>hiTS('@constructor', 'TSConstructor', s:cdBlueGreen, {}, 'none', {})
" Keywords
call <sid>hiTSlink('@conditional', 'TSConditional', 'Conditional')
call <sid>hiTSlink('@repeat', 'TSRepeat', 'Repeat')
call <sid>hiTS('@label', 'TSLabel', s:cdLightBlue, {}, 'none', {})
call <sid>hiTS('@keyword', 'TSKeyword', s:cdBlue, {}, 'none', {})
call <sid>hiTS('@keyword.function', 'TSKeywordFunction', s:cdBlue, {}, 'none', {})
call <sid>hiTS('@keyword.operator', 'TSKeywordOperator', s:cdBlue, {}, 'none', {})
call <sid>hiTS('@operator', 'TSOperator', s:cdFront, {}, 'none', {})
call <sid>hiTS('@exception', 'TSException', s:cdPink, {}, 'none', {})
call <sid>hiTS('@type', 'TSType', s:cdBlueGreen, {}, 'none', {})
call <sid>hiTSlink('@type.builtin', 'TSTypeBuiltin', 'Type')
call <sid>hi('TSStructure', s:cdLightBlue, {}, 'none', {})
call <sid>hiTSlink('@include', 'TSInclude', 'Include')
" Variable
call <sid>hiTS('@variable', 'TSVariable', s:cdLightBlue, {}, 'none', {})
call <sid>hiTS('@variable.builtin', 'TSVariableBuiltin', s:cdLightBlue, {}, 'none', {})
" Text
call <sid>hiTS('@text', 'TSText', s:cdFront, s:cdNone, 'bold', {})
call <sid>hiTS('@text.strong', 'TSStrong', s:cdFront, s:cdNone, 'bold', {})
call <sid>hiTS('@text.emphasis', 'TSEmphasis', s:cdYellowOrange, s:cdNone, 'italic', {})
call <sid>hiTSlink('@text.underline', 'TSUnderline', 'Underlined')
call <sid>hiTS('@text.title', 'TSTitle', s:cdBlue, {}, 'bold', {})
call <sid>hiTS('@text.literal', 'TSLiteral', s:cdOrange, {}, 'none', {})
call <sid>hiTS('@text.uri', 'TSURI', s:cdOrange, {}, 'none', {})
" Tags
call <sid>hiTS('@tag', 'TSTag', s:cdBlue, {}, 'none', {})
call <sid>hiTS('@tag.delimiter', 'TSTagDelimiter', s:cdGray, {}, 'none', {})
" hrsh7th/nvim-cmp (github)
call <sid>hi('CmpItemAbbrDeprecated', s:cdGray, {}, 'none', {})
call <sid>hi('CmpItemAbbrMatch', s:cdBlue, {}, 'none', {})
hi! link CmpItemAbbrMatchFuzzy CmpItemAbbrMatch
call <sid>hi('CmpItemKindVariable', s:cdLightBlue, {}, 'none', {})
call <sid>hi('CmpItemKindInterface', s:cdLightBlue, {}, 'none', {})
call <sid>hi('CmpItemKindText', s:cdLightBlue, {}, 'none', {})
call <sid>hi('CmpItemKindFunction', s:cdPink, {}, 'none', {})
call <sid>hi('CmpItemKindMethod ', s:cdPink, {}, 'none', {})
call <sid>hi('CmpItemKindKeyword', s:cdFront, {}, 'none', {})
call <sid>hi('CmpItemKindProperty', s:cdFront, {}, 'none', {})
call <sid>hi('CmpItemKindUnit', s:cdFront, {}, 'none', {})
endif
" MARKDOWN (built-in)
call <sid>hi('markdownH1', s:cdBlue, {}, 'bold', {})
hi! link markdownH2 markdownH1
hi! link markdownH3 markdownH1
hi! link markdownH4 markdownH1
hi! link markdownH5 markdownH1
hi! link markdownH6 markdownH1
call <sid>hi('markdownHeadingDelimiter', s:cdBlue, {}, 'none', {})
call <sid>hi('markdownBold', s:cdBlue, {}, 'bold', {})
call <sid>hi('markdownRule', s:cdBlue, {}, 'bold', {})
call <sid>hi('markdownCode', s:cdOrange, {}, 'none', {})
hi! link markdownCodeDelimiter markdownCode
call <sid>hi('markdownFootnote', s:cdOrange, {}, 'none', {})
hi! link markdownFootnoteDefinition markdownFootnote
call <sid>hi('markdownUrl', s:cdLightBlue, {}, 'underline', {})
call <sid>hi('markdownLinkText', s:cdOrange, {}, 'none', {})
call <sid>hi('markdownEscape', s:cdYellowOrange, {}, 'none', {})
" ASCIIDOC (built-in)
call <sid>hi("asciidocAttributeEntry", s:cdYellowOrange, {}, 'none', {})
call <sid>hi("asciidocAttributeList", s:cdPink, {}, 'none', {})
call <sid>hi("asciidocAttributeRef", s:cdYellowOrange, {}, 'none', {})
call <sid>hi("asciidocHLabel", s:cdBlue, {}, 'bold', {})
call <sid>hi("asciidocListingBlock", s:cdOrange, {}, 'none', {})
call <sid>hi("asciidocMacroAttributes", s:cdYellowOrange, {}, 'none', {})
call <sid>hi("asciidocOneLineTitle", s:cdBlue, {}, 'bold', {})
call <sid>hi("asciidocPassthroughBlock", s:cdBlue, {}, 'none', {})
call <sid>hi("asciidocQuotedMonospaced", s:cdOrange, {}, 'none', {})
call <sid>hi("asciidocTriplePlusPassthrough", s:cdYellow, {}, 'none', {})
call <sid>hi("asciidocMacro", s:cdPink, {}, 'none', {})
call <sid>hi("asciidocAdmonition", s:cdOrange, {}, 'none', {})
call <sid>hi("asciidocQuotedEmphasized", s:cdBlue, {}, 'italic', {})
call <sid>hi("asciidocQuotedEmphasized2", s:cdBlue, {}, 'italic', {})
call <sid>hi("asciidocQuotedEmphasizedItalic", s:cdBlue, {}, 'italic', {})
hi! link asciidocBackslash Keyword
hi! link asciidocQuotedBold markdownBold
hi! link asciidocQuotedMonospaced2 asciidocQuotedMonospaced
hi! link asciidocQuotedUnconstrainedBold asciidocQuotedBold
hi! link asciidocQuotedUnconstrainedEmphasized asciidocQuotedEmphasized
hi! link asciidocURL markdownUrl
" JSON (built-in)
call <sid>hi('jsonKeyword', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsonEscape', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('jsonNull', s:cdBlue, {}, 'none', {})
call <sid>hi('jsonBoolean', s:cdBlue, {}, 'none', {})
" HTML (built-in)
call <sid>hi('htmlTag', s:cdGray, {}, 'none', {})
call <sid>hi('htmlEndTag', s:cdGray, {}, 'none', {})
call <sid>hi('htmlTagName', s:cdBlue, {}, 'none', {})
hi! link htmlSpecialTagName htmlTagName
call <sid>hi('htmlArg', s:cdLightBlue, {}, 'none', {})
" PHP (built-in)
call <sid>hi('phpClass', s:cdBlueGreen, {}, 'none', {})
hi! link phpUseClass phpClass
hi! link phpStaticClasses phpClass
call <sid>hi('phpMethod', s:cdYellow, {}, 'none', {})
call <sid>hi('phpFunction', s:cdYellow, {}, 'none', {})
call <sid>hi('phpInclude', s:cdBlue, {}, 'none', {})
call <sid>hi('phpRegion', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('phpMethodsVar', s:cdLightBlue, {}, 'none', {})
" CSS (built-in)
call <sid>hi('cssBraces', s:cdFront, {}, 'none', {})
call <sid>hi('cssInclude', s:cdPink, {}, 'none', {})
call <sid>hi('cssTagName', s:cdBlue, {}, 'none', {})
call <sid>hi('cssClassName', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('cssPseudoClass', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('cssPseudoClassId', s:cdOrange, {}, 'none', {})
call <sid>hi('cssPseudoClassLang', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('cssIdentifier', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('cssProp', s:cdLightBlue, {}, 'none', {})
call <sid>hi('cssDefinition', s:cdLightBlue, {}, 'none', {})
call <sid>hi('cssAttr', s:cdOrange, {}, 'none', {})
call <sid>hi('cssAttrRegion', s:cdOrange, {}, 'none', {})
call <sid>hi('cssColor', s:cdOrange, {}, 'none', {})
call <sid>hi('cssFunction', s:cdLightBlue, {}, 'none', {})
call <sid>hi('cssFunctionName', s:cdYellow, {}, 'none', {})
call <sid>hi('cssVendor', s:cdOrange, {}, 'none', {})
call <sid>hi('cssValueNumber', s:cdOrange, {}, 'none', {})
call <sid>hi('cssValueLength', s:cdLightGreen, {}, 'none', {})
call <sid>hi('cssUnitDecorators', s:cdLightGreen, {}, 'none', {})
call <sid>hi('cssStyle', s:cdLightBlue, {}, 'none', {})
call <sid>hi('cssImportant', s:cdBlue, {}, 'none', {})
call <sid>hi('cssSelectorOp', s:cdFront, {}, 'none', {})
call <sid>hi('cssKeyFrameProp2', s:cdLightGreen, {}, 'none', {})
" JavaScript:
call <sid>hi('jsVariableDef', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsFuncArgs', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsFuncBlock', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsRegexpString', s:cdLightRed, {}, 'none', {})
call <sid>hi('jsThis', s:cdBlue, {}, 'none', {})
call <sid>hi('jsOperatorKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('jsDestructuringBlock', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsObjectKey', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsGlobalObjects', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('jsModuleKeyword', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsClassDefinition', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('jsClassKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('jsExtendsKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('jsExportDefault', s:cdPink, {}, 'none', {})
call <sid>hi('jsFuncCall', s:cdYellow, {}, 'none', {})
call <sid>hi('jsObjectValue', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsParen', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsObjectProp', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsIfElseBlock', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsParenIfElse', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsSpreadOperator', s:cdLightBlue, {}, 'none', {})
call <sid>hi('jsSpreadExpression', s:cdLightBlue, {}, 'none', {})
" Vue:
call <sid>hi('VueComponentName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('VueValue', s:cdLightBlue, {}, 'none', {})
call <sid>hi('VueBrace', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('VueExpression', s:cdYellow, {}, 'none', {})
call <sid>hi('VueTag', s:cdLightBlue, {}, 'none', {})
call <sid>hi('VueKey', s:cdPink, {}, 'none', {})
" Typescript:
call <sid>hi('typescriptLabel', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptTry', s:cdPink, {}, 'none', {})
call <sid>hi('typescriptExceptions', s:cdPink, {}, 'none', {})
call <sid>hi('typescriptBraces', s:cdFront, {}, 'none', {})
call <sid>hi('typescriptEndColons', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptParens', s:cdFront, {}, 'none', {})
call <sid>hi('typescriptDocTags', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptDocComment', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptLogicSymbols', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptImport', s:cdPink, {}, 'none', {})
call <sid>hi('typescriptBOM', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptVariableDeclaration', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptVariable', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptExport', s:cdPink, {}, 'none', {})
call <sid>hi('typescriptAliasDeclaration', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptAliasKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptClassName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptAccessibilityModifier', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptOperator', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptArrowFunc', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptMethodAccessor', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptMember', s:cdYellow, {}, 'none', {})
call <sid>hi('typescriptTypeReference', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptDefault', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptTemplateSB', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('typescriptArrowFuncArg', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptParamImpl', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptFuncComma', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptCastKeyword', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptCall', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptCase', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptReserved', s:cdPink, {}, 'none', {})
call <sid>hi('typescriptDefault', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptDecorator', s:cdYellow, {}, 'none', {})
call <sid>hi('typescriptPredefinedType', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptClassHeritage', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptClassExtends', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptClassKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptBlock', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptDOMDocProp', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptTemplateSubstitution', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptClassBlock', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptFuncCallArg', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptIndexExpr', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptConditionalParen', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptArray', s:cdYellow, {}, 'none', {})
call <sid>hi('typescriptES6SetProp', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptObjectLiteral', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptTypeParameter', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptEnumKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptEnum', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptLoopParen', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptParenExp', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptModule', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptAmbientDeclaration', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptModule', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptFuncTypeArrow', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptInterfaceHeritage', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptInterfaceName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptInterfaceKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptInterfaceExtends', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptGlobal', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('typescriptAsyncFuncKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptFuncKeyword', s:cdBlue, {}, 'none', {})
call <sid>hi('typescriptGlobalMethod', s:cdYellow, {}, 'none', {})
call <sid>hi('typescriptPromiseMethod', s:cdYellow, {}, 'none', {})
call <sid>hi('typescriptIdentifierName', s:cdLightBlue, {}, 'none', {})
call <sid>hi('typescriptCacheMethod', s:cdYellow, {}, 'none', {})
" XML:
call <sid>hi('xmlTag', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('xmlTagName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('xmlEndTag', s:cdBlueGreen, {}, 'none', {})
" Ruby:
call <sid>hi('rubyClassNameTag', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('rubyClassName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('rubyModuleName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('rubyConstant', s:cdBlueGreen, {}, 'none', {})
" Golang:
call <sid>hi('goPackage', s:cdBlue, {}, 'none', {})
call <sid>hi('goImport', s:cdBlue, {}, 'none', {})
call <sid>hi('goVar', s:cdBlue, {}, 'none', {})
call <sid>hi('goConst', s:cdBlue, {}, 'none', {})
call <sid>hi('goStatement', s:cdPink, {}, 'none', {})
call <sid>hi('goType', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('goSignedInts', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('goUnsignedInts', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('goFloats', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('goComplexes', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('goBuiltins', s:cdYellow, {}, 'none', {})
call <sid>hi('goBoolean', s:cdBlue, {}, 'none', {})
call <sid>hi('goPredefinedIdentifiers', s:cdBlue, {}, 'none', {})
call <sid>hi('goTodo', s:cdGreen, {}, 'none', {})
call <sid>hi('goDeclaration', s:cdBlue, {}, 'none', {})
call <sid>hi('goDeclType', s:cdBlue, {}, 'none', {})
call <sid>hi('goTypeDecl', s:cdBlue, {}, 'none', {})
call <sid>hi('goTypeName', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('goVarAssign', s:cdLightBlue, {}, 'none', {})
call <sid>hi('goVarDefs', s:cdLightBlue, {}, 'none', {})
call <sid>hi('goReceiver', s:cdFront, {}, 'none', {})
call <sid>hi('goReceiverType', s:cdFront, {}, 'none', {})
call <sid>hi('goFunctionCall', s:cdYellow, {}, 'none', {})
call <sid>hi('goMethodCall', s:cdYellow, {}, 'none', {})
call <sid>hi('goSingleDecl', s:cdLightBlue, {}, 'none', {})
" Python:
call <sid>hi('pythonStatement', s:cdBlue, {}, 'none', {})
call <sid>hi('pythonOperator', s:cdBlue, {}, 'none', {})
call <sid>hi('pythonException', s:cdPink, {}, 'none', {})
call <sid>hi('pythonExClass', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('pythonBuiltinObj', s:cdLightBlue, {}, 'none', {})
call <sid>hi('pythonBuiltinType', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('pythonBoolean', s:cdBlue, {}, 'none', {})
call <sid>hi('pythonNone', s:cdBlue, {}, 'none', {})
call <sid>hi('pythonTodo', s:cdBlue, {}, 'none', {})
call <sid>hi('pythonClassVar', s:cdBlue, {}, 'none', {})
call <sid>hi('pythonClassDef', s:cdBlueGreen, {}, 'none', {})
" TeX:
call <sid>hi('texStatement', s:cdBlue, {}, 'none', {})
call <sid>hi('texBeginEnd', s:cdYellow, {}, 'none', {})
call <sid>hi('texBeginEndName', s:cdLightBlue, {}, 'none', {})
call <sid>hi('texOption', s:cdLightBlue, {}, 'none', {})
call <sid>hi('texBeginEndModifier', s:cdLightBlue, {}, 'none', {})
call <sid>hi('texDocType', s:cdPink, {}, 'none', {})
call <sid>hi('texDocTypeArgs', s:cdLightBlue, {}, 'none', {})
" GIT (built-in)
call <sid>hi('gitcommitHeader', s:cdGray, {}, 'none', {})
call <sid>hi('gitcommitOnBranch', s:cdGray, {}, 'none', {})
call <sid>hi('gitcommitBranch', s:cdPink, {}, 'none', {})
call <sid>hi('gitcommitComment', s:cdGray, {}, 'none', {})
call <sid>hi('gitcommitSelectedType', s:cdGreen, {}, 'none', {})
hi! link gitcommitSelectedFile gitcommitSelectedType
call <sid>hi('gitcommitDiscardedType', s:cdRed, {}, 'none', {})
hi! link gitcommitDiscardedFile gitcommitDiscardedType
hi! link gitcommitOverflow gitcommitDiscardedType
call <sid>hi('gitcommitSummary', s:cdPink, {}, 'none', {})
call <sid>hi('gitcommitBlank', s:cdPink, {}, 'none', {})
" Lua:
call <sid>hi('luaFuncCall', s:cdYellow, {}, 'none', {})
call <sid>hi('luaFuncArgName', s:cdLightBlue, {}, 'none', {})
call <sid>hi('luaFuncKeyword', s:cdPink, {}, 'none', {})
call <sid>hi('luaLocal', s:cdPink, {}, 'none', {})
call <sid>hi('luaBuiltIn', s:cdBlue, {}, 'none', {})
" SH:
call <sid>hi('shDeref', s:cdLightBlue, {}, 'none', {})
call <sid>hi('shVariable', s:cdLightBlue, {}, 'none', {})
" SQL:
call <sid>hi('sqlKeyword', s:cdPink, {}, 'none', {})
call <sid>hi('sqlFunction', s:cdYellowOrange, {}, 'none', {})
call <sid>hi('sqlOperator', s:cdPink, {}, 'none', {})
" YAML:
call <sid>hi('yamlKey', s:cdBlue, {}, 'none', {})
call <sid>hi('yamlConstant', s:cdBlue, {}, 'none', {})
" C++:
call <sid>hi('CTagsClass', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('CTagsStructure', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('CTagsNamespace', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('CTagsGlobalVariable', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('CTagsDefinedName ', s:cdBlue, {}, 'none', {})
highlight def link CTagsFunction Function
highlight def link CTagsMember Identifier
" C++ color_coded
call <sid>hi('StructDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('UnionDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('ClassDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TypeRef', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TypedefDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TypeAliasDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('EnumDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TemplateTypeParameter', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TypeAliasTemplateDecl', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('ClassTemplate', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('ClassTemplatePartialSpecialization', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('FunctionTemplate', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TemplateRef', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('TemplateTemplateParameter', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('UsingDeclaration', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('MemberRef', s:cdLightBlue, {}, 'italic', {})
call <sid>hi('MemberRefExpr', s:cdYellow, {}, 'italic', {})
call <sid>hi('Namespace', s:cdSilver, {}, 'none', {})
call <sid>hi('NamespaceRef', s:cdSilver, {}, 'none', {})
call <sid>hi('NamespaceAlias', s:cdSilver, {}, 'none', {})
" C++ lsp-cxx-highlight
call <sid>hi('LspCxxHlSymClass', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('LspCxxHlSymStruct', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('LspCxxHlSymEnum', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('LspCxxHlSymTypeAlias', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('LspCxxHlSymTypeParameter', s:cdBlueGreen, {}, 'none', {})
call <sid>hi('LspCxxHlSymConcept', s:cdBlueGreen, {}, 'italic', {})
call <sid>hi('LspCxxHlSymNamespace', s:cdSilver, {}, 'none', {})
" Coc Explorer:
call <sid>hi('CocHighlightText', {}, s:cdSelection, 'none', {})
call <sid>hi('CocExplorerIndentLine', s:cdCursorDark, {}, 'none', {})

View File

@@ -0,0 +1,390 @@
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sets how many lines of history VIM has to remember
set history=500
" Enable filetype plugins
filetype plugin on
filetype indent on
" Set to auto read when a file is changed from the outside
set autoread
au FocusGained,BufEnter * silent! checktime
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = " "
" Fast saving
nmap <leader>w :w!<cr>
" :W sudo saves the file
" (useful for handling the permission-denied error)
command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
" Use system clipboard
set clipboard+=unnamedplus
" Center the screen when in insert mode
autocmd InsertEnter * norm zz
set number relativenumber
set cursorline
set cursorcolumn
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => VIM user interface
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Set 7 lines to the cursor - when moving vertically using j/k
set so=7
" Avoid garbled characters in Chinese language windows OS
let $LANG='en'
set langmenu=en
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
" Turn on the Wild menu
set wildmenu
" Ignore compiled files
set wildignore=*.o,*~,*.pyc
if has("win16") || has("win32")
set wildignore+=.git\*,.hg\*,.svn\*
else
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
endif
" Always show current position
set ruler
" Height of the command bar
set cmdheight=1
" A buffer becomes hidden when it is abandoned
set hid
" Configure backspace so it acts as it should act
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
" Ignore case when searching
set ignorecase
" When searching try to be smart about cases
set smartcase
" Highlight search results
set hlsearch
" Makes search act like search in modern browsers
set incsearch
" Don't redraw while executing macros (good performance config)
set lazyredraw
" For regular expressions turn magic on
set magic
" Show matching brackets when text indicator is over them
set showmatch
" How many tenths of a second to blink when matching brackets
set mat=2
" No annoying sound on errors
set noerrorbells
set novisualbell
set t_vb=
set tm=500
" Properly disable sound on errors on MacVim
if has("gui_macvim")
autocmd GUIEnter * set vb t_vb=
endif
" Add a bit extra margin to the left
set foldcolumn=1
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors and Fonts
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Enable syntax highlighting
syntax enable
" Set regular expression engine automatically
set regexpengine=0
" Enable 256 colors palette in Gnome Terminal
if $COLORTERM == 'gnome-terminal'
set t_Co=256
endif
try
colorscheme gruvbox
catch
endtry
set background=dark
" Set background to transparent
hi Normal guibg=NONE ctermbg=NONE
" Set extra options when running in GUI mode
if has("gui_running")
set guioptions-=T
set guioptions-=e
set t_Co=256
set guitablabel=%M\ %t
endif
" Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8
" Use Unix as the standard file type
set ffs=unix,dos,mac
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Files, backups and undo
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Turn backup off, since most stuff is in SVN, git etc. anyway...
set nobackup
set nowb
set noswapfile
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text, tab and indent related
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Use spaces instead of tabs
set expandtab
" Be smart when using tabs ;)
set smarttab
" 1 tab == 2 spaces
set shiftwidth=2
set tabstop=2
" Linebreak on 500 characters
set lbr
set tw=500
set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines
""""""""""""""""""""""""""""""
" => Visual mode related
""""""""""""""""""""""""""""""
" Visual mode pressing * or # searches for the current selection
vnoremap <silent> * :<C-u>call VisualSelection('', '')<CR>/<C-R>=@/<CR><CR>
vnoremap <silent> # :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Moving around, tabs, windows and buffers
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Map <Space> to / (search) and Ctrl-<Space> to ? (backwards search)
map <space> /
map <C-space> ?
" Disable highlight when <leader><cr> is pressed
map <silent> <leader><cr> :noh<cr>
" Smart way to move between windows
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
" Close the current buffer
map <leader>bd :Bclose<cr>:tabclose<cr>gT
" Close all the buffers
map <leader>ba :bufdo bd<cr>
map <leader>l :bnext<cr>
map <leader>h :bprevious<cr>
" Useful mappings for managing tabs
map <leader>tn :tabnew<cr>
map <leader>to :tabonly<cr>
map <leader>tc :tabclose<cr>
map <leader>tm :tabmove
map <leader>t<leader> :tabnext<cr>
" Let 'tl' toggle between this and the last accessed tab
let g:lasttab = 1
nmap <leader>tl :exe "tabn ".g:lasttab<CR>
au TabLeave * let g:lasttab = tabpagenr()
" Opens a new tab with the current buffer's path
" Super useful when editing files in the same directory
map <leader>te :tabedit <C-r>=escape(expand("%:p:h"), " ")<cr>/
" Switch CWD to the directory of the open buffer
map <leader>cd :cd %:p:h<cr>:pwd<cr>
" Specify the behavior when switching between buffers
try
set switchbuf=useopen,usetab,newtab
set stal=2
catch
endtry
" Return to last edit position when opening files (You want this!)
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
""""""""""""""""""""""""""""""
" => Status line
""""""""""""""""""""""""""""""
" Always show the status line
set laststatus=2
" Format the status line
function! GitBranch()
return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
endfunction
function! StatuslineGit()
let l:branchname = GitBranch()
return strlen(l:branchname) > 0?' '.l:branchname.' ':''
endfunction
" StatusLine is currently broken. Using the vim default.
" set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ Cursor:\ %l/%c\ \ \ Lines:\ %L%=%{StatuslineGit()}
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Editing mappings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Remap VIM 0 to first non-blank character
map 0 ^
" Move a line of text using ALT+[jk] or Command+[jk] on mac
nmap <M-j> mz:m+<cr>`z
nmap <M-k> mz:m-2<cr>`z
vmap <M-j> :m'>+<cr>`<my`>mzgv`yo`z
vmap <M-k> :m'<-2<cr>`>my`<mzgv`yo`z
if has("mac") || has("macunix")
nmap <D-j> <M-j>
nmap <D-k> <M-k>
vmap <D-j> <M-j>
vmap <D-k> <M-k>
endif
" Delete trailing white space on save, useful for some filetypes ;)
fun! CleanExtraSpaces()
let save_cursor = getpos(".")
let old_query = getreg('/')
silent! %s/\s\+$//e
call setpos('.', save_cursor)
call setreg('/', old_query)
endfun
if has("autocmd")
autocmd BufWritePre *.txt,*.js,*.py,*.wiki,*.sh,*.coffee :call CleanExtraSpaces()
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Spell checking
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Pressing ,ss will toggle and untoggle spell checking
map <leader>ss :setlocal spell!<cr>
" Shortcuts using <leader>
map <leader>sn ]s
map <leader>sp [s
map <leader>sa zg
map <leader>s? z=
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Misc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Remove the Windows ^M - when the encodings gets messed up
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
" Quickly open a buffer for scribble
map <leader>q :e ~/buffer<cr>
" Quickly open a markdown buffer for scribble
map <leader>x :e ~/buffer.md<cr>
" Toggle paste mode on and off
map <leader>pp :setlocal paste!<cr>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Helper functions
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Returns true if paste mode is enabled
function! HasPaste()
if &paste
return 'PASTE MODE '
endif
return ''
endfunction
" Don't close window, when deleting a buffer
command! Bclose call <SID>BufcloseCloseIt()
function! <SID>BufcloseCloseIt()
let l:currentBufNum = bufnr("%")
let l:alternateBufNum = bufnr("#")
if buflisted(l:alternateBufNum)
buffer #
else
bnext
endif
if bufnr("%") == l:currentBufNum
new
endif
if buflisted(l:currentBufNum)
execute("bdelete! ".l:currentBufNum)
endif
endfunction
function! CmdLine(str)
call feedkeys(":" . a:str)
endfunction
function! VisualSelection(direction, extra_filter) range
let l:saved_reg = @"
execute "normal! vgvy"
let l:pattern = escape(@", "\\/.*'$^~[]")
let l:pattern = substitute(l:pattern, "\n$", "", "")
if a:direction == 'gv'
call CmdLine("Ack '" . l:pattern . "' " )
elseif a:direction == 'replace'
call CmdLine("%s" . '/'. l:pattern . '/')
endif
let @/ = l:pattern
let @" = l:saved_reg
endfunction
set nocompatible
" VIM-PLUG PLUGINS
call plug#begin()
" The default plugin directory will be as follows:
" - Vim (Linux/macOS): '~/.vim/plugged'
" - Vim (Windows): '~/vimfiles/plugged'
" - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged'
Plug 'vimwiki/vimwiki'
call plug#end()

View File

@@ -1,139 +0,0 @@
// Trude's Zed Settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run the `open default settings` command
// from the command palette or from `Zed` application menu.
{
"base_keymap": "VSCode",
"vim_mode": false,
"telemetry": {
"diagnostics": false,
"metrics": false
},
"ui_font_size": 14,
"buffer_font_size": 14,
"buffer_font_family": "JetBrainsMono NF",
"buffer_font_features": {
// Enable ligatures:
"calt": true
},
"buffer_font_weight": 300,
"buffer_line_height": "comfortable",
"ui_font_family": "JetBrainsMono NF",
// The OpenType features to enable for text in the UI
"ui_font_features": {
"calt": true
},
"hover_popover_enabled": true,
"confirm_quit": false,
"restore_on_startup": "last_workspace",
"show_completions_on_input": true,
"show_completion_documentation": true,
"show_wrap_guides": true,
"redact_private_values": true,
"private_files": [
"**/.env*",
"**/*.pem",
"**/*.key",
"**/*.cert",
"**/*.crt",
"**/secrets.yml"
],
"use_on_type_format": true,
"use_autoclose": true,
"use_auto_surround": true,
"always_treat_brackets_as_autoclosed": false,
"show_inline_completions": true,
"calls": {
"mute_on_join": true,
"share_on_join": false
},
"toolbar": {
"breadcrumbs": true,
"quick_actions": true,
"selections_menu": true
},
"message_editor": {
"auto_replace_emoji_shortcode": false
},
"enable_language_server": true,
"autosave": "off",
"tab_bar": {
"show": true,
"show_nav_history_buttons": true
},
"tabs": {
"git_status": false,
"close_position": "right"
},
"format_on_save": "on",
"formatter": "auto",
"auto_update": true,
"file_scan_exclusions": [
"**/.git",
"**/.svn",
"**/.hg",
"**/CVS",
"**/.DS_Store",
"**/Thumbs.db",
"**/.classpath",
"**/.settings"
],
"auto_install_extensions": {
"html": true,
"make": true,
"emmet": true
},
"languages": {
"C": {
"format_on_save": "on"
},
"C++": {
"format_on_save": "on"
}
},
"vim": {
"use_system_clipboard": "always",
"use_multiline_find": false,
"use_smartcase_find": false
},
"server_url": "https://zed.dev",
"terminal": {
"shell": "system",
"dock": "bottom",
"default_width": 640,
"default_height": 320,
"working_directory": "current_project_directory",
"blinking": "terminal_controlled",
"alternate_scroll": "on",
"option_as_meta": false,
"copy_on_select": true,
"button": true,
"env": {
// "KEY": "value1:value2"
},
"line_height": "standard",
"detect_venv": {
"on": {
"directories": [".env", "env", ".venv", "venv"],
"activate_script": "default"
}
},
"toolbar": {
"title": true
}
},
"code_actions_on_format": {},
"tasks": {
"variables": {}
},
"show_whitespaces": "selection",
"theme": {
"mode": "system",
"light": "One Light",
"dark": "Ayu Dark"
}
}