Compare commits
No commits in common. "d3b07a2e772ce70fda0dab8f677973ba22aa3b2d" and "f3628d2cf1d035ed0c8e819da3a081268278410c" have entirely different histories.
d3b07a2e77
...
f3628d2cf1
6 changed files with 9 additions and 336 deletions
|
@ -1,9 +1,9 @@
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
{
|
{
|
||||||
name = "grc";
|
name = "grc";
|
||||||
|
|
|
@ -5,9 +5,6 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
|
|
||||||
programs.man.generateCaches = false;
|
|
||||||
|
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
|
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
|
||||||
|
@ -22,7 +19,6 @@
|
||||||
|
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
black
|
black
|
||||||
codeium
|
|
||||||
cue
|
cue
|
||||||
go
|
go
|
||||||
gopls
|
gopls
|
||||||
|
@ -77,36 +73,6 @@
|
||||||
targets-vim
|
targets-vim
|
||||||
ts-comments-nvim
|
ts-comments-nvim
|
||||||
|
|
||||||
{
|
|
||||||
plugin = codeium-nvim;
|
|
||||||
type = "lua";
|
|
||||||
config = ''
|
|
||||||
require'codeium'.setup {
|
|
||||||
enable_chat = false,
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
|
||||||
name = "neocodeium";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "monkoose";
|
|
||||||
repo = "neocodeium";
|
|
||||||
rev = "4da81528468b33585c411f31eb390dce573ccb14"; # v1.8.0
|
|
||||||
hash = "sha256-1n9nNqBNwNDSzbAkm8eB4HZLNy5HmMg25jPwQAnW5OU=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
type = "lua";
|
|
||||||
config = ''
|
|
||||||
local neocodeium =require('neocodeium')
|
|
||||||
neocodeium.setup()
|
|
||||||
vim.keymap.set("i", "<C-j>", neocodeium.accept, { remap = true })
|
|
||||||
vim.keymap.set("i", "<A-f>", neocodeium.accept, { remap = true })
|
|
||||||
vim.keymap.set("i", "<C-h>", neocodeium.cycle_or_complete, { remap = true })
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
plugin = pkgs.vimUtils.buildVimPlugin {
|
||||||
name = "diagflow";
|
name = "diagflow";
|
||||||
|
@ -133,7 +99,11 @@
|
||||||
{
|
{
|
||||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
plugin = pkgs.vimUtils.buildVimPlugin {
|
||||||
name = "dieter-nvim";
|
name = "dieter-nvim";
|
||||||
src = ./dieter;
|
src = pkgs.fetchgit {
|
||||||
|
url = "https://patagia.dev/Patagia/dieter.nvim.git";
|
||||||
|
rev = "08fae6ffec4ae70ba6b2e1cafa780ff317ef0b61";
|
||||||
|
hash = "sha256-C+Vo2SUVfNMkBwuLWqLoA59Pmy9aFwur7fBpfVkLm6Q=";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = ''
|
config = ''
|
||||||
|
@ -145,10 +115,6 @@
|
||||||
plugin = nvim-treesitter-context;
|
plugin = nvim-treesitter-context;
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = ''
|
config = ''
|
||||||
require'treesitter-context'.setup{
|
|
||||||
enable = false,
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.keymap.set('n', '<space>ut', "<cmd>TSContextToggle<cr>", {noremap = true, silent = true, desc = "TS Context"})
|
vim.keymap.set('n', '<space>ut', "<cmd>TSContextToggle<cr>", {noremap = true, silent = true, desc = "TS Context"})
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
@ -185,7 +151,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = nvim-treesitter-textobjects;
|
plugin = nvim-treesitter-textobjects; # helix-style selection of TS tree
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = ''
|
config = ''
|
||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
|
@ -209,7 +175,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = nvim-lspconfig;
|
plugin = nvim-lspconfig; # Interface for LSPs
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = lib.fileContents ./lsp.lua;
|
config = lib.fileContents ./lsp.lua;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
package.loaded["dieter"] = nil
|
|
||||||
require("dieter")
|
|
|
@ -1,71 +0,0 @@
|
||||||
-- https://github.com/EmmanuelOga/columns/blob/master/utils/color.lua
|
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
--- Converts an HSL color value to RGB. Conversion formula
|
|
||||||
--- adapted from http://en.wikipedia.org/wiki/HSL_color_space.
|
|
||||||
--- Assumes h, s, and l are contained in the set [0, 1] and
|
|
||||||
--- returns r, g, and b in the set [0, 255].
|
|
||||||
---
|
|
||||||
--- @param h number The hue
|
|
||||||
--- @param s number The saturation
|
|
||||||
--- @param l number The lightness
|
|
||||||
--- @return number, number, number # The RGB representation
|
|
||||||
function M.hslToRgb(h, s, l)
|
|
||||||
--- @type number, number, number
|
|
||||||
local r, g, b
|
|
||||||
|
|
||||||
if s == 0 then
|
|
||||||
r, g, b = l, l, l -- achromatic
|
|
||||||
else
|
|
||||||
--- @param p number
|
|
||||||
--- @param q number
|
|
||||||
--- @param t number
|
|
||||||
local function hue2rgb(p, q, t)
|
|
||||||
if t < 0 then
|
|
||||||
t = t + 1
|
|
||||||
end
|
|
||||||
if t > 1 then
|
|
||||||
t = t - 1
|
|
||||||
end
|
|
||||||
if t < 1 / 6 then
|
|
||||||
return p + (q - p) * 6 * t
|
|
||||||
end
|
|
||||||
if t < 1 / 2 then
|
|
||||||
return q
|
|
||||||
end
|
|
||||||
if t < 2 / 3 then
|
|
||||||
return p + (q - p) * (2 / 3 - t) * 6
|
|
||||||
end
|
|
||||||
return p
|
|
||||||
end
|
|
||||||
|
|
||||||
--- @type number
|
|
||||||
local q
|
|
||||||
if l < 0.5 then
|
|
||||||
q = l * (1 + s)
|
|
||||||
else
|
|
||||||
q = l + s - l * s
|
|
||||||
end
|
|
||||||
local p = 2 * l - q
|
|
||||||
|
|
||||||
r = hue2rgb(p, q, h + 1 / 3)
|
|
||||||
g = hue2rgb(p, q, h)
|
|
||||||
b = hue2rgb(p, q, h - 1 / 3)
|
|
||||||
end
|
|
||||||
|
|
||||||
return r * 255, g * 255, b * 255
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Converts an HSL color value to RGB in Hex representation.
|
|
||||||
--- @param h number The hue
|
|
||||||
--- @param s number The saturation
|
|
||||||
--- @param l number The lightness
|
|
||||||
--- @return string # The hex representation
|
|
||||||
function M.hslToHex(h, s, l)
|
|
||||||
local r, g, b = M.hslToRgb(h / 360, s / 100, l / 100)
|
|
||||||
|
|
||||||
return string.format("#%02x%02x%02x", r, g, b)
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
|
@ -1,183 +0,0 @@
|
||||||
local hsl = require("dieter.hsl").hslToHex
|
|
||||||
|
|
||||||
local colors = {
|
|
||||||
light = {
|
|
||||||
background = hsl(240, 100, 100),
|
|
||||||
foreground = hsl(0, 0, 13),
|
|
||||||
|
|
||||||
accent1 = hsl(12, 100, 50),
|
|
||||||
|
|
||||||
dimmed = hsl(0, 0, 80),
|
|
||||||
dimmed_subtle = hsl(0, 0, 20),
|
|
||||||
|
|
||||||
string = hsl(96, 50, 33),
|
|
||||||
comment = hsl(230, 66, 40),
|
|
||||||
comment_error = hsl(2, 85, 40),
|
|
||||||
|
|
||||||
diagnostic_error = hsl(347, 80, 45),
|
|
||||||
diagnostic_warning = hsl(30, 100, 50),
|
|
||||||
diagnostic_info = hsl(145, 80, 30),
|
|
||||||
diagnostic_hint = hsl(145, 80, 30),
|
|
||||||
|
|
||||||
popup_error_bg = hsl(0, 90, 99),
|
|
||||||
popup_warning_bg = hsl(27, 90, 99),
|
|
||||||
popup_info_bg = hsl(112, 90, 99),
|
|
||||||
popup_hint_bg = hsl(112, 90, 99),
|
|
||||||
|
|
||||||
add = hsl(84, 50, 80),
|
|
||||||
add_quarter = hsl(84, 80, 95),
|
|
||||||
change = hsl(41, 80, 80),
|
|
||||||
change_quarter = hsl(224, 100, 85),
|
|
||||||
delete = hsl(350, 100, 40),
|
|
||||||
delete_quarter = hsl(350, 100, 85),
|
|
||||||
|
|
||||||
dialog_bg = hsl(224, 5, 92),
|
|
||||||
selection = hsl(270, 75, 92),
|
|
||||||
highlight_subtle = hsl(0, 0, 94),
|
|
||||||
highlight_intense = hsl(42, 100, 30),
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
dark = {
|
|
||||||
background = hsl(216, 28, 7),
|
|
||||||
foreground = hsl(0, 0, 80),
|
|
||||||
|
|
||||||
accent1 = hsl(12, 100, 50),
|
|
||||||
|
|
||||||
dimmed = hsl(0, 0, 25),
|
|
||||||
dimmed_subtle = hsl(0, 0, 50),
|
|
||||||
|
|
||||||
highlight_subtle = hsl(0, 0, 6),
|
|
||||||
highlight_intense = hsl(58, 100, 60),
|
|
||||||
|
|
||||||
string = hsl(96, 50, 70),
|
|
||||||
comment = hsl(220, 50, 60),
|
|
||||||
comment_error = hsl(2, 85, 50),
|
|
||||||
|
|
||||||
diagnostic_error = hsl(353, 100, 45),
|
|
||||||
diagnostic_warning = hsl(30, 100, 50),
|
|
||||||
diagnostic_info = hsl(176, 80, 60),
|
|
||||||
diagnostic_hint = hsl(176, 80, 60),
|
|
||||||
|
|
||||||
popup_error_bg = hsl(0, 95, 7),
|
|
||||||
popup_warning_bg = hsl(27, 95, 7),
|
|
||||||
popup_info_bg = hsl(112, 95, 7),
|
|
||||||
popup_hint_bg = hsl(112, 95, 7),
|
|
||||||
|
|
||||||
add = hsl(100, 100, 12),
|
|
||||||
add_quarter = hsl(84, 80, 15),
|
|
||||||
change = hsl(41, 100, 15),
|
|
||||||
change_quarter = hsl(224, 100, 15),
|
|
||||||
delete = hsl(350, 100, 40),
|
|
||||||
delete_quarter = hsl(350, 100, 15),
|
|
||||||
|
|
||||||
-- dialog_bg = background,
|
|
||||||
-- dialog_fg = hsl(216, 70, 80),
|
|
||||||
-- dialog_bg = hsl(216, 25, 20),
|
|
||||||
-- selection = hsl(216, 25, 33),
|
|
||||||
selection = hsl(213, 60, 40),
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
local c = colors[vim.o.background]
|
|
||||||
c.dialog_fg = c.foreground
|
|
||||||
c.dialog_bg = c.background
|
|
||||||
|
|
||||||
local theme = {
|
|
||||||
Normal = { fg = c.foreground, bg = c.background },
|
|
||||||
|
|
||||||
Constant = { link = "NormalNC" },
|
|
||||||
Delimiter = { link = "NormalNC" },
|
|
||||||
Identifier = { link = "NormalNC" },
|
|
||||||
Keyword = { fg = c.foreground, bold = true },
|
|
||||||
Operator = { link = "NormalNC" },
|
|
||||||
Special = { link = "NormalNC" },
|
|
||||||
Type = { link = "NormalNC" },
|
|
||||||
|
|
||||||
String = { fg = c.string },
|
|
||||||
|
|
||||||
Comment = { fg = c.comment, italic = true, bold = true },
|
|
||||||
CommentError = { fg = c.comment_error, italic = true, bold = true },
|
|
||||||
["@comment.note"] = { link = "Comment" },
|
|
||||||
["@comment.todo"] = { link = "CommentError" },
|
|
||||||
["@comment.error"] = { link = "CommentError" },
|
|
||||||
["@comment.warning"] = { link = "CommentError" },
|
|
||||||
|
|
||||||
DiffAdd = { fg = c.add, bg = c.add_quarter },
|
|
||||||
GitSignsAdd = { fg = c.add, bg = c.background },
|
|
||||||
GitSignsAddNr = { link = "DiffAdd" },
|
|
||||||
DiffChange = { fg = c.change, bg = c.change_quarter },
|
|
||||||
GitSignsChange = { fg = c.change, bg = c.background },
|
|
||||||
GitSignsChangeNr = { link = "DiffChange" },
|
|
||||||
DiffDelete = { fg = c.delete, bg = c.delete_quarter },
|
|
||||||
GitSignsDelete = { fg = c.delete, bg = c.background },
|
|
||||||
GitSignsDeleteNr = { link = "DiffDelete" },
|
|
||||||
|
|
||||||
-- Treesitter
|
|
||||||
["@function"] = { link = "NormalNC" },
|
|
||||||
["@special"] = { link = "NormalNC" },
|
|
||||||
["@variable"] = { link = "NormalNC" },
|
|
||||||
["@lsp.type.variable"] = { fg = c.dimmed_subtle },
|
|
||||||
|
|
||||||
-- UI Elements
|
|
||||||
CursorLine = { bg = c.highlight_subtle },
|
|
||||||
|
|
||||||
DiagnosticError = { fg = c.diagnostic_error, italic = true },
|
|
||||||
DiagnosticFloatingError = { fg = c.diagnostic_error, bg = c.popup_error_bg },
|
|
||||||
DiagnosticFloatingWarn = { fg = c.diagnostic_warning, bg = c.popup_warning_bg },
|
|
||||||
DiagnosticFloatingInfo = { fg = c.diagnostic_info, bg = c.popup_info_bg },
|
|
||||||
DiagnosticFloatingHint = { fg = c.diagnostic_hint, bg = c.popup_hint_bg },
|
|
||||||
DiagnosticUnderlineError = { fg = c.diagnostic_error, undercurl = true },
|
|
||||||
DiagnosticUnderlineWarn = { fg = c.diagnostic_warn, undercurl = true },
|
|
||||||
DiagnosticUnderlineInfo = { fg = c.diagnostic_info, undercurl = true },
|
|
||||||
DiagnosticUnderlinehint = { fg = c.diagnostic_hint, undercurl = true },
|
|
||||||
|
|
||||||
DiagnosticSignError = { fg = c.diagnostic_error },
|
|
||||||
DiagnosticSignHint = { fg = c.diagnostic_hint },
|
|
||||||
DiagnosticSignInfo = { fg = c.diagnostic_info },
|
|
||||||
DiagnosticSignWarn = { fg = c.diagnostic_warning },
|
|
||||||
LineNr = { fg = c.dimmed, italic = true },
|
|
||||||
IndentLine = { fg = c.background },
|
|
||||||
IndentLineCurrent = { fg = c.dimmed },
|
|
||||||
TreesitterContext = { reverse = true },
|
|
||||||
TreesitterContextLineNumber = { bg = c.dimmed, reverse = true, italic = true },
|
|
||||||
InclineNormal = { bg = c.background },
|
|
||||||
InclineNormalNC = { bg = c.background },
|
|
||||||
|
|
||||||
WinSeparator = { bg = c.dialog_bg, fg = c.dialog_fg },
|
|
||||||
NormalFloat = { bg = c.dialog_bg, fg = c.dialog_fg },
|
|
||||||
Title = { fg = c.foreground, bold = true },
|
|
||||||
|
|
||||||
FloatBorder = { fg = c.dialog_fg },
|
|
||||||
FloatTitle = { fg = c.dialog_fg, bold = true },
|
|
||||||
|
|
||||||
MiniPickMatchCurrent = { bg = c.background, fg = c.foreground, reverse = true },
|
|
||||||
MiniStarterCurrent = { link = "MiniPickMatchCurrent" },
|
|
||||||
MiniClueNextKey = { bg = c.dialog_bg, fg = c.dialog_fg, bold = true },
|
|
||||||
MiniClueDescGroup = { bg = c.background, fg = c.foreground, italic = true },
|
|
||||||
MiniClueSeparator = { link = "NormalFloat" },
|
|
||||||
|
|
||||||
NoiceMini = { fg = c.foreground, italic = true },
|
|
||||||
|
|
||||||
TelescopeNormal = { fg = c.foreground, bg = c.background },
|
|
||||||
TelescopeBorder = { bold = true },
|
|
||||||
TelescopeSelection = { bg = c.selection },
|
|
||||||
TelescopeResultsNormal = { fg = c.foreground, bold = true },
|
|
||||||
TelescopeResultsComment = { fg = c.dimmed_subtle, italic = true, bold = false },
|
|
||||||
|
|
||||||
Visual = { bg = c.selection },
|
|
||||||
LspReferenceText = { fg = c.highlight_intense, undercurl = true },
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.cmd("hi clear")
|
|
||||||
|
|
||||||
if vim.fn.exists("syntax_on") == 1 then
|
|
||||||
vim.cmd("syntax reset")
|
|
||||||
end
|
|
||||||
|
|
||||||
for group, hl in pairs(theme) do
|
|
||||||
vim.api.nvim_set_hl(0, group, hl)
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.g.colors_name = "dieter"
|
|
|
@ -5,6 +5,7 @@ require('mini.ai').setup()
|
||||||
require('mini.align').setup()
|
require('mini.align').setup()
|
||||||
require('mini.bracketed').setup()
|
require('mini.bracketed').setup()
|
||||||
require('mini.comment').setup()
|
require('mini.comment').setup()
|
||||||
|
require('mini.completion').setup()
|
||||||
require('mini.diff').setup()
|
require('mini.diff').setup()
|
||||||
require('mini.extra').setup()
|
require('mini.extra').setup()
|
||||||
require('mini.icons').setup()
|
require('mini.icons').setup()
|
||||||
|
@ -21,44 +22,6 @@ require('mini.cursorword').setup({
|
||||||
delay = 800
|
delay = 800
|
||||||
})
|
})
|
||||||
|
|
||||||
require('mini.completion').setup({
|
|
||||||
window = {
|
|
||||||
info = { height = 25, width = 80, border = 'rounded' },
|
|
||||||
signature = { height = 25, width = 80, border = 'rounded' },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
local imap_expr = function(lhs, rhs)
|
|
||||||
vim.keymap.set('i', lhs, rhs, { expr = true })
|
|
||||||
end
|
|
||||||
imap_expr('<Tab>', [[pumvisible() ? "\<C-n>" : "\<Tab>"]])
|
|
||||||
imap_expr('<S-Tab>', [[pumvisible() ? "\<C-p>" : "\<S-Tab>"]])
|
|
||||||
|
|
||||||
local keycode = vim.keycode or function(x)
|
|
||||||
return vim.api.nvim_replace_termcodes(x, true, true, true)
|
|
||||||
end
|
|
||||||
local keys = {
|
|
||||||
['cr'] = keycode('<CR>'),
|
|
||||||
['ctrl-y'] = keycode('<C-y>'),
|
|
||||||
['ctrl-y_cr'] = keycode('<C-y><CR>'),
|
|
||||||
}
|
|
||||||
|
|
||||||
_G.cr_action = function()
|
|
||||||
if vim.fn.pumvisible() ~= 0 then
|
|
||||||
-- If popup is visible, confirm selected item or add new line otherwise
|
|
||||||
local item_selected = vim.fn.complete_info()['selected'] ~= -1
|
|
||||||
return item_selected and keys['ctrl-y'] or keys['ctrl-y_cr']
|
|
||||||
else
|
|
||||||
-- If popup is not visible, use plain `<CR>`. You might want to customize
|
|
||||||
-- according to other plugins. For example, to use 'mini.pairs', replace
|
|
||||||
-- next line with `return require('mini.pairs').cr()`
|
|
||||||
return keys['cr']
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set('i', '<CR>', 'v:lua._G.cr_action()', { expr = true })
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local hipatterns = require('mini.hipatterns')
|
local hipatterns = require('mini.hipatterns')
|
||||||
hipatterns.setup({
|
hipatterns.setup({
|
||||||
highlighters = {
|
highlighters = {
|
||||||
|
|
Loading…
Reference in a new issue