Compare commits

...

20 Commits

Author SHA1 Message Date
09bb156e47 Merge stash 2025-12-07 00:46:32 +01:00
Robert Kmiec
1437d1826e Nvim: update config for lsp and add few minor plugins 2025-12-05 10:46:37 +00:00
Robert Kmieć
2aa4027f9d Nvim: add two new plugins hardtime, yadm 2025-06-28 23:55:49 +02:00
Robert Kmieć
704a095798 Nvim: add minuet and some other stuff 2025-06-12 22:43:41 +02:00
Robert Kmieć
04bdd470fd Git: Improve defaults 2025-06-12 22:43:41 +02:00
Robert Kmieć
3e2ee388e6 Awesome: add some minor adjustment to workflow 2025-06-12 22:43:41 +02:00
Robert Kmieć
ee2bbcf84f Nvim: add new shadow colorscheme 2025-04-23 21:56:21 +02:00
Robert Kmieć
c665c5ba37 Nvim: Update all plugins 2025-04-23 01:37:19 +02:00
Robert Kmieć
43e7fb01f5 Git: add gitmessage to gitignore 2025-04-23 01:32:05 +02:00
Robert Kmieć
6f0948c365 Nvim: improve blink and inlay hints, add heirline 2025-02-07 11:38:51 +01:00
Robert Kmieć
ec21773823 Nvim: add back codecompanion and add replace (Subvert) 2025-02-07 11:37:42 +01:00
Robert Kmieć
4ebfe540ad Nvim: use blink instead of cmp 2025-01-10 11:10:51 +01:00
Robert Kmieć
f6ecd9592c Nvim: use proper branches for colorschemes
disable image.nvim
2024-09-23 22:10:56 +02:00
Robert Kmieć
fcecb7f575 Nvim: update treesitter and use themify 2024-09-06 09:36:15 +02:00
Robert Kmieć
801ba0dfdf Nvim: new pugins + some disabled ones
Some experiments with AI
2024-08-06 23:55:21 +02:00
Robert Kmieć
0daaf4add5 Nvim: replace neodev with lazydev 2024-06-06 22:51:44 +02:00
Robert Kmieć
14cf97683d Nvim: minor tweaks for multiple plugins, better folds 2024-06-03 23:36:36 +02:00
Robert Kmieć
27eda40ccb Nvim: new plugins 2024-06-03 23:34:22 +02:00
Robert Kmieć
063a693f19 Nvim: switch from nvim-cmp to epo 2024-05-23 00:13:18 +02:00
Robert Kmieć
6cfad76308 Nvim: add git-dev 2024-05-22 23:49:24 +02:00
70 changed files with 2395 additions and 1239 deletions

View File

@@ -1,5 +1,9 @@
Xft.dpi: 96 Xft.dpi: 96
Xcursor.size: 16 Xcursor.size: 6
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.hintstyle: hintslight
! URxvt ! URxvt
URxvt.font:xft:iM WritingMonoS Nerd Font:size=12 URxvt.font:xft:iM WritingMonoS Nerd Font:size=12
URxvt.boldFont:xft:iM WritingMonoS Nerd Font:size=12:style=bold URxvt.boldFont:xft:iM WritingMonoS Nerd Font:size=12:style=bold

View File

@@ -12,39 +12,24 @@ local wibox = require("wibox")
local beautiful = require("beautiful") local beautiful = require("beautiful")
-- Notification library -- Notification library
local naughty = require("naughty") local naughty = require("naughty")
-- Declarative object management
local ruled = require("ruled")
local menubar = require("menubar") local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup") local hotkeys_popup = require("awful.hotkeys_popup")
-- Enable hotkeys help widget for VIM and other apps -- Enable hotkeys help widget for VIM and other apps
-- when client with a matching name is opened: -- when client with a matching name is opened:
require("awful.hotkeys_popup.keys") require("awful.hotkeys_popup.keys")
-- Load Debian menu entries
local debian = require("debian.menu")
local has_fdo, freedesktop = pcall(require, "freedesktop")
-- {{{ Error handling -- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to -- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config) -- another config (This code will only ever execute for the fallback config)
if awesome.startup_errors then naughty.connect_signal("request::display_error", function(message, startup)
naughty.notify({ preset = naughty.config.presets.critical, naughty.notification {
title = "Oops, there were errors during startup!", urgency = "critical",
text = awesome.startup_errors }) title = "Oops, an error happened"..(startup and " during startup!" or "!"),
end message = message
}
-- Handle runtime errors after startup
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
-- Make sure we don't go into an endless error loop
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = tostring(err) })
in_error = false
end) end)
end
-- }}} -- }}}
-- {{{ Variable definitions -- {{{ Variable definitions
@@ -52,7 +37,7 @@ end
beautiful.init(gears.filesystem.get_configuration_dir() .. "my_theme.lua") beautiful.init(gears.filesystem.get_configuration_dir() .. "my_theme.lua")
-- This is used later as the default terminal and editor to run. -- This is used later as the default terminal and editor to run.
terminal = "/home/kmcr/.cargo/bin/alacritty" terminal = "/home/rkmiec/.cargo/bin/alacritty"
editor = os.getenv("EDITOR") or "neovide" editor = os.getenv("EDITOR") or "neovide"
editor_cmd = terminal .. " -e " .. editor editor_cmd = terminal .. " -e " .. editor
@@ -62,26 +47,6 @@ editor_cmd = terminal .. " -e " .. editor
-- I suggest you to remap Mod4 to another key using xmodmap or other tools. -- I suggest you to remap Mod4 to another key using xmodmap or other tools.
-- However, you can use another modifier like Mod1, but it may interact with others. -- However, you can use another modifier like Mod1, but it may interact with others.
modkey = "Mod4" modkey = "Mod4"
-- Table of layouts to cover with awful.layout.inc, order matters.
awful.layout.layouts = {
awful.layout.suit.floating,
awful.layout.suit.tile,
awful.layout.suit.tile.left,
-- awful.layout.suit.tile.bottom,
-- awful.layout.suit.tile.top,
-- awful.layout.suit.fair,
-- awful.layout.suit.fair.horizontal,
-- awful.layout.suit.spiral,
-- awful.layout.suit.spiral.dwindle,
awful.layout.suit.max,
awful.layout.suit.max.fullscreen,
-- awful.layout.suit.magnifier,
-- awful.layout.suit.corner.nw,
-- awful.layout.suit.corner.ne,
-- awful.layout.suit.corner.sw,
-- awful.layout.suit.corner.se,
}
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
@@ -97,20 +62,12 @@ myawesomemenu = {
local menu_awesome = { "awesome", myawesomemenu, beautiful.awesome_icon } local menu_awesome = { "awesome", myawesomemenu, beautiful.awesome_icon }
local menu_terminal = { "open terminal", terminal } local menu_terminal = { "open terminal", terminal }
if has_fdo then
mymainmenu = freedesktop.menu.build({
before = { menu_awesome },
after = { menu_terminal }
})
else
mymainmenu = awful.menu({ mymainmenu = awful.menu({
items = { items = {
menu_awesome, menu_awesome,
{ "Debian", debian.menu.Debian_menu.Debian },
menu_terminal, menu_terminal,
} }
}) })
end
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
@@ -120,10 +77,53 @@ mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
menubar.utils.terminal = terminal -- Set the terminal for applications that require it menubar.utils.terminal = terminal -- Set the terminal for applications that require it
-- }}} -- }}}
-- {{{ Tag layout
-- Table of layouts to cover with awful.layout.inc, order matters.
tag.connect_signal("request::default_layouts", function()
awful.layout.append_default_layouts({
awful.layout.suit.floating,
awful.layout.suit.tile,
awful.layout.suit.tile.left,
-- awful.layout.suit.tile.bottom,
-- awful.layout.suit.tile.top,
-- awful.layout.suit.fair,
-- awful.layout.suit.fair.horizontal,
-- awful.layout.suit.spiral,
-- awful.layout.suit.spiral.dwindle,
awful.layout.suit.max,
awful.layout.suit.max.fullscreen,
-- awful.layout.suit.magnifier,
-- awful.layout.suit.corner.nw,
})
end)
-- }}}
-- {{{ Wallpaper
screen.connect_signal("request::wallpaper", function(s)
-- awful.wallpaper {
-- screen = s,
-- widget = {
-- {
-- image = beautiful.wallpaper,
-- upscale = true,
-- downscale = true,
-- widget = wibox.widget.imagebox,
-- },
-- valign = "center",
-- halign = "center",
-- tiled = false,
-- widget = wibox.container.tile,
-- }
-- }
awful.spawn.single_instance("feh --bg-scale /home/rkmiec/Downloads/a45eca3302b5d07d7f95b57f1df52f96.webp")
end)
-- }}}
-- {{{ Wibar
-- Keyboard map indicator and switcher -- Keyboard map indicator and switcher
mykeyboardlayout = awful.widget.keyboardlayout() mykeyboardlayout = awful.widget.keyboardlayout()
-- {{{ Wibar
-- Create a textclock widget -- Create a textclock widget
mytextclock = wibox.widget { mytextclock = wibox.widget {
format = "%a %y %m %_d - %_H %M %S", format = "%a %y %m %_d - %_H %M %S",
@@ -131,8 +131,35 @@ mytextclock = wibox.widget {
widget = wibox.widget.textclock widget = wibox.widget.textclock
} }
-- Create a wibox for each screen and add it screen.connect_signal("request::desktop_decoration", function(s)
local taglist_buttons = gears.table.join( -- Each screen has its own tag table.
if s.index == 1 then
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[3])
else
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[2])
end
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
-- Create an imagebox widget which will contain an icon indicating which layout we're using.
-- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox {
screen = s,
buttons = {
awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc(-1) end),
awful.button({ }, 5, function () awful.layout.inc( 1) end),
}
}
-- Create a taglist widget
s.mytaglist = awful.widget.taglist {
screen = s,
filter = awful.widget.taglist.filter.all,
--widget = wibox.container.rotate,
buttons = {
awful.button({ }, 1, function(t) t:view_only() end), awful.button({ }, 1, function(t) t:view_only() end),
awful.button({ modkey }, 1, function(t) awful.button({ modkey }, 1, function(t)
if client.focus then if client.focus then
@@ -145,74 +172,23 @@ local taglist_buttons = gears.table.join(
client.focus:toggle_tag(t) client.focus:toggle_tag(t)
end end
end), end),
awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end), awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end) awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end),
) }
}
local tasklist_buttons = gears.table.join( -- Create a tasklist widget
awful.button({ }, 1, function (c) s.mytasklist = awful.widget.tasklist {
if c == client.focus then
c.minimized = true
else
c:emit_signal(
"request::activate",
"tasklist",
{raise = true}
)
end
end),
awful.button({ }, 3, function()
awful.menu.client_list({ theme = { width = 250 } })
end),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
end))
local function set_wallpaper(s)
-- Wallpaper
if beautiful.wallpaper then
local wallpaper = beautiful.wallpaper
-- If wallpaper is a function, call it with the screen
if type(wallpaper) == "function" then
wallpaper = wallpaper(s)
end
gears.wallpaper.maximized(wallpaper, s, true)
end
end
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
screen.connect_signal("property::geometry", set_wallpaper)
awful.screen.connect_for_each_screen(function(s)
-- Wallpaper
set_wallpaper(s)
-- Each screen has its own tag table.
if s.index == 1 then
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[3])
else
awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[2])
end
-- Create a promptbox for each screen
s.mypromptbox = awful.widget.prompt()
-- Create an imagebox widget which will contain an icon indicating which layout we're using.
-- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(gears.table.join(
awful.button({ }, 1, function () awful.layout.inc( 1) end),
awful.button({ }, 3, function () awful.layout.inc(-1) end),
awful.button({ }, 4, function () awful.layout.inc( 1) end),
awful.button({ }, 5, function () awful.layout.inc(-1) end)))
-- Create a taglist widget
s.mytaglist = awful.widget.taglist {
screen = s, screen = s,
filter = awful.widget.taglist.filter.all, filter = awful.widget.tasklist.filter.currenttags,
buttons = taglist_buttons, buttons = {
layout = wibox.layout.fixed.vertical, awful.button({ }, 1, function (c)
c:activate { context = "tasklist", action = "toggle_minimization" }
end),
awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250 } } end),
awful.button({ }, 4, function() awful.client.focus.byidx(-1) end),
awful.button({ }, 5, function() awful.client.focus.byidx( 1) end),
}
} }
-- Create the wibox -- Create the wibox
@@ -237,7 +213,6 @@ awful.screen.connect_for_each_screen(function(s)
direction = s.rotation, direction = s.rotation,
widget = wibox.container.rotate widget = wibox.container.rotate
} }
-- Add widgets to the wibox -- Add widgets to the wibox
s.mywibox:setup { s.mywibox:setup {
layout = wibox.layout.align.vertical, layout = wibox.layout.align.vertical,
@@ -257,27 +232,61 @@ awful.screen.connect_for_each_screen(function(s)
}, },
} }
end) end)
-- }}} -- }}}
-- {{{ Mouse bindings -- {{{ Mouse bindings
root.buttons(gears.table.join( awful.mouse.append_global_mousebindings({
awful.button({ }, 3, function () mymainmenu:toggle() end), awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext), awful.button({ }, 4, awful.tag.viewprev),
awful.button({ }, 5, awful.tag.viewprev) awful.button({ }, 5, awful.tag.viewnext),
)) })
-- }}} -- }}}
-- {{{ Key bindings -- {{{ Key bindings
globalkeys = gears.table.join(
-- General Awesome keys
awful.keyboard.append_global_keybindings({
awful.key({ modkey, }, "s", hotkeys_popup.show_help, awful.key({ modkey, }, "s", hotkeys_popup.show_help,
{description="show help", group="awesome"}), {description="show help", group="awesome"}),
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
{description = "show main menu", group = "awesome"}),
awful.key({ modkey, "Control" }, "r", awesome.restart,
{description = "reload awesome", group = "awesome"}),
awful.key({ modkey, "Shift" }, "c", awesome.quit,
{description = "quit awesome", group = "awesome"}),
-- awful.key({ modkey }, "y",
-- function ()
-- awful.prompt.run {
-- prompt = "Run Lua code: ",
-- textbox = awful.screen.focused().mypromptbox.widget,
-- exe_callback = awful.util.eval,
-- history_path = awful.util.get_cache_dir() .. "/history_eval"
-- }
-- end,
-- {description = "lua execute prompt", group = "awesome"}),
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
{description = "open a terminal", group = "launcher"}),
-- awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
-- {description = "run prompt", group = "launcher"}),
awful.key({ modkey, }, "d", function () awful.spawn(terminal) end,
{description = "open a terminal", group = "launcher"}),
awful.key({ modkey }, "p", function() menubar.show() end,
{description = "show the menubar", group = "launcher"}),
})
-- Tags related keybindings
awful.keyboard.append_global_keybindings({
awful.key({ modkey, }, "Left", awful.tag.viewprev, awful.key({ modkey, }, "Left", awful.tag.viewprev,
{description = "view previous", group = "tag"}), {description = "view previous", group = "tag"}),
awful.key({ modkey, }, "Right", awful.tag.viewnext, awful.key({ modkey, }, "Right", awful.tag.viewnext,
{description = "view next", group = "tag"}), {description = "view next", group = "tag"}),
awful.key({ modkey, }, "Escape", awful.tag.history.restore, awful.key({ modkey, }, "Escape", awful.tag.history.restore,
{description = "go back", group = "tag"}), {description = "go back", group = "tag"}),
})
-- Focus related keybindings
awful.keyboard.append_global_keybindings({
awful.key({ modkey, }, "j", awful.key({ modkey, }, "j",
function () function ()
awful.client.focus.byidx( 1) awful.client.focus.byidx( 1)
@@ -290,20 +299,6 @@ globalkeys = gears.table.join(
end, end,
{description = "focus previous by index", group = "client"} {description = "focus previous by index", group = "client"}
), ),
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
{description = "show main menu", group = "awesome"}),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
{description = "swap with next client by index", group = "client"}),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
{description = "swap with previous client by index", group = "client"}),
awful.key({ modkey, }, "h", function () awful.screen.focus_relative( 1) end,
{description = "focus the next screen", group = "screen"}),
awful.key({ modkey, }, "l", function () awful.screen.focus_relative(-1) end,
{description = "focus the previous screen", group = "screen"}),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
{description = "jump to urgent client", group = "client"}),
awful.key({ modkey, }, "Tab", awful.key({ modkey, }, "Tab",
function () function ()
awful.client.focus.history.previous() awful.client.focus.history.previous()
@@ -312,15 +307,29 @@ globalkeys = gears.table.join(
end end
end, end,
{description = "go back", group = "client"}), {description = "go back", group = "client"}),
awful.key({ modkey, "Control" }, "h", function () awful.screen.focus_relative( 1) end,
{description = "focus the next screen", group = "screen"}),
awful.key({ modkey, "Control" }, "l", function () awful.screen.focus_relative(-1) end,
{description = "focus the previous screen", group = "screen"}),
awful.key({ modkey, "Control" }, "n",
function ()
local c = awful.client.restore()
-- Focus restored client
if c then
c:activate { raise = true, context = "key.unminimize" }
end
end,
{description = "restore minimized", group = "client"}),
})
-- Standard program -- Layout related keybindings
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, awful.keyboard.append_global_keybindings({
{description = "open a terminal", group = "launcher"}), awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
awful.key({ modkey, "Control" }, "r", awesome.restart, {description = "swap with next client by index", group = "client"}),
{description = "reload awesome", group = "awesome"}), awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end,
awful.key({ modkey, "Shift" }, "c", awesome.quit, {description = "swap with previous client by index", group = "client"}),
{description = "quit awesome", group = "awesome"}), awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
{description = "jump to urgent client", group = "client"}),
awful.key({ modkey, "Control" }, "j", function () awful.tag.incmwfact( 0.05) end, awful.key({ modkey, "Control" }, "j", function () awful.tag.incmwfact( 0.05) end,
{description = "increase master width factor", group = "layout"}), {description = "increase master width factor", group = "layout"}),
awful.key({ modkey, "Control" }, "k", function () awful.tag.incmwfact(-0.05) end, awful.key({ modkey, "Control" }, "k", function () awful.tag.incmwfact(-0.05) end,
@@ -337,39 +346,94 @@ globalkeys = gears.table.join(
{description = "select next", group = "layout"}), {description = "select next", group = "layout"}),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
{description = "select previous", group = "layout"}), {description = "select previous", group = "layout"}),
})
awful.key({ modkey, "Control" }, "n",
function () awful.keyboard.append_global_keybindings({
local c = awful.client.restore() awful.key {
-- Focus restored client modifiers = { modkey },
if c then keygroup = "numrow",
c:emit_signal( description = "only view tag",
"request::activate", "key.unminimize", {raise = true} group = "tag",
) on_press = function (index)
local screen = awful.screen.focused()
local tag = screen.tags[index]
if tag then
tag:view_only()
end end
end, end,
{description = "restore minimized", group = "client"}), },
awful.key {
modifiers = { modkey, "Control" },
keygroup = "numrow",
description = "toggle tag",
group = "tag",
on_press = function (index)
local screen = awful.screen.focused()
local tag = screen.tags[index]
if tag then
awful.tag.viewtoggle(tag)
end
end,
},
awful.key {
modifiers = { modkey, "Shift" },
keygroup = "numrow",
description = "move focused client to tag",
group = "tag",
on_press = function (index)
if client.focus then
local tag = client.focus.screen.tags[index]
if tag then
client.focus:move_to_tag(tag)
end
end
end,
},
awful.key {
modifiers = { modkey, "Control", "Shift" },
keygroup = "numrow",
description = "toggle focused client on tag",
group = "tag",
on_press = function (index)
if client.focus then
local tag = client.focus.screen.tags[index]
if tag then
client.focus:toggle_tag(tag)
end
end
end,
},
awful.key {
modifiers = { modkey },
keygroup = "numpad",
description = "select layout directly",
group = "layout",
on_press = function (index)
local t = awful.screen.focused().selected_tag
if t then
t.layout = t.layouts[index] or t.layout
end
end,
}
})
-- -- Prompt client.connect_signal("request::default_mousebindings", function()
-- awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, awful.mouse.append_client_mousebindings({
-- {description = "run prompt", group = "launcher"}), awful.button({ }, 1, function (c)
c:activate { context = "mouse_click" }
end),
awful.button({ modkey }, 1, function (c)
c:activate { context = "mouse_click", action = "mouse_move" }
end),
awful.button({ modkey }, 3, function (c)
c:activate { context = "mouse_click", action = "mouse_resize"}
end),
})
end)
-- awful.key({ modkey }, "y", client.connect_signal("request::default_keybindings", function()
-- function () awful.keyboard.append_client_keybindings({
-- awful.prompt.run {
-- prompt = "Run Lua code: ",
-- textbox = awful.screen.focused().mypromptbox.widget,
-- exe_callback = awful.util.eval,
-- history_path = awful.util.get_cache_dir() .. "/history_eval"
-- }
-- end,
-- {description = "lua execute prompt", group = "awesome"}),
-- Menubar
awful.key({ modkey }, "p", function() menubar.show() end,
{description = "show the menubar", group = "launcher"})
)
clientkeys = gears.table.join(
awful.key({ modkey, }, "f", awful.key({ modkey, }, "f",
function (c) function (c)
c.fullscreen = not c.fullscreen c.fullscreen = not c.fullscreen
@@ -410,112 +474,39 @@ clientkeys = gears.table.join(
c.maximized_horizontal = not c.maximized_horizontal c.maximized_horizontal = not c.maximized_horizontal
c:raise() c:raise()
end , end ,
{description = "(un)maximize horizontally", group = "client"}) {description = "(un)maximize horizontally", group = "client"}),
) })
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it work on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, 9 do
globalkeys = gears.table.join(globalkeys,
-- View tag only.
awful.key({ modkey }, "#" .. i + 9,
function ()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
tag:view_only()
end
end,
{description = "view tag #"..i, group = "tag"}),
-- Toggle tag display.
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
awful.tag.viewtoggle(tag)
end
end,
{description = "toggle tag #" .. i, group = "tag"}),
-- Move client to tag.
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:move_to_tag(tag)
end
end
end,
{description = "move focused client to tag #"..i, group = "tag"}),
-- Toggle tag on focused client.
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
function ()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:toggle_tag(tag)
end
end
end,
{description = "toggle focused client on tag #" .. i, group = "tag"})
)
end
clientbuttons = gears.table.join(
awful.button({ }, 1, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
end),
awful.button({ modkey }, 1, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
awful.mouse.client.move(c)
end),
awful.button({ modkey }, 3, function (c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
awful.mouse.client.resize(c)
end) end)
)
-- Set keys
root.keys(globalkeys)
-- }}} -- }}}
-- {{{ Rules -- {{{ Rules
-- Rules to apply to new clients (through the "manage" signal). -- Rules to apply to new clients.
awful.rules.rules = { ruled.client.connect_signal("request::rules", function()
-- All clients will match this rule. -- All clients will match this rule.
{ rule = { }, ruled.client.append_rule {
properties = { border_width = beautiful.border_width, id = "global",
border_color = beautiful.border_normal, rule = { },
properties = {
focus = awful.client.focus.filter, focus = awful.client.focus.filter,
raise = true, raise = true,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred, screen = awful.screen.preferred,
placement = awful.placement.no_overlap+awful.placement.no_offscreen placement = awful.placement.no_overlap+awful.placement.no_offscreen
} }
}, }
-- Floating clients. -- Floating clients.
{ rule_any = { ruled.client.append_rule {
id = "floating",
rule_any = {
instance = { instance = {
"DTA", -- Firefox addon DownThemAll. "DTA", -- Firefox addon DownThemAll.
"copyq", -- Includes session name in class. "copyq", -- Includes session name in class.
"pinentry", "pinentry", },
},
class = { class = {
"Arandr", "Arandr", "Blueman-manager", "Gpick", "Sxiv",
"Blueman-manager", "Tor Browser", "Wpa_gui", "veromix", "xtightvncviewer"
"Gpick", },
"Kruler",
"MessageWin", -- kalarm.
"Sxiv",
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
"Wpa_gui",
"veromix",
"xtightvncviewer"},
-- Note that the name property shown in xprop might be set slightly after creation of the client -- Note that the name property shown in xprop might be set slightly after creation of the client
-- and the name shown there might not match defined rules here. -- and the name shown there might not match defined rules here.
name = { name = {
@@ -526,12 +517,16 @@ awful.rules.rules = {
"ConfigManager", -- Thunderbird's about:config. "ConfigManager", -- Thunderbird's about:config.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools. "pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
} }
}, properties = { floating = true }}, },
properties = { floating = true }
}
-- Add titlebars to normal clients and dialogs -- Add titlebars to normal clients and dialogs
{ rule_any = {type = { "normal", "dialog" } ruled.client.append_rule {
}, properties = { titlebars_enabled = false } id = "titlebars",
}, rule_any = { type = { "normal", "dialog" } },
properties = { titlebars_enabled = false }
}
-- Set Firefox to always map on the tag named "1" on screen 1 and disable -- Set Firefox to always map on the tag named "1" on screen 1 and disable
-- title for that window -- title for that window
@@ -541,39 +536,23 @@ awful.rules.rules = {
-- properties = { screen = 1, tag = "1", titlebars_enabled = false } }, -- properties = { screen = 1, tag = "1", titlebars_enabled = false } },
--{ rule = { class = "Google-chrome-beta" }, --{ rule = { class = "Google-chrome-beta" },
-- properties = { screen = 1, tag = "1", titlebars_enabled = false } }, -- properties = { screen = 1, tag = "1", titlebars_enabled = false } },
} end)
-- }}} -- }}}
-- {{{ Signals -- {{{ Titlebars
-- Signal function to execute when a new client appears.
client.connect_signal("manage", function (c)
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- if not awesome.startup then awful.client.setslave(c) end
if awesome.startup
and not c.size_hints.user_position
and not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
end)
-- Add a titlebar if titlebars_enabled is set to true in the rules. -- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c) client.connect_signal("request::titlebars", function(c)
-- buttons for the titlebar -- buttons for the titlebar
local buttons = gears.table.join( local buttons = {
awful.button({ }, 1, function() awful.button({ }, 1, function()
c:emit_signal("request::activate", "titlebar", {raise = true}) c:activate { context = "titlebar", action = "mouse_move" }
awful.mouse.client.move(c)
end), end),
awful.button({ }, 3, function() awful.button({ }, 3, function()
c:emit_signal("request::activate", "titlebar", {raise = true}) c:activate { context = "titlebar", action = "mouse_resize"}
awful.mouse.client.resize(c) end),
end) }
)
awful.titlebar(c) : setup { awful.titlebar(c).widget = {
{ -- Left { -- Left
awful.titlebar.widget.iconwidget(c), awful.titlebar.widget.iconwidget(c),
buttons = buttons, buttons = buttons,
@@ -581,7 +560,7 @@ client.connect_signal("request::titlebars", function(c)
}, },
{ -- Middle { -- Middle
{ -- Title { -- Title
align = "center", halign = "center",
widget = awful.titlebar.widget.titlewidget(c) widget = awful.titlebar.widget.titlewidget(c)
}, },
buttons = buttons, buttons = buttons,
@@ -598,15 +577,34 @@ client.connect_signal("request::titlebars", function(c)
layout = wibox.layout.align.horizontal layout = wibox.layout.align.horizontal
} }
end) end)
-- }}}
-- {{{ Notifications
ruled.notification.connect_signal('request::rules', function()
-- All notifications will match this rule.
ruled.notification.append_rule {
rule = { },
properties = {
screen = awful.screen.preferred,
implicit_timeout = 5,
}
}
end)
naughty.connect_signal("request::display", function(n)
naughty.layout.box { notification = n }
end)
-- }}}
-- Enable sloppy focus, so that focus follows mouse. -- Enable sloppy focus, so that focus follows mouse.
client.connect_signal("mouse::enter", function(c) client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", {raise = false}) c:activate { context = "mouse_enter", raise = false }
end) end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}
awful.spawn.with_shell( awful.spawn.with_shell(
'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' .. 'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' ..
@@ -620,11 +618,11 @@ do
{ {
"xset b off", "xset b off",
"xdotool key --clearmodifiers Num_Lock", "xdotool key --clearmodifiers Num_Lock",
"autorandr -c", --"autorandr -c",
"pasystray -m 100", "pasystray -m 100",
"cbatticon", --"cbatticon",
"barrierc --disable-crypto 192.168.10.2:24800", --"barrierc --disable-crypto 192.168.10.2:24800",
"xbindkeys -f /home/kmcr/.config/xbindkeysrc", "xbindkeys -f /home/rkmiec/.config/xbindkeysrc",
} }
for _,i in ipairs(cmds_once) do for _,i in ipairs(cmds_once) do
awful.spawn(i) awful.spawn(i)
@@ -632,10 +630,10 @@ do
--"dunst -config /home/kmcr/.config/i3/dunst_config", --"dunst -config /home/kmcr/.config/i3/dunst_config",
local cmds_single_instance = local cmds_single_instance =
{ {
"nm-applet", --"nm-applet",
"blueman-applet", "blueman-applet",
"flameshot", "flameshot",
"feh --no-xinerama --bg-scale /home/kmcr/.config/i3/wallpaper.jpg", "feh --bg-scale /home/rkmiec/Downloads/a45eca3302b5d07d7f95b57f1df52f96.webp",
} }
for _,i in ipairs(cmds_single_instance) do for _,i in ipairs(cmds_single_instance) do
awful.spawn.single_instance(i) awful.spawn.single_instance(i)

View File

@@ -1,2 +1,3 @@
.ackrc .ackrc
.notags .notags
.gitmessage

View File

@@ -1,29 +0,0 @@
# start a terminal
bindsym Mod4+t exec ~/.cargo/bin/alacritty
# Use pulseaudio-ctl to adjust volume in PulseAudio.
bindsym XF86AudioRaiseVolume exec pulseaudio-ctl up && $refresh_i3status
bindsym XF86AudioLowerVolume exec pulseaudio-ctl down && $refresh_i3status
bindsym XF86AudioMute exec pulseaudio-ctl mute && $refresh_i3status
bindsym XF86AudioMicMute exec pulseaudio-ctl mute-input
bindsym XF86AudioPlay exec playerctl --ignore-player=chromium play-pause
bindsym XF86AudioPause exec playerctl --ignore-player=chromium play-pause
bindsym XF86AudioStop exec playerctl --ignore-player=chromium stop
bindsym XF86AudioNext exec playerctl --ignore-player=chromium next
bindsym XF86AudioPrev exec playerctl --ignore-player=chromium previous
bindsym XF86Calculator exec --no-startup-id gnome-calculator
# System state management
bindsym Pause exec systemctl suspend
bindsym Mod4+z exec i3lock -c 151515 -e -f
# Screen brightness controls
bindsym Mod1+Up exec brightnessctl s 5\%+
bindsym Mod1+Down exec brightnessctl s 5\%-
# start rofi (a program launcher)
bindsym Mod4+d exec --no-startup-id "rofi -show run"
bindsym Mod4+Shift+d exec --no-startup-id "rofi -show window"
bindsym Mod1+Tab exec --no-startup-id "rofi -show window"
bindsym Mod4+ctrl+d exec rofi-pass

View File

@@ -1,28 +0,0 @@
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
exec setxkbmap pl
exec --no-startup-id dunst -config ~/.config/i3/dunst_config
exec --no-startup-id pasystray -m 100
exec --no-startup-id blueman-applet
exec --no-startup-id xset b off
exec --no-startup-id flameshot
exec --no-startup-id autorandr -c
exec --no-startup-id wal -n -i ~/.config/i3/wallpaper.jpg
exec --no-startup-id feh --no-xinerama --bg-scale ~/.config/i3/wallpaper.jpg
exec --no-startup-id xdotool key --clearmodifiers Num_Lock
#exec --no-startup-id unclutter # generates some issues on work laptop
#exec --no-startup-id barriers -c ~/.config/barrier.conf --screen-change-script ~/.local/bin/switch_pc.sh
exec --no-startup-id barrierc 192.168.10.2:24800

View File

@@ -1,14 +1,8 @@
# i3 config file (v4) # i3 config file (v4)
# #
# Please see https://i3wm.org/docs/userguide.html for a complete reference! # Please see https://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#
set $mod Mod4
set_from_resource $main_color i3wm.color1 #fdff00 set_from_resource $main_color i3wm.color1 #fdff00
set_from_resource $secondary_color i3wm.color0 #98d1ce set_from_resource $secondary_color i3wm.color0 #98d1ce
set_from_resource $bg_color i3wm.color4 #0c1014 set_from_resource $bg_color i3wm.color4 #0c1014
@@ -18,14 +12,14 @@ set $refresh_i3status killall -SIGUSR1 i3status-rs
# Font for window titles. Will also be used by the bar unless a different font # Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below. # is used in the bar {} block below.
font Monoid Nerd Font 9 font pango:CommitMonotuned 9
# This font is widely installed, provides lots of unicode glyphs, right-to-left # This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango). # text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8 #font pango:DejaVu Sans Mono 8
include conf.d/exec.conf include exec.conf
include conf.d/binds.conf #include binds.conf
# use these keys for focus, movement, and resize directions when reaching for # use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient # the arrows is not convenient
@@ -34,68 +28,84 @@ set $down j
set $up k set $up k
set $right l set $right l
# use Mouse+Mod4 to drag floating windows to their wanted position # use Mouse+$mod to drag floating windows to their wanted position
floating_modifier Mod4 floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
tiling_drag modifier titlebar
# start a terminal
set $TERMINAL ~/.cargo/bin/wezterm
bindsym $mod+t exec $TERMINAL
# kill focused window # kill focused window
bindsym Mod4+Shift+q kill bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec --no-startup-id dmenu_run
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# change focus # change focus
bindsym Mod4+$left focus left bindsym $mod+$left focus left
bindsym Mod4+$down focus down bindsym $mod+$down focus down
bindsym Mod4+$up focus up bindsym $mod+$up focus up
bindsym Mod4+$right focus right bindsym $mod+$right focus right
# alternatively, you can use the cursor keys: # alternatively, you can use the cursor keys:
bindsym Mod4+Left focus left bindsym $mod+Left focus left
bindsym Mod4+Down focus down bindsym $mod+Down focus down
bindsym Mod4+Up focus up bindsym $mod+Up focus up
bindsym Mod4+Right focus right bindsym $mod+Right focus right
# move focused window # move focused window
bindsym Mod4+Shift+$left move left bindsym $mod+Shift+$left move left
bindsym Mod4+Shift+$down move down bindsym $mod+Shift+$down move down
bindsym Mod4+Shift+$up move up bindsym $mod+Shift+$up move up
bindsym Mod4+Shift+$right move right bindsym $mod+Shift+$right move right
# alternatively, you can use the cursor keys: # alternatively, you can use the cursor keys:
bindsym Mod4+Shift+Left move left bindsym $mod+Shift+Left move left
bindsym Mod4+Shift+Down move down bindsym $mod+Shift+Down move down
bindsym Mod4+Shift+Up move up bindsym $mod+Shift+Up move up
bindsym Mod4+Shift+Right move right bindsym $mod+Shift+Right move right
# split in horizontal orientation # split in horizontal orientation
bindsym Mod4+b split h bindsym $mod+semicolon split h
# split in vertical orientation # split in vertical orientation
bindsym Mod4+v split v bindsym $mod+v split v
# enter fullscreen mode for the focused container # enter fullscreen mode for the focused container
bindsym Mod4+f fullscreen toggle bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split) # change container layout (stacked, tabbed, toggle split)
bindsym Mod4+q layout stacking bindsym $mod+q layout stacking
bindsym Mod4+w layout tabbed bindsym $mod+w layout tabbed
bindsym Mod4+e layout toggle split bindsym $mod+e layout toggle split
# toggle tiling / floating # toggle tiling / floating
bindsym Mod4+Shift+space floating toggle bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows # change focus between tiling / floating windows
bindsym Mod4+space focus mode_toggle bindsym $mod+space focus mode_toggle
# focus the parent container # focus the parent container
bindsym Mod4+a focus parent bindsym $mod+a focus parent
# focus the child container # focus the child container
#bindsym Mod4+d focus child #bindsym $mod+d focus child
# move the currently focused window to the scratchpad # move the currently focused window to the scratchpad
bindsym Mod4+m move scratchpad bindsym $mod+m move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window. # Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them. # If there are multiple scratchpad windows, this command cycles through them.
bindsym Mod4+s scratchpad show bindsym $mod+s scratchpad show
# Define names for default workspaces for which we configure key bindings later on. # Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places. # We use variables to avoid repeating the names in multiple places.
@@ -109,90 +119,38 @@ set $ws7 " 7 "
set $ws8 " 8 " set $ws8 " 8 "
set $ws9 " 9 " set $ws9 " 9 "
set $ws10 " 10 " set $ws10 " 10 "
set $ws11 " 11 "
set $ws12 " 12 "
set $ws13 " 13 "
set $ws14 " 14 "
set $ws15 " 15 "
set $ws16 " 16 "
set $ws17 " 17 "
set $ws18 " 18 "
set $ws19 " 19 "
set $ws20 " 20 "
workspace $ws1 output $output_main
workspace $ws2 output $output_main
workspace $ws3 output $output_main
workspace $ws4 output $output_main
workspace $ws5 output $output_main
workspace $ws6 output $output_main
workspace $ws7 output $output_main
workspace $ws8 output $output_main
workspace $ws9 output $output_main
workspace $ws10 output $output_main
workspace $ws11 output $output_secondary
workspace $ws12 output $output_secondary
workspace $ws13 output $output_secondary
workspace $ws14 output $output_secondary
workspace $ws15 output $output_secondary
workspace $ws16 output $output_secondary
workspace $ws17 output $output_secondary
workspace $ws18 output $output_secondary
workspace $ws19 output $output_secondary
workspace $ws20 output $output_secondary
# switch to workspace # switch to workspace
bindsym Mod4+1 workspace number $ws1 bindsym $mod+1 workspace number $ws1
bindsym Mod4+2 workspace number $ws2 bindsym $mod+2 workspace number $ws2
bindsym Mod4+3 workspace number $ws3 bindsym $mod+3 workspace number $ws3
bindsym Mod4+4 workspace number $ws4 bindsym $mod+4 workspace number $ws4
bindsym Mod4+5 workspace number $ws5 bindsym $mod+5 workspace number $ws5
bindsym Mod4+6 workspace number $ws6 bindsym $mod+6 workspace number $ws6
bindsym Mod4+7 workspace number $ws7 bindsym $mod+7 workspace number $ws7
bindsym Mod4+8 workspace number $ws8 bindsym $mod+8 workspace number $ws8
bindsym Mod4+9 workspace number $ws9 bindsym $mod+9 workspace number $ws9
bindsym Mod4+0 workspace number $ws10 bindsym $mod+0 workspace number $ws10
bindsym Mod1+1 workspace number $ws11
bindsym Mod1+2 workspace number $ws12
bindsym Mod1+3 workspace number $ws13
bindsym Mod1+4 workspace number $ws14
bindsym Mod1+5 workspace number $ws15
bindsym Mod1+6 workspace number $ws16
bindsym Mod1+7 workspace number $ws17
bindsym Mod1+8 workspace number $ws18
bindsym Mod1+9 workspace number $ws19
bindsym Mod1+0 workspace number $ws20
# move focused container to workspace # move focused container to workspace
bindsym Mod4+Shift+1 move container to workspace number $ws1 bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym Mod4+Shift+2 move container to workspace number $ws2 bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym Mod4+Shift+3 move container to workspace number $ws3 bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym Mod4+Shift+4 move container to workspace number $ws4 bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym Mod4+Shift+5 move container to workspace number $ws5 bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym Mod4+Shift+6 move container to workspace number $ws6 bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym Mod4+Shift+7 move container to workspace number $ws7 bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym Mod4+Shift+8 move container to workspace number $ws8 bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym Mod4+Shift+9 move container to workspace number $ws9 bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym Mod4+Shift+0 move container to workspace number $ws10 bindsym $mod+Shift+0 move container to workspace number $ws10
bindsym Mod1+Shift+1 move container to workspace number $ws11 bindsym $mod+n exec i3-new-workspace
bindsym Mod1+Shift+2 move container to workspace number $ws12
bindsym Mod1+Shift+3 move container to workspace number $ws13
bindsym Mod1+Shift+4 move container to workspace number $ws14
bindsym Mod1+Shift+5 move container to workspace number $ws15
bindsym Mod1+Shift+6 move container to workspace number $ws16
bindsym Mod1+Shift+7 move container to workspace number $ws17
bindsym Mod1+Shift+8 move container to workspace number $ws18
bindsym Mod1+Shift+9 move container to workspace number $ws19
bindsym Mod1+Shift+0 move container to workspace number $ws20
bindsym Mod4+n exec i3-new-workspace
# reload the configuration file # reload the configuration file
bindsym Mod4+Shift+c reload bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym Mod4+Shift+r restart bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session) # exit i3 (logs you out of your X session)
bindsym Mod4+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that) # resize window (you can also use the mouse for that)
mode "resize" { mode "resize" {
@@ -208,29 +166,26 @@ mode "resize" {
bindsym $right resize grow width 10 px or 10 ppt bindsym $right resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys # same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt bindsym Left resize shrink width 5 px or 5 ppt
bindsym Down resize grow height 10 px or 10 ppt bindsym Down resize grow height 5 px or 5 ppt
bindsym Up resize shrink height 10 px or 10 ppt bindsym Up resize shrink height 5 px or 5 ppt
bindsym Right resize grow width 10 px or 10 ppt bindsym Right resize grow width 5 px or 5 ppt
# back to normal: Enter or Escape or Mod4+r # back to normal: Enter or Escape or $mod+r
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
bindsym Mod4+r mode "default" bindsym $mod+r mode "default"
} }
bindsym Mod4+r mode "resize" bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status # Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available) # finds out, if available)
bar { bar {
font pango:Monoid Nerd Font 9 mode hide
status_command ~/.cargo/bin/i3status-rs ~/.config/i3/i3status-rs.toml status_command i3status-rs ~/.config/i3/i3status-rs.toml
mode dock modifier $mod
modifier Mod4 font pango:CommitMonotuned 9
tray_padding 0
tray_output primary
colors { colors {
separator #268bd2 separator #268bd2
background $bg_color background $bg_color
@@ -255,8 +210,8 @@ for_window [title="Figure *"] move container to workspace $ws10 floating enable
assign [class="com-mathworks-util-PostVMInit" title="^Fig"] $ws10 assign [class="com-mathworks-util-PostVMInit" title="^Fig"] $ws10
#without borders #without borders
new_window pixel 1 default_border pixel 2
new_float pixel 3 default_floating_border pixel 3
hide_edge_borders smart hide_edge_borders smart
#focus_on_window_activation focus #focus_on_window_activation focus
focus_on_window_activation urgent focus_on_window_activation urgent

View File

@@ -1,40 +1,52 @@
theme = "solarized-dark" [icons]
icons = "awesome" icons = "awesome"
[[block]] [theme]
block = "custom" theme = "solarized-dark"
command = "echo vpn:(vpn | head -1 | cut -d: -f 2)"
interval = 5
[[block]] [[block]]
block = "disk_space" block = "disk_space"
path = "/home" path = "/home"
alias = "~"
info_type = "available" info_type = "available"
unit = "GB" alert_unit = "GB"
interval = 20 interval = 20
warning = 20.0 warning = 20.0
alert = 10.0 alert = 10.0
format = " $icon home: $available.eng(w:2) "
[[block]]
block = "disk_space"
path = "/"
info_type = "available"
alert_unit = "GB"
interval = 20
warning = 20.0
alert = 10.0
format = " $icon root: $available.eng(w:2) "
[[block]] [[block]]
block = "memory" block = "memory"
display_type = "memory" format = " $icon $mem_total_used_percents.eng(w:2) "
format_mem = "{mem_total_used_percents}" format_alt = " $icon_swap $swap_used_percents.eng(w:2) "
format_swap = "{swap_used_percents}"
[[block]]
block = "amd_gpu"
format = " $icon $utilization "
format_alt = " $icon MEM: $vram_used_percents ($vram_used/$vram_total) "
interval = 1
[[block]] [[block]]
block = "cpu" block = "cpu"
interval = 1 info_cpu = 20
warning_cpu = 50
critical_cpu = 90
[[block]] [[block]]
block = "load" block = "load"
interval = 1 interval = 1
format = "{1m}" format = " $icon 1min avg: $1m.eng(w:4) "
[[block]]
block = "sound"
[[block]] [[block]]
block = "time" block = "time"
interval = 60 interval = 5
format = "%a %d.%m %R" format = " $timestamp.datetime(f:'%a %F %T') "

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 KiB

View File

@@ -1,3 +1,4 @@
require('core.config') require('core.config')
require('core.plugins') require('core.plugins')
require('core.mappings') require('core.mappings')
require('core.autocmd')

View File

@@ -0,0 +1,3 @@
{
"workspace.checkThirdParty": false
}

View File

@@ -0,0 +1,29 @@
local api = vim.api
local autocmd = api.nvim_create_autocmd
local augroup = api.nvim_create_augroup
local opt = vim.opt
local o = vim.o
local g = vim.g
local fn = vim.fn
autocmd("BufWritePre", {
desc = "Autocreate a dir when saving a file",
group = augroup("auto_create_dir", { clear = true }),
callback = function(event)
if event.match:match("^%w%w+:[\\/][\\/]") then
return
end
local file = vim.uv.fs_realpath(event.match) or event.match
fn.mkdir(fn.fnamemodify(file, ":p:h"), "p")
end,
})
autocmd("BufReadPost", {
desc = "Auto jump to last position",
group = augroup("auto-last-position", { clear = true }),
callback = function(args)
local position = api.nvim_buf_get_mark(args.buf, [["]])
local winid = fn.bufwinid(args.buf)
pcall(api.nvim_win_set_cursor, winid, position)
end,
})

View File

@@ -15,7 +15,7 @@ vim.opt.undofile = true
vim.opt.conceallevel = 1 vim.opt.conceallevel = 1
vim.opt.shell = '/bin/bash' --vim.opt.shell = '/bin/bash'
vim.opt.number = true vim.opt.number = true
--vim.o.relativenumber = 1 --vim.o.relativenumber = 1
@@ -33,15 +33,15 @@ vim.opt.splitright = true
-- gui settings -- gui settings
vim.opt.guifont="IBM Plex Mono Text:h9:e-subpixelantyalias" vim.opt.guifont="IBM Plex Mono Text:h9:e-subpixelantyalias"
vim.g.neovide_cursor_vfx_mode = 'pixiedust' vim.g.neovide_cursor_vfx_mode = 'pixiedust'
vim.g.neovide_refresh_rate = 120 vim.g.neovide_refresh_rate = 165
vim.g.neovide_refresh_rate_idle = 5 vim.g.neovide_refresh_rate_idle = 5
vim.g.neovide_remember_window_size = 0 vim.g.neovide_remember_window_size = 0
vim.opt.listchars = { tab = "", trail = "¬" } vim.opt.listchars = { tab = "", trail = "¬" }
vim.opt.list = true vim.opt.list = true
vim.opt.tabstop=2 vim.opt.tabstop=4
vim.opt.shiftwidth=2 vim.opt.shiftwidth=4
vim.opt.softtabstop=2 vim.opt.softtabstop=4
vim.opt.expandtab = true vim.opt.expandtab = true
@@ -73,7 +73,7 @@ vim.opt.cmdheight = 1
-- Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable -- Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
-- delays and poor user experience. -- delays and poor user experience.
--vim.opt.updatetime = 300 vim.opt.updatetime = 300
-- Don't pass messages to |ins-completion-menu|. -- Don't pass messages to |ins-completion-menu|.
vim.opt.shortmess:append('c') vim.opt.shortmess:append('c')
@@ -107,32 +107,4 @@ vim.opt.wildignore = [[
*/tmp/*,*.so,*.swp,*.zip,**/node_modules/**,**/target/**,**.terraform/**" */tmp/*,*.so,*.swp,*.zip,**/node_modules/**,**/target/**,**.terraform/**"
]] ]]
-- Only setup gnvim when it attaches.
vim.api.nvim_create_autocmd({'UIEnter'}, {
callback = function(event)
local chanid = vim.v.event['chan']
local chan = vim.api.nvim_get_chan_info(chanid)
if chan.client and chan.client.name ~= 'gnvim' then
return
end
-- Gnvim brings its own runtime files.
local gnvim = require('gnvim')
-- Set the font
vim.opt.guifont = 'iM WritingMonoS Nerd Font'
-- Increase/decrease font.
vim.keymap.set('n', '<c-+>', function() gnvim.font_size(1) end)
vim.keymap.set('n', '<c-->', function() gnvim.font_size(-1) end)
gnvim.setup({
cursor = {
blink_transition = 300
}
})
end
})
vim.g.loaded_perl_provider = 0 vim.g.loaded_perl_provider = 0

View File

@@ -11,7 +11,7 @@ map('t', '<ESC><ESC>', '<C-\\><C-n>', default_options)
map('i', 'jj', '<ESC>', default_options) map('i', 'jj', '<ESC>', default_options)
map('i', 'jk', '<ESC>', default_options) map('i', 'jk', '<ESC>', default_options)
--map('i', ':w<CR>', '<Esc>:w<CR>', default_options) --map('i', ':w<CR>', '<Esc>:w<CR>', default_options)
map('n', 'Q', '<cmd>q', default_options) map('n', 'Q', ':q', default_options)
-- Reselect visual block after incrementing/decrementing -- Reselect visual block after incrementing/decrementing
map('v', '<c-a>', '<c-a>gv', default_options) map('v', '<c-a>', '<c-a>gv', default_options)

View File

@@ -5,7 +5,7 @@ if not vim.loop.fs_stat(lazypath) then
"clone", "clone",
"--filter=blob:none", "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git", "https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release --"--branch=stable", -- latest stable release
lazypath, lazypath,
}) })
end end
@@ -14,9 +14,13 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
require'lazy'.setup('plugins', { require'lazy'.setup('plugins')
change_detection = { -- , {
enabled = true, -- change_detection = {
notify = false -- enabled = false,
} -- notify = false
}) -- },
-- dev = {
-- path = '/home/kmcr'
-- }
-- })

View File

@@ -1,6 +1,6 @@
return { return {
"aznhe21/actions-preview.nvim", "aznhe21/actions-preview.nvim",
config = function() config = function()
vim.keymap.set({ "v", "n" }, "<leader>ca", require("actions-preview").code_actions) vim.keymap.set({ "v", "n" }, "gra", require("actions-preview").code_actions)
end, end,
} }

View File

@@ -0,0 +1,5 @@
return {
"yutkat/git-rebase-auto-diff.nvim",
ft = { "gitrebase" },
opts = {},
}

View File

@@ -0,0 +1,12 @@
return {
--'tools/bitbucket.nvim',
dir = '~/tools/bitbucket.nvim/',
dependencies = {
'nvim-lua/plenary.nvim'
},
-- dev = true,
config = function()
require('bitbucket-nvim').setup({ opt = "test"})
end,
enabled = false
}

View File

@@ -0,0 +1,191 @@
return { {
'Saghen/blink.cmp',
-- optional: provides snippets for the snippet source
dependencies = {
'rafamadriz/friendly-snippets',
'xzbdmw/colorful-menu.nvim',
'disrupted/blink-cmp-conventional-commits',
'moyiz/blink-emoji.nvim',
'milanglacier/minuet-ai.nvim',
'mikavilpas/blink-ripgrep.nvim',
},
-- use a release tag to download pre-built binaries
version = '*',
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- build = 'cargo build --release',
-- If you use nix, you can build from source using latest nightly rust with:
-- build = 'nix run .#build-plugin',
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
-- 'default' for mappings similar to built-in completion
-- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
-- See the full "keymap" documentation for information on defining your own keymap.
keymap = {
preset = 'default',
--['A-y'] = require('minuet').make_blink_map()
},
appearance = {
-- -- Sets the fallback highlight groups to nvim-cmp's highlight groups
-- -- Useful for when your theme doesn't support blink.cmp
-- -- Will be removed in a future release
-- use_nvim_cmp_as_default = true,
-- Set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- Adjusts spacing to ensure icons are aligned
nerd_font_variant = 'mono'
},
-- Default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, due to `opts_extend`
sources = {
default = {
'conventional_commits',
'lsp',
'path',
'snippets',
'buffer',
'emoji',
--'ripgrep',
--[[ 'minuet' ]]
},
providers = {
conventional_commits = {
name = "Conventional Commits",
module = 'blink-cmp-conventional-commits',
enabled = function()
return vim.bo.filetype == 'gitcommit'
end,
opts = {}
},
emoji = {
module = 'blink-emoji',
name = "Emoji",
score_offset = 15,
opts = { insert = true },
should_show_items = function()
return vim.tbl_contains({ "gitcommit", "markdown" }, vim.o.filetype)
end,
},
minuet = {
name = 'minuet',
module = 'minuet.blink',
async = true,
-- Should match minuet.config.request_timeout * 1000,
-- since minuet.config.request_timeout is in seconds
timeout_ms = 3000,
score_offset = 50, -- Gives minuet higher priority among suggestions
},
ripgrep = {
module = 'blink-ripgrep',
name = 'Ripgrep',
opts = {},
},
}
},
completion = {
menu = {
draw = {
columns = { { "kind_icon" }, { "label", gap = 1 } },
components = {
label = {
text = function(ctx)
return require("colorful-menu").blink_components_text(ctx)
end,
highlight = function(ctx)
return require("colorful-menu").blink_components_highlight(ctx)
end,
}
}
}
},
--trigger = { prefetch_on_insert = false },
accept = { auto_brackets = { enabled = false }, },
ghost_text = { enabled = false },
},
-- experimental:
signature = { enabled = true },
},
opts_extend = { "sources.default" }
}, {
"xzbdmw/colorful-menu.nvim",
config = function()
-- You don't need to set these options.
require("colorful-menu").setup({
ls = {
lua_ls = {
-- Maybe you want to dim arguments a bit.
arguments_hl = "@comment",
},
gopls = {
-- By default, we render variable/function's type in the right most side,
-- to make them not to crowd together with the original label.
-- when true:
-- foo *Foo
-- ast "go/ast"
-- when false:
-- foo *Foo
-- ast "go/ast"
align_type_to_right = true,
-- When true, label for field and variable will format like "foo: Foo"
-- instead of go's original syntax "foo Foo". If align_type_to_right is
-- true, this option has no effect.
add_colon_before_type = false,
},
-- for lsp_config or typescript-tools
ts_ls = {
extra_info_hl = "@comment",
},
vtsls = {
extra_info_hl = "@comment",
},
["rust-analyzer"] = {
-- Such as (as Iterator), (use std::io).
extra_info_hl = "@comment",
-- Similar to the same setting of gopls.
align_type_to_right = true,
},
clangd = {
-- Such as "From <stdio.h>".
extra_info_hl = "@comment",
-- Similar to the same setting of gopls.
align_type_to_right = true,
-- the hl group of leading dot of "•std::filesystem::permissions(..)"
import_dot_hl = "@comment",
},
zls = {
-- Similar to the same setting of gopls.
align_type_to_right = true,
},
roslyn = {
extra_info_hl = "@comment",
},
-- The same applies to pyright/pylance
basedpyright = {
-- It is usually import path such as "os"
extra_info_hl = "@comment",
},
-- If true, try to highlight "not supported" languages.
fallback = true,
},
-- If the built-in logic fails to find a suitable highlight group,
-- this highlight is applied to the label.
fallback_highlight = "@variable",
-- If provided, the plugin truncates the final displayed text to
-- this width (measured in display cells). Any highlights that extend
-- beyond the truncation point are ignored. When set to a float
-- between 0 and 1, it'll be treated as percentage of the width of
-- the window: math.floor(max_width * vim.api.nvim_win_get_width(0))
-- Default 60.
max_width = 60,
})
end
} }

View File

@@ -0,0 +1,49 @@
return {
"olimorris/codecompanion.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
},
opts = {
strategies = {
-- Change the default chat adapter
chat = {
adapter = "ollama",
},
inline = {
adapter = "ollama",
}
},
adapters = {
ollama = function()
return require("codecompanion.adapters").extend("ollama", {
name = "gemma3:12b",
env = {
url = "http://192.168.10.99:11434",
api_key = "OLLAMA_API_KEY",
},
headers = {
["Content-Type"] = "application/json",
["Authorization"] = "Bearer ${api_key}",
},
parameters = {
sync = true,
},
schema = {
model = {
default = "deepseek-r1:32b",
},
num_ctx = {
default = 16384,
},
}
})
end,
},
opts = {
-- Set debug logging
log_level = "DEBUG",
},
},
enabled = false
}

View File

@@ -1,142 +1,53 @@
return {{ return {
'lmantw/themify.nvim',
lazy = false,
priority = 1000,
dependencies = {
--'Iron-E/nvim-highlite'
},
config = function()
require('themify').setup({
activity = true,
"xero/miasma.nvim", "xero/miasma.nvim",
lazy = false,
priority = 1000,
config = function()
--vim.cmd("colorscheme miasma")
end,
},
{
"wuelnerdotexe/vim-enfocado", "wuelnerdotexe/vim-enfocado",
lazy = false,
priority = 1000,
config = function()
--vim.cmd.colorscheme('enfocado')
end
},
{
"fenetikm/falcon", "fenetikm/falcon",
lazy = false,
priority = 1000,
config = function()
--vim.cmd.colorscheme('falcon')
end
},
{
"casr/vim-colors-reference", "casr/vim-colors-reference",
lazy = false,
priority = 1000,
config = function()
--vim.cmd.colorscheme('reference')
end
},
{
"blazkowolf/gruber-darker.nvim", "blazkowolf/gruber-darker.nvim",
lazy = false,
priority = 1000,
config = function()
--vim.cmd.colorscheme('gruber-darker')
end
},
{
"rebelot/kanagawa.nvim", "rebelot/kanagawa.nvim",
lazy = false,
priority = 1000,
config = function()
--vim.cmd.colorscheme('kanagawa')
end
},
{
"jaredgorski/spacecamp", "jaredgorski/spacecamp",
lazy = false,
priority = 1000,
config = function()
--vim.cmd.colorscheme('spacecamp')
end
},
{
"lifepillar/vim-gruvbox8", "lifepillar/vim-gruvbox8",
lazy = false,
priority = 1000,
config = function()
--vim.cmd.colorscheme('gruvbox8')
end
},
{
"marko-cerovac/material.nvim", "marko-cerovac/material.nvim",
lazy = false,
priority = 1000,
config = function()
--vim.cmd.colorscheme('material')
end
},
{
"srcery-colors/srcery-vim", "srcery-colors/srcery-vim",
lazy = false,
priority = 1000,
config = function()
--vim.cmd.colorscheme('srcery')
end
},
{
"tanvirtin/monokai.nvim", "tanvirtin/monokai.nvim",
lazy = false,
priority = 1000,
config = function()
--vim.cmd.colorscheme('monokai')
end
},
{
"dasupradyumna/midnight.nvim", "dasupradyumna/midnight.nvim",
lazy = false,
priority = 1000,
config = function()
vim.cmd.colorscheme('midnight')
end
},
{
"bluz71/vim-moonfly-colors", "bluz71/vim-moonfly-colors",
lazy = false,
priority = 1000,
config = function()
--vim.cmd.colorscheme('moonfly')
end
},
{
"kuznetsss/meadow.nvim",
lazy = false,
priority = 1000,
config = function()
--require('meadow').setup()
--vim.cmd.colorscheme('meadow')
--vim.cmd [[ hi! Conceal guibg=black ]]
end
},
{
"kepano/flexoki-neovim", "kepano/flexoki-neovim",
lazy = false, "nuvic/flexoki-nvim",
priority = 1000, {
config = function() url = "https://gitlab.com/bartekjaszczak/distinct-nvim",
--vim.cmd.colorscheme('flexoki-dark')
end
}, },
{ {
"https://gitlab.com/bartekjaszczak/distinct-nvim", url = "https://gitlab.com/bartekjaszczak/finale-nvim",
lazy = false,
priority = 1000,
config = function()
-- require("distinct").setup({
-- doc_comments_different_color = true, -- Use different colour for documentation comments
-- })
-- vim.cmd.colorscheme('distinct')
end
}, },
{
'kevinm6/kurayami.nvim', 'kevinm6/kurayami.nvim',
lazy = false, 'gerardbm/vim-atomic',
priority = 1000, 'fynnfluegge/monet.nvim',
config = function() 'thesimonho/kanagawa-paper.nvim',
--vim.cmd.colorscheme('kurayami') 'qaptoR-nvim/chocolatier.nvim',
'aliqyan-21/darkvoid.nvim',
'paulo-granthon/hyper.nvim',
'diegoulloao/neofusion.nvim',
'aktersnurra/no-clown-fiesta.nvim',
'kdheepak/monochrome.nvim',
'ficcdaf/ashen.nvim',
-- 'm15a/nvim-srcerite', - requires buggy highlite
'nyoom-engineering/oxocarbon.nvim',
'rjshkhr/shadow.nvim',
'folke/tokyonight.nvim',
'nendix/zen.nvim',
'mcauley-penney/techbase.nvim',
'default'
})
end end
} }
}

View File

@@ -20,5 +20,5 @@ return {
follow_tw = nil, follow_tw = nil,
}, },
}, },
enabled = false enabled = true
} }

View File

@@ -1,5 +1,23 @@
return { return {{
-- 'gcc' to toggle comments -- 'gcc' to toggle comments
'numToStr/Comment.nvim', 'numToStr/Comment.nvim',
config = true config = true
} }, {
"soemre/commentless.nvim",
cmd = "Commentless",
keys = {
{
"z/",
function()
require("commentless").toggle()
end,
desc = "Toggle Comments",
},
},
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
opts = {
-- Customize Configuration
},
}}

View File

@@ -0,0 +1,11 @@
return {
'Mr-LLLLL/cool-chunk.nvim',
event = { "CursorHold", "CursorHoldI" },
dependencies = {
"nvim-treesitter/nvim-treesitter",
},
config = function()
require('cool-chunk').setup({})
end,
enabled = false
}

View File

@@ -14,4 +14,10 @@ return {{
{ {
"chrisbra/csv.vim", "chrisbra/csv.vim",
ft = { "csv" } ft = { "csv" }
},
{
"hat0uma/csvview.nvim",
ft = { "csv" },
cmd = { "CsvViewEnable" },
config = true
}} }}

View File

@@ -0,0 +1,14 @@
return {
"DanilaMihailov/beacon.nvim",
opts = {
enabled = true, --- (boolean | fun():boolean) check if enabled
speed = 2, --- integer speed at which animation goes
width = 40, --- integer width of the beacon window
winblend = 70, --- integer starting transparency of beacon window :h winblend
fps = 60, --- integer how smooth the animation going to be
min_jump = 10, --- integer what is considered a jump. Number of lines
cursor_events = { 'CursorMoved' }, -- table<string> what events trigger check for cursor moves
window_events = { 'WinEnter', 'FocusGained' }, -- table<string> what events trigger cursor highlight
highlight = { bg = 'white', ctermbg = 15 }, -- vim.api.keyset.highlight table passed to vim.api.nvim_set_hl
}
}

View File

@@ -6,7 +6,7 @@ return {
dap.adapters.gdb = { dap.adapters.gdb = {
type = "executable", type = "executable",
command = "gdb", command = "gdb",
args = { "-i", "dap" } args = { "--interpreter=dap", "--eval-command", "set print pretty on" }
} }
dap.configurations.c = { dap.configurations.c = {
{ {
@@ -30,6 +30,26 @@ return {
cwd = "${workspaceFolder}", cwd = "${workspaceFolder}",
}, },
} }
dap.configurations.matlab = {
{
name = "Launch",
type = "matlab",
request = "launch",
program = "${file}",
cwd = "${workspaceFolder}",
rootDir = "${workspaceFolder}",
},
}
dap.adapters.matlab = function(cb, config)
cb({
type = 'executable',
command = 'matlab-language-server',
args = { '--stdio' },
options = {
source_filetype = 'matlab',
},
})
end
dap.configurations.python = { dap.configurations.python = {
{ {
-- The first three options are required by nvim-dap -- The first three options are required by nvim-dap
@@ -81,14 +101,13 @@ return {
end end
end end
local def = { noremap = true, silent = true } vim.keymap.set('n', '\\c', function() require("dap").continue() end, { noremap = true, silent = true, desc = "Continue" });
vim.keymap.set('n', '\\c', function() require("dap").continue() end, def); vim.keymap.set('n', '\\b', function() require("dap").toggle_breakpoint() end, { noremap = true, silent = true, desc = "breakpoint toggle" });
vim.keymap.set('n', '\\b', function() require("dap").toggle_breakpoint() end, def); vim.keymap.set('n', '\\B', function() require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: ")) end, { noremap = true, silent = true, desc = "conditional breakpoint" });
vim.keymap.set('n', '\\B', function() require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: ")) end, def); vim.keymap.set('n', '\\n', function() require("dap").step_over() end, { noremap = true, silent = true, desc = "step over" });
vim.keymap.set('n', '\\n', function() require("dap").step_over() end, def); vim.keymap.set('n', '\\s', function() require("dap").step_into() end, { noremap = true, silent = true, desc = "step into" });
vim.keymap.set('n', '\\s', function() require("dap").step_into() end, def); vim.keymap.set('n', '\\u', function() require("dap").step_out() end, { noremap = true, silent = true, desc = "step out" });
vim.keymap.set('n', '\\u', function() require("dap").step_out() end, def); vim.keymap.set('n', '\\l', function() require("dap").run_last() end, { noremap = true, silent = true, desc = "run last" });
vim.keymap.set('n', '\\l', function() require("dap").run_last() end, def);
end end
}, },
{ {
@@ -100,12 +119,11 @@ return {
config = function() config = function()
local ui = require('dapui') local ui = require('dapui')
local dap = require('dap') local dap = require('dap')
local def = { noremap = true, silent = true }
vim.keymap.set('n', '\\d', function() vim.keymap.set('n', '\\d', function()
dap.continue() dap.continue()
ui.toggle({}) ui.toggle({})
end, def) end, { noremap = true, silent = true, desc = "toggle UI" })
vim.keymap.set('v', 'K', function() require("dapui").eval() end, def) vim.keymap.set('v', 'K', function() require("dapui").eval() end, { noremap = true, silent = true, desc = "eval val" })
ui.setup() ui.setup()
end end
}, },
@@ -142,7 +160,7 @@ return {
-- experimental features: -- experimental features:
all_frames = false, -- show virtual text for all stack frames not only current. Only works for debugpy on my machine. all_frames = false, -- show virtual text for all stack frames not only current. Only works for debugpy on my machine.
virt_lines = false, -- show virtual lines instead of virtual text (will flicker!) virt_lines = false, -- show virtual lines instead of virtual text (will flicker!)
virt_text_win_col = nil -- position the virtual text at a fixed window column (starting from the first text column) , virt_text_win_col = nil, -- position the virtual text at a fixed window column (starting from the first text column)
} }
end end
} }

View File

@@ -0,0 +1,94 @@
return {
url = "https://codeberg.org/esensar/nvim-dev-container",
opts = {
config_search_start = function()
-- By default this function uses vim.loop.cwd()
-- This is used to find a starting point for .devcontainer.json file search
-- Since by default, it is searched for recursively
-- That behavior can also be disabled
end,
workspace_folder_provider = function()
-- By default this function uses first workspace folder for integrated lsp if available and vim.loop.cwd() as a fallback
-- This is used to replace `${localWorkspaceFolder}` in devcontainer.json
-- Also used for creating default .devcontainer.json file
end,
terminal_handler = function(command)
-- By default this function creates a terminal in a new tab using :terminal command
-- It also removes statusline when that tab is active, to prevent double statusline
-- It can be overridden to provide custom terminal handling
end,
nvim_installation_commands_provider = function(path_binaries, version_string)
-- Returns table - list of commands to run when adding neovim to container
-- Each command can either be a string or a table (list of command parts)
-- Takes binaries available in path on current container and version_string passed to the command or current version of neovim
end,
devcontainer_json_template = function()
-- Returns table - list of lines to set when creating new devcontainer.json files
-- As a template
-- Used only when using functions from commands module or created commands
end,
-- Can be set to false to prevent generating default commands
-- Default commands are listed below
generate_commands = true,
-- By default no autocommands are generated
-- This option can be used to configure automatic starting and cleaning of containers
autocommands = {
-- can be set to true to automatically start containers when devcontainer.json is available
init = false,
-- can be set to true to automatically remove any started containers and any built images when exiting vim
clean = false,
-- can be set to true to automatically restart containers when devcontainer.json file is updated
update = false,
},
-- can be changed to increase or decrease logging from library
log_level = "info",
-- can be set to true to disable recursive search
-- in that case only .devcontainer.json and .devcontainer/devcontainer.json files will be checked relative
-- to the directory provided by config_search_start
disable_recursive_config_search = false,
-- can be set to false to disable image caching when adding neovim
-- by default it is set to true to make attaching to containers faster after first time
cache_images = true,
-- By default all mounts are added (config, data and state)
-- This can be changed to disable mounts or change their options
-- This can be useful to mount local configuration
-- And any other mounts when attaching to containers with this plugin
attach_mounts = {
neovim_config = {
-- enables mounting local config to /root/.config/nvim in container
enabled = false,
-- makes mount readonly in container
options = { "readonly" }
},
neovim_data = {
-- enables mounting local data to /root/.local/share/nvim in container
enabled = false,
-- no options by default
options = {}
},
-- Only useful if using neovim 0.8.0+
neovim_state = {
-- enables mounting local state to /root/.local/state/nvim in container
enabled = false,
-- no options by default
options = {}
},
},
-- This takes a list of mounts (strings) that should always be added to every run container
-- This is passed directly as --mount option to docker command
-- Or multiple --mount options if there are multiple values
always_mount = {},
-- This takes a string (usually either "podman" or "docker") representing container runtime - "devcontainer-cli" is also partially supported
-- That is the command that will be invoked for container operations
-- If it is nil, plugin will use whatever is available (trying "podman" first)
container_runtime = nil,
-- Similar to container runtime, but will be used if main runtime does not support an action - useful for "devcontainer-cli"
backup_runtime = nil,
-- This takes a string (usually either "podman-compose" or "docker-compose") representing compose command - "devcontainer-cli" is also partially supported
-- That is the command that will be invoked for compose operations
-- If it is nil, plugin will use whatever is available (trying "podman-compose" first)
compose_command = nil,
-- Similar to compose command, but will be used if main command does not support an action - useful for "devcontainer-cli"
backup_compose_command = nil,
}
}

View File

@@ -1,27 +0,0 @@
return {
"luckasRanarison/nvim-devdocs",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
"nvim-treesitter/nvim-treesitter",
},
opts = {
dir_path = vim.fn.stdpath("data") .. "/devdocs", -- installation directory
telescope = {}, -- passed to the telescope picker
float_win = { -- passed to nvim_open_win(), see :h api-floatwin
relative = "editor",
height = 25,
width = 100,
border = "rounded",
},
wrap = true, -- text wrap, only applies to floating window
previewer_cmd = nil, -- for example: "glow"
cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "80" }
cmd_ignore = {}, -- ignore cmd rendering for the listed docs
picker_cmd = false, -- use cmd previewer in picker preview
picker_cmd_args = {}, -- example using glow: { "-p" }
ensure_installed = nil, -- get automatically installed
after_open = function(bufnr) end, -- callback that runs after the Devdocs window is opened. Devdocs buffer ID will be passed in
},
event = "VeryLazy"
}

View File

@@ -0,0 +1,14 @@
return {
'glacambre/firenvim',
build = ":call firenvim#install(0)",
config = function()
vim.api.nvim_create_autocmd({'UIEnter'}, {
callback = function(event)
local client = vim.api.nvim_get_chan_info(vim.v.event.chan).client
if client ~= nil and client.name == "Firenvim" then
vim.o.laststatus = 0
end
end
})
end
}

View File

@@ -21,9 +21,64 @@
-- }, -- },
return { return
{
{
"chrisgrieser/nvim-origami", "chrisgrieser/nvim-origami",
event = "BufReadPost", -- later or on keypress would prevent saving folds event = "BufReadPost", -- later or on keypress would prevent saving folds
config = true, -- needed even when using default config opts = {
enabled = true keepFoldsAcrossSessions = false,
},
enabled = false
}, {
"kevinhwang91/nvim-ufo",
dependencies = {
"kevinhwang91/promise-async"
},
config = function()
local handler = function(virtText, lnum, endLnum, width, truncate)
local newVirtText = {}
local suffix = (' 󰁂 %d '):format(endLnum - lnum)
local sufWidth = vim.fn.strdisplaywidth(suffix)
local targetWidth = width - sufWidth
local curWidth = 0
for _, chunk in ipairs(virtText) do
local chunkText = chunk[1]
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
if targetWidth > curWidth + chunkWidth then
table.insert(newVirtText, chunk)
else
chunkText = truncate(chunkText, targetWidth - curWidth)
local hlGroup = chunk[2]
table.insert(newVirtText, {chunkText, hlGroup})
chunkWidth = vim.fn.strdisplaywidth(chunkText)
-- str width returned from truncate() may less than 2nd argument, need padding
if curWidth + chunkWidth < targetWidth then
suffix = suffix .. (' '):rep(targetWidth - curWidth - chunkWidth)
end
break
end
curWidth = curWidth + chunkWidth
end
table.insert(newVirtText, {suffix, 'MoreMsg'})
return newVirtText
end
vim.cmd [[
hi default UfoFoldedFg guifg=Normal.foreground
hi default UfoFoldedBg guibg=Visual.background
hi default link UfoPreviewSbar PmenuSbar
hi default link UfoPreviewThumb PmenuThumb
hi default link UfoPreviewWinBar UfoFoldedBg
hi default link UfoPreviewCursorLine Visual
hi default link UfoFoldedEllipsis Visual
hi default link UfoCursorFoldedLine Normal
hi Folded gui=NONE guibg=Normal.background
]]
require("ufo").setup({
fold_virt_text_handler = handler
})
end
}
} }

View File

@@ -0,0 +1,7 @@
return {
'zeioth/garbage-day.nvim',
event = "VeryLazy",
opts = {
wakeup_delay = 5000
}
}

View File

@@ -1,23 +1,28 @@
return { return {
"David-Kunz/gen.nvim", "David-Kunz/gen.nvim",
opts = { opts = {
model = "mistral", -- The default model to use. --model = "codellama:code", -- The default model to use.
host = "localhost", -- The host running the Ollama service. model = "gemma2:9b", -- The default model to use.
host = "batman.local", -- The host running the Ollama service.
port = "11434", -- The port on which the Ollama service is listening. port = "11434", -- The port on which the Ollama service is listening.
display_mode = "split", -- The display mode. Can be "float" or "split". quit_map = "q", -- set keymap for closing the response window
show_prompt = true, -- Shows the Prompt submitted to Ollama. retry_map = "<c-r>", -- set keymap to re-send the current prompt
show_model = true, -- Displays which model you are using at the beginning of your chat session.
no_auto_close = false, -- Never closes the window automatically.
init = function(options) pcall(io.popen, "ollama serve > /dev/null 2>&1 &") end, init = function(options) pcall(io.popen, "ollama serve > /dev/null 2>&1 &") end,
-- Function to initialize Ollama -- Function to initialize Ollama
command = function(options) command = function(options)
return "curl --silent --no-buffer -X POST http://" .. options.host .. ":" .. options.port .. "/api/generate -d $body" local body = { model = options.model, stream = true }
return "curl --silent --no-buffer -X POST http://" .. options.host .. ":" .. options.port .. "/api/chat -d $body"
end, end,
-- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped). -- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped).
-- This can also be a command string. -- This can also be a command string.
-- The executed command must return a JSON object with { response, context } -- The executed command must return a JSON object with { response, context }
-- (context property is optional). -- (context property is optional).
-- list_models = '<omitted lua function>', -- Retrieves a list of model names -- list_models = '<omitted lua function>', -- Retrieves a list of model names
display_mode = "float", -- The display mode. Can be "float" or "split".
show_prompt = false, -- Shows the Prompt submitted to Ollama.
show_model = false, -- Displays which model you are using at the beginning of your chat session.
no_auto_close = false, -- Never closes the window automatically.
debug = false -- Prints errors and the command which is run. debug = false -- Prints errors and the command which is run.
} },
enabled = false
} }

View File

@@ -0,0 +1,5 @@
return {
"moyiz/git-dev.nvim",
lazy = true,
cmd = { "GitDevOpen", "GitDevCleanAll" }, opts = {},
}

View File

@@ -1,13 +1,13 @@
return { return {
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
opts = { opts = {
signs = { -- signs = {
add = {hl = 'GitSignsAdd' , text = '+', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'}, -- add = {hl = 'GitSignsAdd' , text = '+', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
change = {hl = 'GitSignsChange', text = '', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, -- change = {hl = 'GitSignsChange', text = '│', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, -- delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
topdelete = {hl = 'GitSignsDelete', text = '', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'}, -- topdelete = {hl = 'GitSignsDelete', text = '‾', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'}, -- changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
}, -- },
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl` numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl` linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
@@ -82,16 +82,13 @@ return {
current_line_blame_opts = { current_line_blame_opts = {
virt_text = true, virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 5000, delay = 2000,
ignore_whitespace = true, ignore_whitespace = true,
}, },
current_line_blame_formatter_opts = {
relative_time = false
},
sign_priority = 6, sign_priority = 6,
update_debounce = 100, update_debounce = 100,
status_formatter = nil, -- Use default status_formatter = nil, -- Use default
max_file_length = 40000, max_file_length = 4000,
preview_config = { preview_config = {
-- Options passed to nvim_open_win -- Options passed to nvim_open_win
border = 'single', border = 'single',
@@ -100,8 +97,5 @@ return {
row = 0, row = 0,
col = 1 col = 1
}, },
yadm = {
enable = true
},
} }
} }

View File

@@ -0,0 +1,5 @@
return {
'Aaronik/GPTModels.nvim',
config = true,
enabled = false
}

View File

@@ -0,0 +1,7 @@
return {
'm4xshen/hardtime.nvim',
dependencies = { "MunifTanjim/nui.nvim" },
opts = {
},
enabled = false
}

View File

@@ -13,7 +13,7 @@ return {
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
}, },
neorg = { neorg = {
enabled = true, enabled = false,
clear_in_insert_mode = false, clear_in_insert_mode = false,
download_remote_images = true, download_remote_images = true,
only_render_image_at_cursor = false, only_render_image_at_cursor = false,
@@ -28,7 +28,7 @@ return {
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" }, window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off) tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp" }, -- render image files as images when opened hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif", "*.svg" }, -- render image files as images when opened
}) })
end, end,
enabled = false enabled = false

View File

@@ -5,11 +5,13 @@ return {
use_default_keymaps = false, use_default_keymaps = false,
max_join_length = 1000, max_join_length = 1000,
}) })
-- -- For default preset -- For default preset
-- vim.keymap.set('n', '<leader>jt', require('treesj').toggle) vim.keymap.set('n', '<leader>jt', require('treesj').toggle)
-- -- For extending default preset with `recursive = true` -- For extending default preset with `recursive = true`
-- vim.keymap.set('n', '<leader>jT', function() vim.keymap.set('n', '<leader>jT', function()
-- require('treesj').toggle({ split = { recursive = true } }) require('treesj').toggle({ split = { recursive = true } })
-- end) end)
end end,
-- it is loading very long or is it treesitter?
enabled = true
} }

View File

@@ -0,0 +1,25 @@
return {
{
"folke/lazydev.nvim",
ft = "lua", -- only load on lua files
opts = {
library = {
-- See the configuration section for more details
-- Load luvit types when the `vim.uv` word is found
{ path = "luvit-meta/library", words = { "vim%.uv" } },
},
},
},
{ "Bilal2453/luvit-meta", lazy = true }, -- optional `vim.uv` typings
{ -- optional completion source for require statements and module annotations
"hrsh7th/nvim-cmp",
opts = function(_, opts)
opts.sources = opts.sources or {}
table.insert(opts.sources, {
name = "lazydev",
group_index = 0, -- set group index to 0 to skip loading LuaLS completions
})
end,
},
-- { "folke/neodev.nvim", enabled = false }, -- make sure to uninstall or disable neodev.nvim
}

View File

@@ -1,4 +1,385 @@
return { return {
"freddiehaddad/feline.nvim", "rebelot/heirline.nvim",
config = true config = function()
local conditions = require("heirline.conditions")
local heirline = require('heirline')
local utils = require("heirline.utils")
local Space = { provider = " " }
local colors = {
bg = utils.get_highlight("Normal").bg,
fg = utils.get_highlight("Normal").fg,
bright_bg = utils.get_highlight("Normal").bg,
bright_fg = utils.get_highlight("Normal").fg,
red = utils.get_highlight("DiagnosticError").fg,
dark_red = utils.get_highlight("DiffDelete").bg,
green = utils.get_highlight("String").fg,
blue = utils.get_highlight("Function").fg,
gray = utils.get_highlight("NonText").fg,
orange = utils.get_highlight("Constant").fg,
purple = utils.get_highlight("Statement").fg,
cyan = utils.get_highlight("Special").fg,
diag_warn = utils.get_highlight("DiagnosticWarn").fg,
diag_error = utils.get_highlight("DiagnosticError").fg,
diag_hint = utils.get_highlight("DiagnosticHint").fg,
diag_info = utils.get_highlight("DiagnosticInfo").fg,
git_del = utils.get_highlight("diffDeleted").fg,
git_add = utils.get_highlight("diffAdded").fg,
git_change = utils.get_highlight("diffChanged").fg,
}
heirline.load_colors(colors)
-- --------------------------------------------------------------
local ViMode = {
-- get vim current mode, this information will be required by the provider
-- and the highlight functions, so we compute it only once per component
-- evaluation and store it as a component attribute
init = function(self)
self.mode = vim.fn.mode(1) -- :h mode()
-- execute this only once, this is required if you want the ViMode
-- component to be updated on operator pending mode
if not self.once then
vim.api.nvim_create_autocmd("ModeChanged", {
pattern = "*:*o",
command = 'redrawstatus'
})
self.once = true
end
end,
-- Now we define some dictionaries to map the output of mode() to the
-- corresponding string and color. We can put these into `static` to compute
-- them at initialisation time.
static = {
mode_names = { -- change the strings if you like it vvvvverbose!
n = "N",
no = "N?",
nov = "N?",
noV = "N?",
["no\22"] = "N?",
niI = "Ni",
niR = "Nr",
niV = "Nv",
nt = "Nt",
v = "V",
vs = "Vs",
V = "V_",
Vs = "Vs",
["\22"] = "^V",
["\22s"] = "^V",
s = "S",
S = "S_",
["\19"] = "^S",
i = "I",
ic = "Ic",
ix = "Ix",
R = "R",
Rc = "Rc",
Rx = "Rx",
Rv = "Rv",
Rvc = "Rv",
Rvx = "Rv",
c = "C",
cv = "Ex",
r = "...",
rm = "M",
["r?"] = "?",
["!"] = "!",
t = "T",
},
mode_colors = {
n = "red",
i = "green",
v = "cyan",
V = "cyan",
["\22"] = "cyan",
c = "orange",
s = "purple",
S = "purple",
["\19"] = "purple",
R = "orange",
r = "orange",
["!"] = "red",
t = "red",
}
},
-- We can now access the value of mode() that, by now, would have been
-- computed by `init()` and use it to index our strings dictionary.
-- note how `static` fields become just regular attributes once the
-- component is instantiated.
-- To be extra meticulous, we can also add some vim statusline syntax to
-- control the padding and make sure our string is always at least 2
-- characters long. Plus a nice Icon.
provider = function(self)
return "%1(" .. self.mode_names[self.mode] .. "%)"
end,
-- Same goes for the highlight. Now the foreground will change according to the current mode.
hl = function(self)
local mode = self.mode:sub(1, 1) -- get only the first mode character
return { fg = self.mode_colors[mode], bold = true, }
end,
-- Re-evaluate the component only on ModeChanged event!
-- This is not required in any way, but it's there, and it's a small
-- performance improvement.
update = {
"ModeChanged",
},
}
-- --------------------------------------------------------------
local FileNameBlock = {
-- let's first set up some attributes needed by this component and it's children
init = function(self)
self.filename = vim.api.nvim_buf_get_name(0)
end,
}
-- We can now define some children separately and add them later
local FileIcon = {
init = function(self)
local filename = self.filename
local extension = vim.fn.fnamemodify(filename, ":e")
self.icon, self.icon_color = require("nvim-web-devicons").get_icon_color(filename, extension,
{ default = true })
end,
provider = function(self)
return self.icon and (self.icon .. " ")
end,
hl = function(self)
return { fg = self.icon_color }
end
}
local FileName = {
provider = function(self)
-- first, trim the pattern relative to the current directory. For other
-- options, see :h filename-modifiers
local filename = vim.fn.fnamemodify(self.filename, ":.")
if filename == "" then return "[No Name]" end
-- now, if the filename would occupy more than 1/4th of the available
-- space, we trim the file path to its initials
-- See Flexible Components section below for dynamic truncation
if not conditions.width_percent_below(#filename, 0.5) then
filename = vim.fn.pathshorten(filename)
end
return filename
end,
hl = { fg = utils.get_highlight("Directory").fg },
}
local FileFlags = {
{
condition = function()
return vim.bo.modified
end,
provider = "[+]",
hl = { fg = "green" },
},
{
condition = function()
return not vim.bo.modifiable or vim.bo.readonly
end,
provider = "",
hl = { fg = "orange" },
},
}
-- Now, let's say that we want the filename color to change if the buffer is
-- modified. Of course, we could do that directly using the FileName.hl field,
-- but we'll see how easy it is to alter existing components using a "modifier"
-- component
local FileNameModifier = {
hl = function()
if vim.bo.modified then
-- use `force` because we need to override the child's hl foreground
return { fg = "cyan", bold = true, force = true }
end
end,
}
-- let's add the children to our FileNameBlock component
FileNameBlock = utils.insert(FileNameBlock,
FileIcon,
utils.insert(FileNameModifier, FileName), -- a new table where FileName is a child of FileNameModifier
FileFlags,
{ provider = '%<' } -- this means that the statusline is cut here when there's not enough space
)
-- --------------------------------------------------------------
-- We're getting minimalists here!
local Ruler = {
-- %l = current line number
-- %L = number of lines in the buffer
-- %c = column number
-- %P = percentage through file of displayed window
provider = "%7(%l/%3L%):%2c %P",
}
-- --------------------------------------------------------------
local LSPActive = {
condition = conditions.lsp_attached,
update = { 'LspAttach', 'LspDetach' },
-- You can keep it simple,
-- provider = " [LSP]",
-- Or complicate things a bit and get the servers names
provider = function()
local names = {}
for i, server in pairs(vim.lsp.get_clients({ bufnr = 0 })) do
table.insert(names, server.name)
end
return "" .. table.concat(names, ",")
end,
hl = { fg = "green", bold = true },
}
local LSPMessages = {
provider = vim.lsp.status(),
hl = { fg = "gray" },
}
-- --------------------------------------------------------------
local Diagnostics = {
condition = conditions.has_diagnostics,
static = {
-- these require something...
error_icon = "",
warn_icon = "",
info_icon = "",
hint_icon = "",
},
init = function(self)
self.errors = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR })
self.warnings = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN })
self.hints = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT })
self.info = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO })
end,
update = { "DiagnosticChanged", "BufEnter" },
{
provider = function(self)
-- 0 is just another output, we can decide to print it or not!
return self.errors > 0 and (self.error_icon .. self.errors .. " ")
end,
hl = { fg = "diag_error" },
},
{
provider = function(self)
return self.warnings > 0 and (self.warn_icon .. self.warnings .. " ")
end,
hl = { fg = "diag_warn" },
},
{
provider = function(self)
return self.info > 0 and (self.info_icon .. self.info .. " ")
end,
hl = { fg = "diag_info" },
},
{
provider = function(self)
return self.hints > 0 and (self.hint_icon .. self.hints)
end,
hl = { fg = "diag_hint" },
},
}
-- --------------------------------------------------------------
local DAPMessages = {
condition = function()
local session = require("dap").session()
return session ~= nil
end,
provider = function()
return "" .. require("dap").status()
end,
hl = "Debug"
-- see Click-it! section for clickable actions
}
-- --------------------------------------------------------------
local WorkDir = {
provider = function()
local icon = (vim.fn.haslocaldir(0) == 1 and "l" or "g") .. " " .. ""
local cwd = vim.fn.getcwd(0)
cwd = vim.fn.fnamemodify(cwd, ":~")
if not conditions.width_percent_below(#cwd, 0.25) then
cwd = vim.fn.pathshorten(cwd)
end
local trail = cwd:sub(-1) == '/' and '' or "/"
return icon .. cwd .. trail
end,
hl = { fg = "blue", bold = true },
}
-- --------------------------------------------------------------
local Align = { provider = "%=" }
-- ViMode = utils.surround({ "", "" }, "bright_bg", { ViMode })
local DefaultStatusline = {
ViMode, Space, FileNameBlock, Space, Align,
Align, DAPMessages,
LSPActive, Space, Diagnostics, Space, LSPMessages, Space, Ruler
}
local FileType = {
provider = function()
return string.upper(vim.bo.filetype)
end,
hl = { fg = utils.get_highlight("Type").fg, bold = true },
}
--
local InactiveStatusline = {
condition = conditions.is_not_active,
FileNameBlock,
Align,
}
local SpecialStatusline = {
condition = function()
return conditions.buffer_matches({
buftype = { "nofile", "prompt", "help", "quickfix" },
filetype = { "^git.*", "fugitive" },
})
end,
FileType,
Space,
Align
}
local StatusLine = {
hl = function()
if conditions.is_active() then
return "StatusLine"
else
return "StatusLineNC"
end
end,
-- the first statusline with no condition, or which condition returns true is used.
-- think of it as a switch case with breaks to stop fallthrough.
fallthrough = false,
SpecialStatusline,
InactiveStatusline,
DefaultStatusline,
colors = colors
}
local Winbar = { { provider = "»" }, Space }
local TabLine = {}
-- local StatusColumn = {}
heirline.setup({
statusline = StatusLine,
-- winbar = Winbar,
tabline = TabLine,
-- statuscolumn = StatusColumn
opts = {
colors = colors
}
})
end,
enabled = false
} }

View File

@@ -1,50 +1,14 @@
return { return {
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
dependencies = { dependencies = {
-- "SmiteshP/nvim-navbuddy", -- "SmiteshP/nvim-navbuddy",
"jubnzv/virtual-types.nvim", -- "jubnzv/virtual-types.nvim",
-- "ray-x/lsp_signature.nvim", -- "ray-x/lsp_signature.nvim",
"folke/neodev.nvim", -- 'sontungexpt/better-diagnostic-virtual-text',
{ url = "http://git.sr.ht/~p00f/clangd_extensions.nvim" }, { url = "http://git.sr.ht/~p00f/clangd_extensions.nvim" },
}, },
config = function() config = function()
require("neodev").setup({
library = { plugins = { "nvim-dap-ui" }, types = true },
})
local nvim_lsp = require('lspconfig')
require('clangd_extensions').setup({ require('clangd_extensions').setup({
inlay_hints = {
inline = false,
-- Options other than `highlight' and `priority' only work
-- if `inline' is disabled
-- Only show inlay hints for the current line
only_current_line = false,
-- Event which triggers a refresh of the inlay hints.
-- You can make this { "CursorMoved" } or { "CursorMoved,CursorMovedI" } but
-- not that this may cause higher CPU usage.
-- This option is only respected when only_current_line and
-- autoSetHints both are true.
only_current_line_autocmd = { "CursorHold" },
-- whether to show parameter hints with the inlay hints or not
show_parameter_hints = true,
-- prefix for parameter hints
parameter_hints_prefix = "",
-- prefix for all the other hints (type, chaining)
other_hints_prefix = "",
-- whether to align to the length of the longest line in the file
max_len_align = false,
-- padding from the left if max_len_align is true
max_len_align_padding = 1,
-- whether to align to the extreme right or not
right_align = false,
-- padding from the right if right_align is true
right_align_padding = 7,
-- The color of the hints
highlight = "Comment",
-- The highlight group priority for extmark
priority = 100,
},
ast = { ast = {
-- These are unicode, should be available in any font -- These are unicode, should be available in any font
role_icons = { role_icons = {
@@ -64,25 +28,6 @@ return {
TemplateTemplateParm = "🅃", TemplateTemplateParm = "🅃",
TemplateParamObject = "🅃", TemplateParamObject = "🅃",
}, },
--[[ These require codicons (https://github.com/microsoft/vscode-codicons)
role_icons = {
type = "",
declaration = "",
expression = "",
specifier = "",
statement = "",
["template argument"] = "",
},
kind_icons = {
Compound = "",
Recovery = "",
TranslationUnit = "",
PackExpansion = "",
TemplateTypeParm = "",
TemplateTemplateParm = "",
TemplateParamObject = "",
}, ]]
highlights = { highlights = {
detail = "Comment", detail = "Comment",
}, },
@@ -94,14 +39,15 @@ return {
} }
} }
}) })
vim.lsp.enable('clangd_extensions')
--local lsp_signature = require('lsp_signature') --local lsp_signature = require('lsp_signature')
-- Mappings. -- Mappings.
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float) vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
vim.keymap.set('n', '<leader>E', vim.diagnostic.setloclist) vim.keymap.set('n', '<leader>E', vim.diagnostic.setloclist)
vim.lsp.inlay_hint.enable(true)
-- Use an on_attach function to only map the following keys -- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer -- after the language server attaches to the current buffer
vim.api.nvim_create_autocmd('LspAttach', { vim.api.nvim_create_autocmd('LspAttach', {
@@ -111,84 +57,103 @@ return {
-- See `:help vim.lsp.*` for documentation on any of the below functions -- See `:help vim.lsp.*` for documentation on any of the below functions
local opts = { buffer = ev.buf } local opts = { buffer = ev.buf }
-- vim.keymap.del("n", "gra", opts)
-- vim.keymap.del("v", "gra", opts)
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts)
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) --def vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) --vim.keymap.del("n", "grr", opts)
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, opts) --def vim.keymap.set('n', 'gri', vim.lsp.buf.implementation, opts)
--def vim.keymap.set('n', 'gO', vim.lsp.buf.document_symbol, opts)
--def vim.keymap.set('n', 'grn', vim.lsp.buf.rename, opts)
--vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts) --vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, opts)
--vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts) --vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, opts)
--vim.keymap.set('n', '<space>wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, opts) --vim.keymap.set('n', '<space>wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, opts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts) vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, opts)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, opts)
--vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, opts)
vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts)
vim.keymap.set('n', '<F6>', '<cmd>ClangdSwitchSourceHeader<CR>', opts) vim.keymap.set('n', '<F6>', '<cmd>ClangdSwitchSourceHeader<CR>', opts)
vim.keymap.set("n", "<leader>q", function() vim.lsp.buf.format { async = true } end, opts) vim.keymap.set("n", "<leader>q", function() vim.lsp.buf.format { async = true } end, opts)
require'virtualtypes'.on_attach() -- require 'virtualtypes'.on_attach()
-- require'lsp_signature'.on_attach({ -- require'lsp_signature'.on_attach({
-- floating_window = true, -- floating_window = true,
-- floating_window_above_cur_line = true, -- floating_window_above_cur_line = true,
-- floating_window_off_x = 10, -- floating_window_off_x = 10,
-- floating_window_off_y = 0, -- floating_window_off_y = 0,
-- }) -- })
require("clangd_extensions.inlay_hints").setup_autocmd() -- require("better-diagnostic-virtual-text.api").setup_buf(ev.buf, {
require("clangd_extensions.inlay_hints").set_inlay_hints() -- ui = {
-- wrap_line_after = false, -- wrap the line after this length to avoid the virtual text is too long
-- left_kept_space = 3, --- the number of spaces kept on the left side of the virtual text, make sure it enough to custom for each line
-- right_kept_space = 3, --- the number of spaces kept on the right side of the virtual text, make sure it enough to custom for each line
-- arrow = "  ",
-- up_arrow = "  ",
-- down_arrow = "  ",
-- above = false, -- the virtual text will be displayed above the line
-- },
-- priority = 2003, -- the priority of virtual text
-- inline = true
-- })
local signs = { vim.diagnostic.config({
{ name = "DiagnosticSignError", text = "" }, underline = false,
{ name = "DiagnosticSignWarn", text = "" }, signs = {
{ name = "DiagnosticSignHint", text = "" }, text = {
{ name = "DiagnosticSignInfo", text = "" }, [vim.diagnostic.severity.HINT] = "",
[vim.diagnostic.severity.ERROR] = "",
[vim.diagnostic.severity.INFO] = "",
[vim.diagnostic.severity.WARN] = ""
} }
for _, sign in ipairs(signs) do
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
end
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
signs = false,
severity_sort = true,
underline = true,
update_in_insert = false,
virtual_text = {
spacing = 30,
}, },
float = true virtual_text = false,
} update_in_insert = false,
) severity_sort = true,
-- virtual_lines = {
-- current_line = true,
-- }
})
end end
}) })
local capabilities = require('cmp_nvim_lsp').default_capabilities() --local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.offsetEncoding = { "utf-16" } --local capabilities = require('cmp_nvim_lsp').default_capabilities()
local capabilities = require('blink.cmp').get_lsp_capabilities()
-- local capabilities = vim.tbl_deep_extend('force',
-- vim.lsp.protocol.make_client_capabilities(),
-- require('epo').register_cap()
-- )
--capabilities.offsetEncoding = { "utf-16" }
nvim_lsp.groovyls.setup({ vim.lsp.config('groovyls', {
cmd = { "java", "-jar", "/home/kmcr/tools/groovy-language-server/build/libs/groovy-language-server-all.jar" }, cmd = { "java", "-jar", "/home/kmcr/tools/groovy-language-server/build/libs/groovy-language-server-all.jar" },
capabilities = capabilities capabilities = capabilities
}) })
nvim_lsp.clangd.setup({ vim.lsp.config('clangd_extensions', {
cmd = {
"/workspace/WayveCode/bzl-build/WayveCode/external/llvm_toolchain_llvm/bin/clangd",
"--background-index",
"-j=32",
"--header-insertion=never"},
capabilities = capabilities, capabilities = capabilities,
filetypes = { "cpp" },
}) })
nvim_lsp.pylsp.setup({ vim.lsp.config('pylsp', {
settings = { settings = {
pylint = { pylint = {
enabled = false enabled = true
}, },
pyflakes = { pyflakes = {
enabled = false, enabled = true,
}, },
}, },
capabilities = capabilities capabilities = capabilities
}) })
nvim_lsp.lua_ls.setup({ vim.lsp.config('lua_ls', {
settings = { settings = {
Lua = { Lua = {
diagnostics = { globals = { "vim" } },
completion = { completion = {
callSnippet = "Replace" callSnippet = "Replace"
} }
@@ -196,34 +161,36 @@ return {
} }
}) })
nvim_lsp.matlab_ls.setup({ -- nvim_lsp.matlab_ls.setup({
cmd = { "matlab-language-server", "--stdio"}, -- cmd = { "matlab-language-server", "--stdio" },
filetypes = { "matlab" }, -- filetypes = { "matlab" },
root_dir = nvim_lsp.util.find_git_ancestor, -- -- root_dir = nvim_lsp.util.find_git_ancestor,
single_file_support = true, -- root_dir = vim.fs.dirname(vim.fs.find('.git',
settings = { -- { path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)), upward = true })[1]),
matlab = { -- single_file_support = true,
indexWorkspace = false, -- settings = {
installPath = "/usr/local/MATLAB/R2022b", -- matlab = {
matlabConnectionTiming = "onStart", -- -- indexWorkspace = false,
telemetry = true, -- installPath = "/usr/local/MATLAB/R2024b",
}, -- -- matlabConnectionTiming = "onStart",
} -- -- telemetry = true,
}) -- },
-- }
-- })
nvim_lsp.typos_lsp.setup({ vim.lsp.config('typos_lsp', {
cmd = { 'typos-lsp' }, cmd = { 'typos-lsp' },
filetypes = { '*' }, filetypes = { '*' },
root_dir = nvim_lsp.util.root_pattern('typos.toml', '_typos.toml', '.typos.toml'), root_dir = require("lspconfig.util").root_pattern('typos.toml', '_typos.toml', '.typos.toml'),
single_file_support = true, single_file_support = true,
settings = {}, settings = {},
}) })
-- Use a loop to conveniently call 'setup' on multiple servers and -- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches -- map buffer local keybindings when the language server attaches
local servers = { "cmake", "rust_analyzer", "bashls", "marksman" } local servers = { "cmake", "rust_analyzer", "bashls", "marksman", "bzl" }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup({ vim.lsp.config(lsp, {
capabilities = capabilities, capabilities = capabilities,
}) })
end end

View File

@@ -0,0 +1,75 @@
return {
'niuiic/track.nvim',
dependencies = {
'niuiic/core.nvim'
},
config = function()
require("track").setup({
sign = {
text = "󰍒",
text_color = "#00ff00",
priority = 10,
},
search = {
--@param mark track.Mark
entry_label = function(mark)
return string.format("[%s] %s | %s:%s", mark.id, mark.desc, mark.file, mark.lnum)
end,
--@param marks track.Mark[]
--@return track.Mark[]
sort_entry = function(marks)
return require("core").lua.list.sort(marks, function(prev, cur)
return prev.id < cur.id
end)
end,
},
})
local keys = {
{
"mm",
function()
require("track").toggle()
end,
desc = "toggle mark",
},
{
"mc",
function()
require("track").remove()
end,
desc = "remove all marks",
},
{
"mj",
function()
require("track").jump_to_next()
end,
desc = "jump to next mark",
},
{
"mk",
function()
require("track").jump_to_prev()
end,
desc = "jump to prev mark",
},
{
"me",
function()
require("track").edit()
end,
desc = "edit mark",
},
{
"<space>om",
function()
require("track").search()
end,
desc = "search marks",
},
}
for key, value in pairs(keys) do
vim.keymap.set('n', value[1], value[2], {})
end
end
}

View File

@@ -1,5 +1,91 @@
return { return { {
'richardbizik/nvim-toc', 'richardbizik/nvim-toc',
ft = { "md", "markdown" }, ft = { "md", "markdown" },
config = true, config = true,
}, {
{
'ChuufMaster/markdown-toc',
opts = {
-- The heading level to match (i.e the number of "#"s to match to) max 6
heading_level_to_match = -1,
-- Set to True display a dropdown to allow you to select the heading level
ask_for_heading_level = true,
-- TOC default string
-- WARN
toc_format = '%s- [%s](<%s#%s>)',
},
ft = { "md", "markdown" },
}, {
'SCJangra/table-nvim',
ft = {'markdown', 'md' },
opts = {},
}
},
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
build = "cd app && npm install",
init = function()
vim.g.mkdp_filetypes = { "markdown" }
end,
ft = { "markdown", "md" },
},
-- {
-- "brianhuster/live-preview.nvim",
-- opts = {
-- cmd = "LivePreview", -- Main command of live-preview.nvim
-- port = 5500, -- Port to run the live preview server on.
-- autokill = false, -- If true, the plugin will autokill other processes running on the same port (except for Neovim) when starting the server.
-- browser = 'default', -- Terminal command to open the browser for live-previewing (eg. 'firefox', 'flatpak run com.vivaldi.Vivaldi'). By default, it will use the default browser.
-- dynamic_root = false, -- If true, the plugin will set the root directory to the previewed file's directory. If false, the root directory will be the current working directory (`:lua print(vim.uv.cwd())`).
-- sync_scroll = false, -- If true, the plugin will sync the scrolling in the browser as you scroll in the Markdown files in Neovim.
-- picker = nil, -- Picker to use for opening files. 3 choices are available: 'telescope', 'fzf-lua', 'mini.pick'. If nil, the plugin look for the first available picker when you call the `pick` command.
-- },
-- enabled = false,
-- },
{
'MeanderingProgrammer/render-markdown.nvim',
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.icons' }, -- if you use standalone mini plugins
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
---@module 'render-markdown'
---@type render.md.UserConfig
opts = {
completions = { blink = { enabled = true } },
render_modes = { 'n', 'c', 't' },
},
enabled = false
},
{
'Thiago4532/mdmath.nvim',
dependencies = {
'nvim-treesitter/nvim-treesitter',
},
opts = {
-- Filetypes that the plugin will be enabled by default.
filetypes = {'markdown'},
-- Color of the equation, can be a highlight group or a hex color.
-- Examples: 'Normal', '#ff0000'
foreground = 'Normal',
-- Hide the text when the equation is under the cursor.
anticonceal = true,
-- Hide the text when in the Insert Mode.
hide_on_insert = true,
-- Enable dynamic size for non-inline equations.
dynamic = true,
-- Configure the scale of dynamic-rendered equations.
dynamic_scale = 1.0,
-- Interval between updates (milliseconds).
update_interval = 400,
-- Internal scale of the equation images, increase to prevent blurry images when increasing terminal
-- font, high values may produce aliased images.
-- WARNING: This do not affect how the images are displayed, only how many pixels are used to render them.
-- See `dynamic_scale` to modify the displayed size.
internal_scale = 1.0,
}
},
} }

View File

@@ -2,6 +2,7 @@ return {
-- <leader>mm -- <leader>mm
'gorbit99/codewindow.nvim', 'gorbit99/codewindow.nvim',
config = function() config = function()
require('codewindow').setup()
require('codewindow').apply_default_keybinds() require('codewindow').apply_default_keybinds()
end, end,
} }

View File

@@ -8,6 +8,11 @@ return {
none_ls.builtins.diagnostics.gitlint, none_ls.builtins.diagnostics.gitlint,
none_ls.builtins.diagnostics.cmake_lint, none_ls.builtins.diagnostics.cmake_lint,
none_ls.builtins.diagnostics.codespell, none_ls.builtins.diagnostics.codespell,
none_ls.builtins.diagnostics.fish,
none_ls.builtins.diagnostics.mypy,
--none_ls.builtins.diagnostics.mlint, - find it
--none_ls.builtins.diagnostics.commitlint, - written in npm
--none_ls.builtins.diagnostics.checkmake, - written in go
none_ls.builtins.hover.dictionary, none_ls.builtins.hover.dictionary,
none_ls.builtins.formatting.black}, none_ls.builtins.formatting.black},
}) })

View File

@@ -1,132 +1,167 @@
return { return {
{ 'tzachar/cmp-ai', dependencies = 'nvim-lua/plenary.nvim'}, {
{ 'petertriho/cmp-git'}, "nomnivore/ollama.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
-- All the user commands added by the plugin
cmd = { "Ollama", "OllamaModel", "OllamaServe", "OllamaServeStop" },
keys = {
-- Sample keybind for prompt menu. Note that the <c-u> is important for selections to work properly.
{
"<leader>oo",
":<c-u>lua require('ollama').prompt()<cr>",
desc = "ollama prompt",
mode = { "n", "v" },
},
-- Sample keybind for direct prompting. Note that the <c-u> is important for selections to work properly.
{
"<leader>oG",
":<c-u>lua require('ollama').prompt('Generate_Code')<cr>",
desc = "ollama Generate Code",
mode = { "n", "v" },
},
},
---@type Ollama.Config
opts = {
model = "qwen2.5-coder",
url = "http://192.168.10.99:11434",
-- your configuration overrides
},
enabled = false
},
{
"mireq/luasnip-snippets",
dependencies = {
"L3MON4D3/LuaSnip"
},
config = function()
require('luasnip_snippets.common.snip_utils').setup()
end,
enabled = false
},
{
"L3MON4D3/LuaSnip",
dependencies = {
"saadparwaiz1/cmp_luasnip"
},
-- follow latest release.
version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
-- install jsregexp (optional!).
build = "make install_jsregexp",
config = function()
-- Mandatory setup function
local luasnip = require("luasnip")
luasnip.setup({
load_ft_func = require('luasnip_snippets.common.snip_utils').load_ft_func,
ft_func = require('luasnip_snippets.common.snip_utils').ft_func,
-- To enable auto expansin
enable_autosnippets = true,
})
vim.keymap.set({"i", "s"}, "<Tab>", function() if luasnip.expand_or_jumpable() then luasnip.expand_or_jump() else vim.api.nvim_input('<C-V><Tab>') end end, {silent = true})
vim.keymap.set({"i", "s"}, "<S-Tab>", function() luasnip.jump(-1) end, {silent = true})
vim.keymap.set({"i", "s"}, "<C-E>", function() if luasnip.choice_active() then luasnip.change_choice(1) end end, {silent = true})
end,
enabled = false
},
{
'tzachar/cmp-ai',
dependencies = 'nvim-lua/plenary.nvim',
enabled = false
},
{ {
'hrsh7th/nvim-cmp', 'hrsh7th/nvim-cmp',
dependencies = { dependencies = {
'dcampos/cmp-snippy',
--'mstanciu552/cmp-matlab',
'petertriho/cmp-git',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-cmdline',
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-nvim-lsp-signature-help', 'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path', 'hrsh7th/cmp-path',
'hrsh7th/cmp-calc', 'hrsh7th/cmp-cmdline',
'tzachar/cmp-ai' 'hrsh7th/nvim-cmp',
'L3MON4D3/LuaSnip',
"saadparwaiz1/cmp_luasnip",
'tzachar/cmp-ai',
}, },
event = "InsertEnter",
config = function() config = function()
local cmp = require 'cmp' local cmp = require 'cmp'
local snippy = require'snippy'
local cmp_ai = require('cmp_ai.config') local cmp_ai = require('cmp_ai.config')
cmp_ai:setup({ cmp_ai:setup({
max_lines = 100, max_lines = 100,
provider = 'Ollama', provider = 'Ollama',
provider_options = { provider_options = {
model = 'deepseek-coder:6.7b', base_url = 'http://192.168.10.99:11434/api/generate',
base_url = 'http://batman.local:11434/api/generate', model = 'qwen2.5-coder:latest',
prompt = function(lines_before, lines_after) prompt = function(lines_before, lines_after)
-- prompt depends on the model you use. Here is an example for deepseek coder return "<|fim_prefix|>" .. lines_before .. "<|fim_suffix|>" .. lines_after .. "<|fim_middle|>"
return '<PRE> ' .. lines_before .. ' <SUF>' .. lines_after .. ' <MID>' -- for codellama
end, end,
}, },
debounce_delay = 600, -- ms llama may be GPU hungry, wait x ms after last key input, before sending request to it
notify = true, notify = true,
notify_callback = function(msg) notify_callback = function(msg)
vim.notify(msg) vim.notify(msg)
end, end,
run_on_every_keystroke = true, run_on_every_keystroke = true,
ignored_file_types = {
-- default is not to ignore
-- uncomment to ignore in lua:
-- lua = true
},
})
local default_cmp_sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'nvim_lsp_signature_help' },
{ name = 'path' },
{ name = 'snippy' },
{ name = 'calc' },
--{ name = 'cmp_git' },
--{ name = 'cmp_ai' },
})
local bufIsBig = function(bufnr)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = vim.loop.fs_stat(vim.api.nvim_buf_get_name(bufnr))
if ok and stats and stats.size > max_filesize then
return true
else
return false
end
end
-- If a file is too large, I don't want to add to it's cmp sources treesitter, see:
-- https://github.com/hrsh7th/nvim-cmp/issues/1522
vim.api.nvim_create_autocmd('BufReadPre', {
callback = function(t)
local sources = default_cmp_sources
if not bufIsBig(t.buf) then
sources[#sources+1] = {name = 'treesitter', group_index = 2}
end
cmp.setup.buffer {
sources = sources
}
end
}) })
cmp.setup({ cmp.setup({
snippet = { snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args) expand = function(args)
snippy.expand_snippet(args.body) --vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
-- vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+)
end, end,
}, },
window = { window = {
completion = cmp.config.window.bordered(), completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(), documentation = cmp.config.window.bordered(),
}, },
experimental = {
ghost_text = true,
},
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
['<C-p>'] = cmp.mapping.select_prev_item(), ['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-u>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4), ['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(), ['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(), ['<C-e>'] = cmp.mapping.abort(),
['<C-y>'] = cmp.mapping.confirm({ select = true }), ['<C-y>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
}), }),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = 'nvim_lsp' }, { name = 'nvim_lsp' },
{ name = 'nvim_lsp_signature_help' }, -- { name = 'vsnip' }, -- For vsnip users.
{ name = 'path' }, { name = 'luasnip' }, -- For luasnip users.
{ name = 'snippy' }, -- { name = 'ultisnips' }, -- For ultisnips users.
{ name = 'calc' }, -- { name = 'snippy' }, -- For snippy users.
{ name = 'cmp_git' }, --{ name = 'cmp_ai' }
}, { }, {
{ name = 'buffer', keyword_length = 5, max_item_count = 10, priority = -5 }, { name = 'buffer' },
}), }),
sources = sources, performance = {
sorting = { fetching_timeout = 20,
comparators = { debounce = 10,
require('cmp_ai.compare'), throttle = 10,
cmp.config.compare.offset, async_budget = 20000,
cmp.config.compare.exact, max_view_entries = 10,
cmp.config.compare.recently_used, confirm_resolve_timeout = 10,
require("clangd_extensions.cmp_scores"), filtering_context_budget = 10
cmp.config.compare.kind, }
cmp.config.compare.sort_text,
cmp.config.compare.length,
cmp.config.compare.order,
},
},
}) })
-- To use git you need to install the plugin petertriho/cmp-git and uncomment lines below
-- Set configuration for specific filetype.
--[[ cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'git' },
}, {
{ name = 'buffer' },
})
})
require("cmp_git").setup() ]]
--
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline({ '/', '?' }, { cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(), mapping = cmp.mapping.preset.cmdline(),
sources = { sources = {
@@ -134,24 +169,17 @@ return {
} }
}) })
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
cmp.setup.cmdline(':', { cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(), mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = 'path' } { name = 'path' }
}, { }, {
{ name = 'cmdline' } { name = 'cmdline' }
}),
matching = { disallow_symbol_nonprefix_matching = false }
}) })
}) end,
enabled = false
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{name = 'cmp_git' },
}, {
{name = 'buffer' }
})
})
require("cmp_git").setup()
end
} }
} }

View File

@@ -1,7 +1,7 @@
return { return {
'kyazdani42/nvim-tree.lua', 'nvim-tree/nvim-tree.lua',
dependencies = { dependencies = {
'kyazdani42/nvim-web-devicons', 'nvim-tree/nvim-web-devicons',
}, },
config = function() config = function()
vim.g.nvim_tree_refresh_wait = 1000 vim.g.nvim_tree_refresh_wait = 1000

View File

@@ -1,6 +1,5 @@
return { return {
"epwalsh/obsidian.nvim", "epwalsh/obsidian.nvim",
version = "*", -- recommended, use latest release instead of latest commit
--lazy = true, --lazy = true,
--ft = "markdown", --ft = "markdown",
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
@@ -10,12 +9,6 @@ return {
-- "BufReadPre path/to/my-vault/**.md", -- "BufReadPre path/to/my-vault/**.md",
-- "BufNewFile path/to/my-vault/**.md", -- "BufNewFile path/to/my-vault/**.md",
-- }, -- },
dependencies = {
-- Required.
"nvim-lua/plenary.nvim",
-- see below for full list of optional dependencies 👇
},
opts = { opts = {
workspaces = { workspaces = {
{ {
@@ -28,4 +21,5 @@ return {
}, },
}, },
}, },
enabled = false
} }

View File

@@ -1,8 +1,15 @@
return { return {{
'stevearc/oil.nvim', 'stevearc/oil.nvim',
opts = { opts = {
delete_to_trash = true, delete_to_trash = true,
}, },
vim.keymap.set("n", "<leader>tt", "<CMD>Oil<CR>", { desc = "Open parent directory" }) vim.keymap.set("n", "<leader>tt", "<CMD>Oil<CR>", { desc = "Open parent directory" })
} }, {
'mong8se/buffish.nvim',
vim.keymap.set("n", "<leader>tb", function() require('buffish').open() end, { desc = "Open buffers list" })
}, {
"benomahony/oil-git.nvim",
dependencies = { "stevearc/oil.nvim" },
enabled = false
}}

View File

@@ -0,0 +1,6 @@
return {
"ZWindL/orphans.nvim",
config = function()
require('orphans').setup({})
end
}

View File

@@ -0,0 +1,57 @@
return { -- Custom highlight for stim files
"folke/paint.nvim",
config = function()
vim.filetype.add({
extension = {
log = 'log',
}})
require("paint").setup({
---@type PaintHighlight[]
highlights = {
{
filter = { filetype = "log" },
pattern = "EFMC",
hl = "DiffDelete",
},
{
filter = { filetype = "log" },
pattern = "CoCo",
hl = "DiffAdd",
},
{
filter = { filetype = "log" },
pattern = "EneM",
hl = "DiffChange",
},
{
filter = { filetype = "log" },
pattern = "CuLi",
hl = "DiffChange",
},
{
filter = { filetype = "log" },
pattern = "Hoca",
hl = "MatchParen",
},
{
filter = { filetype = "log" },
pattern = "Inverter",
hl = "RedrawDebugClear",
},
{
filter = { filetype = "log" },
pattern = "Wallbox",
hl = "RedrawDebugComposed",
},
{
filter = { filetype = "log" },
pattern = "Vehicle",
hl = "RedrawDebugRecompose",
},
},
})
end,
}

View File

@@ -39,5 +39,6 @@ return {
--vim.fn.system('i3-msg move left') --vim.fn.system('i3-msg move left')
end end
end, {}) end, {})
end end,
enabled = false
} }

View File

@@ -0,0 +1,7 @@
return {
"ptdewey/pendulum-nvim",
config = function()
require("pendulum").setup()
end,
enabled = false
}

View File

@@ -0,0 +1,34 @@
return {
'stevearc/quicker.nvim',
config = function()
require('quicker').setup()
vim.keymap.set("n", "<leader>q", function()
require("quicker").toggle()
end, {
desc = "Toggle quickfix",
})
vim.keymap.set("n", "<leader>l", function()
require("quicker").toggle({ loclist = true })
end, {
desc = "Toggle loclist",
})
require("quicker").setup({
keys = {
{
">",
function()
require("quicker").expand({ before = 2, after = 2, add_to_existing = true })
end,
desc = "Expand quickfix context",
},
{
"<",
function()
require("quicker").collapse()
end,
desc = "Collapse quickfix context",
},
},
})
end
}

View File

@@ -0,0 +1,31 @@
return {
"petrichorma/nvim_ds_repl",
requires = "nvim-treesitter",
config = function()
vim.api.nvim_create_autocmd({ "BufEnter", "BufWinEnter" }, {
pattern = { "*.py", "*.R" },
callback = function()
-- Execute the current statement or block under the cursor
vim.keymap.set("n", '<CR>', function()
require('nvim_ds_repl').send_statement_definition()
end, { noremap = true })
-- Execute the selected visual block of code
vim.keymap.set("v", '<CR>', function()
require('nvim_ds_repl').send_visual_to_repl()
end, { noremap = true })
-- Query global environment variable information
vim.keymap.set("n", '<leader>wi', function()
require('nvim_ds_repl').query_global()
end, { noremap = true })
-- Query information about the specific object under the cursor
vim.keymap.set("n", '<leader>si', function()
require('nvim_ds_repl').inspect()
end, { noremap = true })
end
})
end,
enabled = false
}

View File

@@ -0,0 +1,3 @@
return {
'tpope/vim-abolish'
}

View File

@@ -1,21 +0,0 @@
return {
'dcampos/nvim-snippy',
dependencies = {
'dcampos/cmp-snippy',
'honza/vim-snippets',
},
event = "InsertEnter",
config = function()
require('snippy').setup({
mappings = {
is = {
['<cr>'] = 'expand_or_advance',
['<S-cr>'] = 'previous',
},
nx = {
['<leader>x'] = 'cut_text',
},
},
})
end
}

View File

@@ -1,5 +1,5 @@
return { return {
'edluffy/specs.nvim', 'cxwx/specs.nvim',
config = function() config = function()
require('specs').setup{ require('specs').setup{
show_jumps = true, show_jumps = true,

View File

@@ -49,7 +49,7 @@ return {
return res return res
end end
require('symbol-usage').setup({ require('symbol-usage').setup({
vt_position = "above", vt_position = "end_of_line",
references = { enabled = true, include_declaration = true }, references = { enabled = true, include_declaration = true },
definition = { enabled = true }, definition = { enabled = true },
implementation = { enabled = true }, implementation = { enabled = true },

View File

@@ -3,6 +3,7 @@ return {
dependencies = { dependencies = {
'renerocksai/calendar-vim' 'renerocksai/calendar-vim'
}, },
ft = { "markdown" },
config = function() config = function()
require('telekasten').setup({ require('telekasten').setup({
home = vim.fn.expand("~/zettelkasten"), home = vim.fn.expand("~/zettelkasten"),
@@ -22,5 +23,6 @@ return {
-- Call insert link automatically when we start typing a link -- Call insert link automatically when we start typing a link
vim.keymap.set("i", "[[", "<cmd>Telekasten insert_link<CR>") vim.keymap.set("i", "[[", "<cmd>Telekasten insert_link<CR>")
end end,
enabled = false
} }

View File

@@ -4,16 +4,49 @@ return {
'debugloop/telescope-undo.nvim', 'debugloop/telescope-undo.nvim',
'molecule-man/telescope-menufacture', 'molecule-man/telescope-menufacture',
'nvim-telescope/telescope-symbols.nvim', 'nvim-telescope/telescope-symbols.nvim',
'mrloop/telescope-git-branch.nvim',
{ {
{ 'isak102/telescope-git-file-history.nvim',
"isak102/telescope-git-file-history.nvim", dependencies = { 'tpope/vim-fugitive' }
dependencies = { "tpope/vim-fugitive" } },
} 'kiyoon/telescope-insert-path.nvim',
} 'zongben/navimark.nvim',
'johmsalas/text-case.nvim',
}, },
event = 'VeryLazy', event = 'VeryLazy',
--cmd = ":Telescope", --cmd = ":Telescope",
config = function() config = function()
require('navimark').setup({
--set "" to disable keymapping
keymap = {
base = {
mark_toggle = "<leader>mt",
mark_add = "<leader>ma",
mark_remove = "<leader>mr",
goto_next_mark = "]m",
goto_prev_mark = "[m",
open_mark_picker = "<leader>fm",
},
telescope = {
n = {
delete_mark = "d",
clear_marks = "c",
new_stack = "n",
next_stack = "<Tab>",
prev_stack = "<S-Tab>",
rename_stack = "r",
delete_stack = "D",
open_all_marked_files = "<C-o>", -- open all marked files in current stack
},
},
},
sign = {
text = "",
color = "#FF0000",
},
--set to true to persist marks
persist = false,
})
-- require('telescope').load_extension('ultisnips') -- require('telescope').load_extension('ultisnips')
require('telescope').setup { require('telescope').setup {
extensions = { extensions = {
@@ -24,31 +57,48 @@ return {
}, },
} }
} }
require('textcase').setup({
enabled_methods = {
"to_lower_case",
"to_snake_case",
"to_dash_case",
"to_constant_case",
"to_camel_case",
"to_title_case",
"to_path_case",
}
})
require('telescope').load_extension('undo') require('telescope').load_extension('undo')
require('telescope').load_extension('menufacture') require('telescope').load_extension('menufacture')
require("telescope").load_extension("git_file_history") require("telescope").load_extension("git_file_history")
require("telescope").load_extension("git_branch")
local def = { noremap = true, silent = true } local def = { noremap = true, silent = true }
local map = vim.keymap.set local map = vim.keymap.set
map('n', '<leader>r', '<cmd>lua require("telescope.builtin").resume()<cr>', def) map('n', '<leader>fr', function() require("telescope.builtin").resume() end, def)
map('n', '<leader>f', '<cmd>lua require("telescope").extensions.menufacture.find_files()<cr>', def) map('n', '<leader>ff', function() require("telescope").extensions.menufacture.find_files() end, def)
map('n', '<leader>a', '<cmd>lua require("telescope").extensions.menufacture.grep_string()<cr>', def) map('n', '<leader>fa', function() require("telescope").extensions.menufacture.grep_string() end, def)
map('n', '<leader>s', '<cmd>lua require("telescope").extensions.menufacture.live_grep()<cr>', def) map('n', '<leader>fs', function() require("telescope").extensions.menufacture.live_grep() end, def)
map('n', '<leader>b', '<cmd>lua require("telescope.builtin").buffers()<cr>', def) map('n', '<leader>fb', function() require("telescope.builtin").buffers() end, def)
-- map('n', '<leader>fh', '<cmd>lua require('telescope.builtin').help_tags()<cr>, def) -- map('n', '<leader>fh', function() require('telescope.builtin').help_tags() end, def)
map('n', '<leader>tc', '<cmd>lua require("telescope.builtin").commands()<cr>', def) map('n', '<leader>fc', function() require("telescope.builtin").commands() end, def)
map('n', '<leader>t:', '<cmd>lua require("telescope.builtin").command_history()<cr>', def) map('n', '<leader>f:', function() require("telescope.builtin").command_history() end, def)
map('n', '<leader>t/', '<cmd>lua require("telescope.builtin").search_history()<cr>', def) map('n', '<leader>f/', function() require("telescope.builtin").search_history() end, def)
map('n', '<leader>tr', '<cmd>lua require("telescope.builtin").registers()<cr>', def) map('n', '<leader>fr', function() require("telescope.builtin").registers() end, def)
-- Neovim lsp pickers -- Neovim lsp pickers
map('n', 'gr', '<cmd>lua require("telescope.builtin").lsp_references()<cr>', def) map('n', 'grr', function() require("telescope.builtin").lsp_references() end, def)
map('n', 'gd', '<cmd>lua require("telescope.builtin").lsp_definitions()<cr>', def) map('n', 'gd', function() require("telescope.builtin").lsp_definitions() end, def)
map('n', 'grt', "<cmd>TextCaseOpenTelescope<CR>", def)
map('x', 'grt', "<cmd>TextCaseOpenTelescope<CR>", def)
-- git pickers -- git pickers
-- map('n', '<leader>gc', '<cmd>lua require("telescope.builtin").git_commits()<cr>', def) -- map('n', '<leader>gc', function() require("telescope.builtin").git_commits() end, def)
-- map('n', '<leader>gC', '<cmd>lua require("telescope.builtin").git_bcommits()<cr>', def) -- map('n', '<leader>gC', function() require("telescope.builtin").git_bcommits() end, def)
-- map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', def) -- map('n', '<leader>gb', function() require("telescope.builtin").git_branches() end, def)
-- map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', def) -- map('n', '<leader>gb', function() require("telescope.builtin").git_branches() end, def)
-- other -- other
-- map('n', '<leader>s', '<cmd>lua require('telescope').extensions.ultisnips.ultisnips()<cr>, def) -- map('n', '<leader>s', function() require('telescope').extensions.ultisnips.ultisnips() end, def)
map('n', '<leader>u', '<cmd>lua require("telescope").extensions.undo.undo()<cr>', def) map('n', '<leader>fu', function() require("telescope").extensions.undo.undo() end, def)
map('n', '<leader>fg', function() require('git_branch').files() end, def)
map('n', '<C-.>', function() require('telescope_insert_path').insert_relpath_insert() end, def)
map('n', '<C-/>', function() require('telescope_insert_path').insert_abspath_insert() end, def)
end end
} }

View File

@@ -0,0 +1,3 @@
return {
"QuentinGruber/timespent.nvim",
}

View File

@@ -11,6 +11,7 @@ return {
extra_groups = {}, -- table: additional groups that should be cleared extra_groups = {}, -- table: additional groups that should be cleared
exclude_groups = {}, -- table: groups you don't want to clear exclude_groups = {}, -- table: groups you don't want to clear
}) })
vim.cmd([[TransparentEnable]])
end, end,
--cmd = {"TransparentEnable", "TransparentDisable", "TransparentToggle" }, --cmd = {"TransparentEnable", "TransparentDisable", "TransparentToggle" },
} }

View File

@@ -7,23 +7,15 @@ return {
--"nvim-treesitter/playground", --"nvim-treesitter/playground",
}, },
build = ':TSUpdate', build = ':TSUpdate',
config = function() opts = function()
-- Tree-sitter configuration -- Tree-sitter configuration
local ts = require'nvim-treesitter.configs' local ts = require'nvim-treesitter.configs'
ts.setup { ts.setup {
highlight = { ignore_install = {'javascript'},
enable = true, sync_install = true,
disable = function(lang, buf) auto_install = true,
local max_filesize = 100 * 1024
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
additional_vim_regex_highlighting = false,
},
ensure_installed = { ensure_installed = {
"arduino", "arduino",
"awk", "awk",
@@ -49,7 +41,7 @@ return {
"ini", "ini",
"jq", "jq",
"json", "json",
"latex", --"latex",
"lua", "lua",
"make", "make",
"markdown", "markdown",
@@ -64,8 +56,20 @@ return {
"vim", "vim",
"yaml", "yaml",
}, },
indent = { modules = {},
highlight = {
enable = true, enable = true,
-- disable = function(lang, buf)
-- local max_filesize = 100 * 1024 -- 100 KB
-- local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
-- if ok and stats and stats.size > max_filesize then
-- return true
-- end
-- end,
additional_vim_regex_highlighting = false,
},
indent = {
enable = false,
}, },
incremental_selection = { incremental_selection = {
enable = true, enable = true,
@@ -79,10 +83,11 @@ return {
matchup = { matchup = {
enable = true, enable = true,
-- disable = { "c", "ruby" }, -- disable = { "c", "ruby" },
include_match_words
}, },
} }
vim.opt.foldmethod = "expr" vim.opt.foldmethod = "manual"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()" vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
vim.opt.foldlevelstart = 99
vim.opt.foldminlines = 50
end end
} }

View File

@@ -1,7 +1,7 @@
return { return {
'folke/trouble.nvim', 'folke/trouble.nvim',
dependencies = { dependencies = {
'kyazdani42/nvim-web-devicons', 'nvim-tree/nvim-web-devicons',
}, },
config = true, config = true,
} }

View File

@@ -0,0 +1,12 @@
return {
'vimwiki/vimwiki',
init = function()
vim.g.vimwiki_list = {{
path = '~/vimwiki/',
syntax= 'markdown',
ext= 'md'
}}
vim.g.vimwiki_global_ext = 0
end,
filetype = { 'vimwiki' }
}

View File

@@ -0,0 +1,5 @@
return {
"Kohei-Wada/yadm-git.nvim",
lazy = true,
event = "VeryLazy",
}

View File

@@ -0,0 +1,15 @@
return {
"daltongd/yanklock.nvim",
opts = {
notify = true, -- optional
},
keys = {
{
"<leader>yl",
function()
require("yanklock").toggle()
end,
desc = "yanklock toggle",
},
},
}

12
.gitattributes vendored
View File

@@ -1,6 +1,6 @@
*.bmp diff=image #*.bmp diff=image
*.gif diff=image #*.gif diff=image
*.jpeg diff=image #*.jpeg diff=image
*.jpg diff=image #*.jpg diff=image
*.png diff=image #*.png diff=image
*.svg diff=image #*.svg diff=image

View File

@@ -1,44 +1,59 @@
[push]
default = simple
[user] [user]
name = Robert Kmieć name = Robert Kmieć
email = KmcR@viessmann.com email = robert.r.kmiec@gmail.com
[core] [core]
editor = nvim editor = nvim
pager = delta pager = delta
autocrlf = false autocrlf = false
excludesfile = /home/rkmiec/.config/git/ignore excludesfile = ~/.config/git/ignore
symlinks = true symlinks = true
attributesfile = ~/.gitattributes attributesfile = ~/.gitattributes
fsmonitor = true fsmonitor = true
#attributesfile = ~/.gitattributes untrackedCache = true
[init]
defaultBranch = master
[advice]
detachedHead = false
[help] [help]
autocorrect = 1 autocorrect = 1
[color] [color]
ui = true ui = true
[column]
ui = auto
[grep] [grep]
linenumber = true linenumber = true
[sendemail] parrernType = perl
smtpencryption = tls [fetch]
smtpserver = smtp.gmail.com writeCommitGraph = true
smtpuser = robert.r.kmiec@gmail.com all = true
smtpserverport = 587 #pruneTags = true
[merge] [push]
conflictstyle = diff3 default = simple
tool = nfugitive autoSetupRemote = true
[mergetool "nfugitive"]
cmd = nvim -c "Gvdiffsplit!" "$MERGED"
[diff]
tool = nvimdiff
[difftool "nvimdiff"]
cmd = nvim -d "$LOCAL" "$REMOTE"
[diff "markdown"]
xfuncname = "^#+.*$"
[filter "lfs"] [filter "lfs"]
clean = git-lfs clean -- %f clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f smudge = git-lfs smudge -- %f
process = git-lfs filter-process process = git-lfs filter-process
required = true required = true
[pull]
rebase = true
[rebase]
autosquash = true
autostash = true
updateRefs = true
[commit]
template = .gitmessage
verbose = false
[submodule]
recurse = false
fetchJobs = 4
[rerere]
enabled = true
autoupdate = true
[branch]
sort = committerdate
[tag]
sort = version:refname
[alias] [alias]
cm = commit cm = commit
co = checkout co = checkout
@@ -51,9 +66,38 @@
diff-image = "!f() { cd -- \"${GIT_PREFIX:-.}\"; GIT_DIFF_IMAGE_ENABLED=1 git diff \"$@\"; }; f" diff-image = "!f() { cd -- \"${GIT_PREFIX:-.}\"; GIT_DIFF_IMAGE_ENABLED=1 git diff \"$@\"; }; f"
[interactive] [interactive]
diffFilter = delta --color-only diffFilter = delta --color-only
[merge]
conflictstyle = zdiff3
tool = nfugitive
[mergetool "nfugitive"]
cmd = nvim -c "Gvdiffsplit!" "$MERGED"
[diff]
tool = nvimdiff
colorMoved = plain
algorithm = histogram
renames = true
mnemonicPrefix = true
[difftool "nvimdiff"]
cmd = nvim -d "$LOCAL" "$REMOTE"
[diff "image"]
command = /home/kmcr/tools/git-diff-image/git_diff_image
textconv = imgcat
[diff "model"]
command = /home/kmcr/tools/git-diff-image/git_diff_image
textconv = imgcat
[diff "markdown"]
xfuncname = "^#+.*$"
[delta] [delta]
features = side-by-side line-numbers decorations features = side-by-side line-numbers decorations
whitespace-error-style = 22 reverse whitespace-error-style = 22 reverse
navigate = true
; dark = true
; side-by-side = true
; line-numbers = true
; hyperlinks = true
; # colorMoved support
; map-styles = bold purple => syntax magenta, bold cyan => syntax blue
; true-color = always
[delta "decorations"] [delta "decorations"]
commit-decoration-style = bold yellow box ul commit-decoration-style = bold yellow box ul
file-style = bold yellow ul file-style = bold yellow ul
@@ -63,16 +107,8 @@
[commit] [commit]
template = .gitmessage template = .gitmessage
verbose = false verbose = false
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[init] [init]
defaultBranch = master defaultBranch = master
[diff "image"]
command = /home/kmcr/tools/git-diff-image/git_diff_image
textconv = imgcat
[diff "model"]
command = /home/kmcr/tools/git-diff-image/git_diff_image
textconv = imgcat
[advice] [advice]
detachedHead = false detachedHead = false
[submodule] [submodule]
@@ -83,7 +119,29 @@
ui = auto ui = auto
[branch] [branch]
sort = -commiterdate sort = -commiterdate
[fetch] [pull]
writeCommitGraph = true rebase = true
[commit]
#template = .gitmessage
verbose = false
[init]
defaultBranch = master
[advice]
detachedHead = false
[submodule]
recurse = false
[rerere]
enabled = true
[column]
ui = auto
[branch]
sort = -commiterdate
[maintenance] [maintenance]
repo = /home/kmcr/repos/hems/hemsmilsimulation repo = /home/kmcr/repos/hems/hemsmilsimulation
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
smtpuser = robert.r.kmiec@gmail.com
smtpserverport = 587
[feature]
experimental = true