Initial commit

This commit is contained in:
yzinchuk
2026-06-15 20:51:22 -04:00
parent f0a2108ed5
commit 44f0fbbf3f
+32 -4
View File
@@ -178,6 +178,12 @@ end
-- basic keymaps -- basic keymaps
-- ============================================================ -- ============================================================
do do
-- [[ Yuriy Keymaps ]]
vim.opt.clipboard = "unnamedplus"
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
@@ -251,6 +257,11 @@ do
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
callback = function() vim.hl.on_yank() end, callback = function() vim.hl.on_yank() end,
}) })
-- [[ RPC Server for external control ]]
-- Used for changing the theme to light/dark from external tools (e.g. atom.cz)
local socket_path = '/tmp/nvim-' .. vim.fn.getpid() .. '.sock'
vim.fn.serverstart(socket_path)
end end
-- ============================================================ -- ============================================================
@@ -385,15 +396,32 @@ do
vim.pack.add { gh 'folke/tokyonight.nvim' } vim.pack.add { gh 'folke/tokyonight.nvim' }
---@diagnostic disable-next-line: missing-fields ---@diagnostic disable-next-line: missing-fields
require('tokyonight').setup { require('tokyonight').setup {
style = 'moon', -- default dark theme
light_style = 'day', -- theme used when background is light
styles = { styles = {
comments = { italic = false }, -- Disable italics in comments comments = { italic = false }, -- Disable italics in comments
}, },
} }
-- Load the colorscheme here. -- Auto switch based on KDE Plasma system theme
-- Like many other themes, this one has different styles, and you could load local function set_theme()
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. local handle = io.popen "kreadconfig6 --group 'General' --key 'ColorScheme' 2>/dev/null"
vim.cmd.colorscheme 'tokyonight-night' if handle == nil then
vim.o.background = 'dark'
return
end
local result = handle:read '*a'
handle:close()
if result:match '[Dd]ark' then
vim.o.background = 'dark'
else
vim.o.background = 'light'
end
end
set_theme()
-- Uses tokyonight (without suffix) so it respects vim.o.background
vim.cmd.colorscheme 'tokyonight'
-- Highlight todo, notes, etc in comments -- Highlight todo, notes, etc in comments
vim.pack.add { gh 'folke/todo-comments.nvim' } vim.pack.add { gh 'folke/todo-comments.nvim' }