Compare commits

...

11 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
39 changed files with 1536 additions and 1403 deletions

View File

@@ -1,5 +1,9 @@
Xft.dpi: 96
Xcursor.size: 16
Xcursor.size: 6
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.hintstyle: hintslight
! URxvt
URxvt.font:xft:iM WritingMonoS Nerd Font:size=12
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")
-- Notification library
local naughty = require("naughty")
-- Declarative object management
local ruled = require("ruled")
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup")
-- Enable hotkeys help widget for VIM and other apps
-- when client with a matching name is opened:
require("awful.hotkeys_popup.keys")
-- Load Debian menu entries
local debian = require("debian.menu")
local has_fdo, freedesktop = pcall(require, "freedesktop")
-- {{{ Error handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
-- 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
naughty.connect_signal("request::display_error", function(message, startup)
naughty.notification {
urgency = "critical",
title = "Oops, an error happened"..(startup and " during startup!" or "!"),
message = message
}
end)
-- }}}
-- {{{ Variable definitions
@@ -52,7 +37,7 @@ end
beautiful.init(gears.filesystem.get_configuration_dir() .. "my_theme.lua")
-- 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_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.
-- However, you can use another modifier like Mod1, but it may interact with others.
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
@@ -97,20 +62,12 @@ myawesomemenu = {
local menu_awesome = { "awesome", myawesomemenu, beautiful.awesome_icon }
local menu_terminal = { "open terminal", terminal }
if has_fdo then
mymainmenu = freedesktop.menu.build({
before = { menu_awesome },
after = { menu_terminal }
})
else
mymainmenu = awful.menu({
items = {
menu_awesome,
{ "Debian", debian.menu.Debian_menu.Debian },
menu_terminal,
}
})
end
mymainmenu = awful.menu({
items = {
menu_awesome,
menu_terminal,
}
})
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
-- }}}
-- {{{ 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
mykeyboardlayout = awful.widget.keyboardlayout()
-- {{{ Wibar
-- Create a textclock widget
mytextclock = wibox.widget {
format = "%a %y %m %_d - %_H %M %S",
@@ -131,65 +131,7 @@ mytextclock = wibox.widget {
widget = wibox.widget.textclock
}
-- Create a wibox for each screen and add it
local taglist_buttons = gears.table.join(
awful.button({ }, 1, function(t) t:view_only() end),
awful.button({ modkey }, 1, function(t)
if client.focus then
client.focus:move_to_tag(t)
end
end),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, function(t)
if client.focus then
client.focus:toggle_tag(t)
end
end),
awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end),
awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end)
)
local tasklist_buttons = gears.table.join(
awful.button({ }, 1, function (c)
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)
screen.connect_signal("request::desktop_decoration", function(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])
@@ -199,20 +141,54 @@ awful.screen.connect_for_each_screen(function(s)
-- 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)))
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,
buttons = taglist_buttons,
layout = wibox.layout.fixed.vertical,
--widget = wibox.container.rotate,
buttons = {
awful.button({ }, 1, function(t) t:view_only() end),
awful.button({ modkey }, 1, function(t)
if client.focus then
client.focus:move_to_tag(t)
end
end),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, function(t)
if client.focus then
client.focus:toggle_tag(t)
end
end),
awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end),
}
}
-- Create a tasklist widget
s.mytasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
buttons = {
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
@@ -237,7 +213,6 @@ awful.screen.connect_for_each_screen(function(s)
direction = s.rotation,
widget = wibox.container.rotate
}
-- Add widgets to the wibox
s.mywibox:setup {
layout = wibox.layout.align.vertical,
@@ -257,27 +232,61 @@ awful.screen.connect_for_each_screen(function(s)
},
}
end)
-- }}}
-- {{{ Mouse bindings
root.buttons(gears.table.join(
awful.mouse.append_global_mousebindings({
awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
))
awful.button({ }, 4, awful.tag.viewprev),
awful.button({ }, 5, awful.tag.viewnext),
})
-- }}}
-- {{{ Key bindings
globalkeys = gears.table.join(
-- General Awesome keys
awful.keyboard.append_global_keybindings({
awful.key({ modkey, }, "s", hotkeys_popup.show_help,
{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,
{description = "view previous", group = "tag"}),
awful.key({ modkey, }, "Right", awful.tag.viewnext,
{description = "view next", group = "tag"}),
awful.key({ modkey, }, "Escape", awful.tag.history.restore,
{description = "go back", group = "tag"}),
})
-- Focus related keybindings
awful.keyboard.append_global_keybindings({
awful.key({ modkey, }, "j",
function ()
awful.client.focus.byidx( 1)
@@ -290,20 +299,6 @@ globalkeys = gears.table.join(
end,
{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",
function ()
awful.client.focus.history.previous()
@@ -312,15 +307,29 @@ globalkeys = gears.table.join(
end
end,
{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
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
{description = "open a terminal", group = "launcher"}),
awful.key({ modkey, "Control" }, "r", awesome.restart,
{description = "reload awesome", group = "awesome"}),
awful.key({ modkey, "Shift" }, "c", awesome.quit,
{description = "quit awesome", group = "awesome"}),
-- Layout related keybindings
awful.keyboard.append_global_keybindings({
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, }, "u", awful.client.urgent.jumpto,
{description = "jump to urgent client", group = "client"}),
awful.key({ modkey, "Control" }, "j", function () awful.tag.incmwfact( 0.05) end,
{description = "increase master width factor", group = "layout"}),
awful.key({ modkey, "Control" }, "k", function () awful.tag.incmwfact(-0.05) end,
@@ -337,201 +346,187 @@ globalkeys = gears.table.join(
{description = "select next", group = "layout"}),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end,
{description = "select previous", group = "layout"}),
})
awful.key({ modkey, "Control" }, "n",
function ()
local c = awful.client.restore()
-- Focus restored client
if c then
c:emit_signal(
"request::activate", "key.unminimize", {raise = true}
)
end
end,
{description = "restore minimized", group = "client"}),
-- -- Prompt
-- awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end,
-- {description = "run prompt", group = "launcher"}),
-- 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"}),
-- Menubar
awful.key({ modkey }, "p", function() menubar.show() end,
{description = "show the menubar", group = "launcher"})
)
clientkeys = gears.table.join(
awful.key({ modkey, }, "f",
function (c)
c.fullscreen = not c.fullscreen
c:raise()
awful.keyboard.append_global_keybindings({
awful.key {
modifiers = { modkey },
keygroup = "numrow",
description = "only view tag",
group = "tag",
on_press = function (index)
local screen = awful.screen.focused()
local tag = screen.tags[index]
if tag then
tag:view_only()
end
end,
{description = "toggle fullscreen", group = "client"}),
awful.key({ modkey, }, "q", function (c) c:kill() end,
{description = "close", group = "client"}),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
{description = "toggle floating", group = "client"}),
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
{description = "move to master", group = "client"}),
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
{description = "move to screen", group = "client"}),
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
{description = "toggle keep on top", group = "client"}),
awful.key({ modkey, }, "n",
function (c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end ,
{description = "minimize", group = "client"}),
awful.key({ modkey, }, "m",
function (c)
c.maximized = not c.maximized
c:raise()
end ,
{description = "(un)maximize", group = "client"}),
awful.key({ modkey, "Control" }, "m",
function (c)
c.maximized_vertical = not c.maximized_vertical
c:raise()
end ,
{description = "(un)maximize vertically", group = "client"}),
awful.key({ modkey, "Shift" }, "m",
function (c)
c.maximized_horizontal = not c.maximized_horizontal
c:raise()
end ,
{description = "(un)maximize horizontally", 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,
}
})
-- 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
client.connect_signal("request::default_mousebindings", function()
awful.mouse.append_client_mousebindings({
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)
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)
)
client.connect_signal("request::default_keybindings", function()
awful.keyboard.append_client_keybindings({
awful.key({ modkey, }, "f",
function (c)
c.fullscreen = not c.fullscreen
c:raise()
end,
{description = "toggle fullscreen", group = "client"}),
awful.key({ modkey, }, "q", function (c) c:kill() end,
{description = "close", group = "client"}),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ,
{description = "toggle floating", group = "client"}),
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end,
{description = "move to master", group = "client"}),
awful.key({ modkey, }, "o", function (c) c:move_to_screen() end,
{description = "move to screen", group = "client"}),
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end,
{description = "toggle keep on top", group = "client"}),
awful.key({ modkey, }, "n",
function (c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end ,
{description = "minimize", group = "client"}),
awful.key({ modkey, }, "m",
function (c)
c.maximized = not c.maximized
c:raise()
end ,
{description = "(un)maximize", group = "client"}),
awful.key({ modkey, "Control" }, "m",
function (c)
c.maximized_vertical = not c.maximized_vertical
c:raise()
end ,
{description = "(un)maximize vertically", group = "client"}),
awful.key({ modkey, "Shift" }, "m",
function (c)
c.maximized_horizontal = not c.maximized_horizontal
c:raise()
end ,
{description = "(un)maximize horizontally", group = "client"}),
})
end)
-- Set keys
root.keys(globalkeys)
-- }}}
-- {{{ Rules
-- Rules to apply to new clients (through the "manage" signal).
awful.rules.rules = {
-- Rules to apply to new clients.
ruled.client.connect_signal("request::rules", function()
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap+awful.placement.no_offscreen
}
},
ruled.client.append_rule {
id = "global",
rule = { },
properties = {
focus = awful.client.focus.filter,
raise = true,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap+awful.placement.no_offscreen
}
}
-- Floating clients.
{ rule_any = {
instance = {
"DTA", -- Firefox addon DownThemAll.
"copyq", -- Includes session name in class.
"pinentry",
ruled.client.append_rule {
id = "floating",
rule_any = {
instance = {
"DTA", -- Firefox addon DownThemAll.
"copyq", -- Includes session name in class.
"pinentry", },
class = {
"Arandr", "Blueman-manager", "Gpick", "Sxiv",
"Tor Browser", "Wpa_gui", "veromix", "xtightvncviewer"
},
-- 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.
name = {
"Event Tester", -- xev.
},
role = {
"AlarmWindow", -- Thunderbird's calendar.
"ConfigManager", -- Thunderbird's about:config.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
}
},
class = {
"Arandr",
"Blueman-manager",
"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
-- and the name shown there might not match defined rules here.
name = {
"Event Tester", -- xev.
},
role = {
"AlarmWindow", -- Thunderbird's calendar.
"ConfigManager", -- Thunderbird's about:config.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
}
}, properties = { floating = true }},
properties = { floating = true }
}
-- Add titlebars to normal clients and dialogs
{ rule_any = {type = { "normal", "dialog" }
}, properties = { titlebars_enabled = false }
},
ruled.client.append_rule {
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
-- title for that window
@@ -541,39 +536,23 @@ awful.rules.rules = {
-- properties = { screen = 1, tag = "1", titlebars_enabled = false } },
--{ rule = { class = "Google-chrome-beta" },
-- properties = { screen = 1, tag = "1", titlebars_enabled = false } },
}
end)
-- }}}
-- {{{ Signals
-- 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)
-- {{{ Titlebars
-- Add a titlebar if titlebars_enabled is set to true in the rules.
client.connect_signal("request::titlebars", function(c)
-- buttons for the titlebar
local buttons = gears.table.join(
local buttons = {
awful.button({ }, 1, function()
c:emit_signal("request::activate", "titlebar", {raise = true})
awful.mouse.client.move(c)
c:activate { context = "titlebar", action = "mouse_move" }
end),
awful.button({ }, 3, function()
c:emit_signal("request::activate", "titlebar", {raise = true})
awful.mouse.client.resize(c)
end)
)
c:activate { context = "titlebar", action = "mouse_resize"}
end),
}
awful.titlebar(c) : setup {
awful.titlebar(c).widget = {
{ -- Left
awful.titlebar.widget.iconwidget(c),
buttons = buttons,
@@ -581,7 +560,7 @@ client.connect_signal("request::titlebars", function(c)
},
{ -- Middle
{ -- Title
align = "center",
halign = "center",
widget = awful.titlebar.widget.titlewidget(c)
},
buttons = buttons,
@@ -598,15 +577,34 @@ client.connect_signal("request::titlebars", function(c)
layout = wibox.layout.align.horizontal
}
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.
client.connect_signal("mouse::enter", function(c)
c:emit_signal("request::activate", "mouse_enter", {raise = false})
c:activate { context = "mouse_enter", raise = false }
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)
-- }}}
awful.spawn.with_shell(
'if (xrdb -query | grep -q "^awesome\\.started:\\s*true$"); then exit; fi;' ..
@@ -620,11 +618,11 @@ do
{
"xset b off",
"xdotool key --clearmodifiers Num_Lock",
"autorandr -c",
--"autorandr -c",
"pasystray -m 100",
"cbatticon",
"barrierc --disable-crypto 192.168.10.2:24800",
"xbindkeys -f /home/kmcr/.config/xbindkeysrc",
--"cbatticon",
--"barrierc --disable-crypto 192.168.10.2:24800",
"xbindkeys -f /home/rkmiec/.config/xbindkeysrc",
}
for _,i in ipairs(cmds_once) do
awful.spawn(i)
@@ -632,10 +630,10 @@ do
--"dunst -config /home/kmcr/.config/i3/dunst_config",
local cmds_single_instance =
{
"nm-applet",
--"nm-applet",
"blueman-applet",
"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
awful.spawn.single_instance(i)

View File

@@ -1,2 +1,3 @@
.ackrc
.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)
#
# 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 $secondary_color i3wm.color0 #98d1ce
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
# 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
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
include conf.d/exec.conf
include conf.d/binds.conf
include exec.conf
#include binds.conf
# use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient
@@ -34,68 +28,84 @@ set $down j
set $up k
set $right l
# use Mouse+Mod4 to drag floating windows to their wanted position
floating_modifier Mod4
# use Mouse+$mod to drag floating windows to their wanted position
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
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
bindsym Mod4+$left focus left
bindsym Mod4+$down focus down
bindsym Mod4+$up focus up
bindsym Mod4+$right focus right
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# alternatively, you can use the cursor keys:
bindsym Mod4+Left focus left
bindsym Mod4+Down focus down
bindsym Mod4+Up focus up
bindsym Mod4+Right focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym Mod4+Shift+$left move left
bindsym Mod4+Shift+$down move down
bindsym Mod4+Shift+$up move up
bindsym Mod4+Shift+$right move right
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# alternatively, you can use the cursor keys:
bindsym Mod4+Shift+Left move left
bindsym Mod4+Shift+Down move down
bindsym Mod4+Shift+Up move up
bindsym Mod4+Shift+Right move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym Mod4+b split h
bindsym $mod+semicolon split h
# split in vertical orientation
bindsym Mod4+v split v
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym Mod4+f fullscreen toggle
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym Mod4+q layout stacking
bindsym Mod4+w layout tabbed
bindsym Mod4+e layout toggle split
bindsym $mod+q layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym Mod4+Shift+space floating toggle
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym Mod4+space focus mode_toggle
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym Mod4+a focus parent
bindsym $mod+a focus parent
# focus the child container
#bindsym Mod4+d focus child
#bindsym $mod+d focus child
# 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.
# 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.
# We use variables to avoid repeating the names in multiple places.
@@ -109,90 +119,38 @@ set $ws7 " 7 "
set $ws8 " 8 "
set $ws9 " 9 "
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
bindsym Mod4+1 workspace number $ws1
bindsym Mod4+2 workspace number $ws2
bindsym Mod4+3 workspace number $ws3
bindsym Mod4+4 workspace number $ws4
bindsym Mod4+5 workspace number $ws5
bindsym Mod4+6 workspace number $ws6
bindsym Mod4+7 workspace number $ws7
bindsym Mod4+8 workspace number $ws8
bindsym Mod4+9 workspace number $ws9
bindsym Mod4+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
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym Mod4+Shift+1 move container to workspace number $ws1
bindsym Mod4+Shift+2 move container to workspace number $ws2
bindsym Mod4+Shift+3 move container to workspace number $ws3
bindsym Mod4+Shift+4 move container to workspace number $ws4
bindsym Mod4+Shift+5 move container to workspace number $ws5
bindsym Mod4+Shift+6 move container to workspace number $ws6
bindsym Mod4+Shift+7 move container to workspace number $ws7
bindsym Mod4+Shift+8 move container to workspace number $ws8
bindsym Mod4+Shift+9 move container to workspace number $ws9
bindsym Mod4+Shift+0 move container to workspace number $ws10
bindsym Mod1+Shift+1 move container to workspace number $ws11
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
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
bindsym $mod+n exec i3-new-workspace
# 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)
bindsym Mod4+Shift+r restart
bindsym $mod+Shift+r restart
# 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)
mode "resize" {
@@ -208,29 +166,26 @@ mode "resize" {
bindsym $right resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
bindsym Left resize shrink width 5 px or 5 ppt
bindsym Down resize grow height 5 px or 5 ppt
bindsym Up resize shrink height 5 px or 5 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 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
# finds out, if available)
bar {
font pango:Monoid Nerd Font 9
status_command ~/.cargo/bin/i3status-rs ~/.config/i3/i3status-rs.toml
mode dock
modifier Mod4
tray_padding 0
tray_output primary
mode hide
status_command i3status-rs ~/.config/i3/i3status-rs.toml
modifier $mod
font pango:CommitMonotuned 9
colors {
separator #268bd2
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
#without borders
new_window pixel 1
new_float pixel 3
default_border pixel 2
default_floating_border pixel 3
hide_edge_borders smart
#focus_on_window_activation focus
focus_on_window_activation urgent

View File

@@ -1,40 +1,52 @@
theme = "solarized-dark"
[icons]
icons = "awesome"
[[block]]
block = "custom"
command = "echo vpn:(vpn | head -1 | cut -d: -f 2)"
interval = 5
[theme]
theme = "solarized-dark"
[[block]]
block = "disk_space"
path = "/home"
alias = "~"
info_type = "available"
unit = "GB"
alert_unit = "GB"
interval = 20
warning = 20.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 = "memory"
display_type = "memory"
format_mem = "{mem_total_used_percents}"
format_swap = "{swap_used_percents}"
format = " $icon $mem_total_used_percents.eng(w:2) "
format_alt = " $icon_swap $swap_used_percents.eng(w:2) "
[[block]]
block = "amd_gpu"
format = " $icon $utilization "
format_alt = " $icon MEM: $vram_used_percents ($vram_used/$vram_total) "
interval = 1
[[block]]
block = "cpu"
interval = 1
info_cpu = 20
warning_cpu = 50
critical_cpu = 90
[[block]]
block = "load"
interval = 1
format = "{1m}"
[[block]]
block = "sound"
format = " $icon 1min avg: $1m.eng(w:4) "
[[block]]
block = "time"
interval = 60
format = "%a %d.%m %R"
interval = 5
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.plugins')
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.shell = '/bin/bash'
--vim.opt.shell = '/bin/bash'
vim.opt.number = true
--vim.o.relativenumber = 1
@@ -33,15 +33,15 @@ vim.opt.splitright = true
-- gui settings
vim.opt.guifont="IBM Plex Mono Text:h9:e-subpixelantyalias"
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_remember_window_size = 0
vim.opt.listchars = { tab = "", trail = "¬" }
vim.opt.list = true
vim.opt.tabstop=2
vim.opt.shiftwidth=2
vim.opt.softtabstop=2
vim.opt.tabstop=4
vim.opt.shiftwidth=4
vim.opt.softtabstop=4
vim.opt.expandtab = true
@@ -107,32 +107,4 @@ vim.opt.wildignore = [[
*/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

View File

@@ -11,7 +11,7 @@ map('t', '<ESC><ESC>', '<C-\\><C-n>', default_options)
map('i', 'jj', '<ESC>', default_options)
map('i', 'jk', '<ESC>', 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
map('v', '<c-a>', '<c-a>gv', default_options)

View File

@@ -14,12 +14,13 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.opt.rtp:prepend(lazypath)
require'lazy'.setup('plugins', {
change_detection = {
enabled = true,
notify = false
},
dev = {
path = '/home/kmcr'
}
})
require'lazy'.setup('plugins')
-- , {
-- change_detection = {
-- enabled = false,
-- notify = false
-- },
-- dev = {
-- path = '/home/kmcr'
-- }
-- })

View File

@@ -1,6 +1,6 @@
return {
"aznhe21/actions-preview.nvim",
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,
}

View File

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

View File

@@ -7,5 +7,6 @@ return {
-- dev = true,
config = function()
require('bitbucket-nvim').setup({ opt = "test"})
end
end,
enabled = false
}

View File

@@ -1,7 +1,14 @@
return {
'saghen/blink.cmp',
return { {
'Saghen/blink.cmp',
-- optional: provides snippets for the snippet source
dependencies = 'rafamadriz/friendly-snippets',
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 = '*',
@@ -17,13 +24,16 @@ return {
-- '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' },
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,
-- -- 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'
@@ -32,8 +42,150 @@ return {
-- 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 = { 'lsp', 'path', 'snippets', 'buffer' },
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

@@ -2,8 +2,10 @@ return {
'lmantw/themify.nvim',
lazy = false,
priority = 999,
priority = 1000,
dependencies = {
--'Iron-E/nvim-highlite'
},
config = function()
require('themify').setup({
activity = true,
@@ -31,7 +33,7 @@ return {
'kevinm6/kurayami.nvim',
'gerardbm/vim-atomic',
'fynnfluegge/monet.nvim',
'sho-87/kanagawa-paper.nvim',
'thesimonho/kanagawa-paper.nvim',
'qaptoR-nvim/chocolatier.nvim',
'aliqyan-21/darkvoid.nvim',
'paulo-granthon/hyper.nvim',
@@ -39,6 +41,12 @@ return {
'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

View File

@@ -1,5 +1,23 @@
return {
return {{
-- 'gcc' to toggle comments
'numToStr/Comment.nvim',
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

@@ -1,14 +0,0 @@
return {
'nvimdev/epo.nvim',
config = function()
-- the default completetopt set by epo
vim.opt.completeopt = "menu,menuone,noselect,popup"
-- use default settings
require('epo').setup({
fuzzy = true,
signature_border = 'rounded',
})
end,
enabled = false
}

View File

@@ -23,5 +23,6 @@ return {
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.
}
},
enabled = false
}

View File

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

View File

@@ -31,5 +31,5 @@ return {
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif", "*.svg" }, -- render image files as images when opened
})
end,
enabled = true
enabled = false
}

View File

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

View File

@@ -1,558 +1,385 @@
-- -- progress data
-- local clients = {}
-- local progress = { '⠋', '⠙', '⠸', '⢰', '⣠', '⣄', '⡆', '⠇' }
--
-- -- check for lsp progress data
-- local function is_lsp_loading(client) return client and clients[client] and clients[client].percentage < 100 end
--
-- -- update lsp progress
-- local function update_lsp_progress()
-- local messages = vim.lsp.util.get_progress_messages()
-- for _, message in ipairs(messages) do
-- if not message.name then goto continue end
--
-- local client_name = message.name
--
-- if not clients[client_name] then clients[client_name] = { percentage = 0, progress_index = 0 } end
--
-- if message.done then
-- clients[client_name].percentage = 100
-- else
-- if message.percentage then clients[client_name].percentage = message.percentage end
-- end
--
-- if clients[client_name].percentage % 5 == 0 or clients[client_name].progress_index == 0 then
-- vim.opt.statusline = vim.opt.statusline
-- clients[client_name].progress_index = clients[client_name].progress_index + 1
-- end
--
-- if clients[client_name].progress_index > #progress then clients[client_name].progress_index = 1 end
--
-- ::continue::
-- end
-- end
--
-- -- get lsp client name for buffer
-- local function get_lsp_client_name()
-- local active_clients = vim.lsp.get_clients({ bufnr = 0 })
-- local client_name
--
-- if #active_clients > 0 then client_name = active_clients[1].name end
-- return client_name
-- end
--
-- -- configure feline
-- local function config(_, opts)
-- --local colorscheme = vim.g.colors_name
-- local colorscheme = 'nightfox'
-- local palette = require('nightfox.palette').load(colorscheme)
-- local feline = require('feline')
-- local vi_mode = require('feline.providers.vi_mode')
-- local file = require('feline.providers.file')
-- local separators = require('feline.defaults').statusline.separators.default_value
-- local lsp = require('feline.providers.lsp')
--
-- local theme = {
-- fg = palette.fg1,
-- bg = palette.bg1,
-- black = palette.black.base,
-- skyblue = palette.blue.bright,
-- cyan = palette.cyan.base,
-- green = palette.green.base,
-- oceanblue = palette.blue.base,
-- magenta = palette.magenta.base,
-- orange = palette.orange.base,
-- red = palette.red.base,
-- violet = palette.magenta.bright,
-- white = palette.white.base,
-- yellow = palette.yellow.base,
-- }
--
-- local c = {
--
-- -- local function git_diff(type)
-- -- ---@diagnostic disable-next-line: undefined-field
-- -- local gsd = vim.b.gitsigns_status_dict
-- -- if gsd and gsd[type] and gsd[type] > 0 then return tostring(gsd[type]) end
-- -- return nil
-- -- end
--
-- -- left
-- vim_status = {
-- provider = function()
-- local s
-- if require('lazy.status').has_updates() then
-- s = require('lazy.status').updates()
-- else
-- s = ''
-- end
-- s = string.format(' %s ', s)
-- return s
-- end,
-- hl = { fg = palette.bg0, bg = palette.blue.base },
-- right_sep = {
-- always_visible = true,
-- str = separators.slant_right,
-- hl = { fg = palette.blue.base, bg = palette.bg0 },
-- },
-- },
--
-- file_name = {
-- provider = {
-- name = 'file_info',
-- opts = { colored_icon = false },
-- },
-- hl = { fg = palette.bg0, bg = palette.white.base },
-- left_sep = {
-- always_visible = true,
-- str = string.format('%s ', separators.slant_right),
-- hl = { fg = palette.bg0, bg = palette.white.base },
-- },
-- },
--
-- git_branch = {
-- provider = function()
-- local git = require('feline.providers.git')
-- local branch, icon = git.git_branch()
-- local s
-- if #branch > 0 then
-- s = string.format(' %s%s ', icon, branch)
-- else
-- s = string.format(' %s ', 'Untracked')
-- end
-- return s
-- end,
-- hl = { fg = palette.bg0, bg = palette.fg3 },
-- left_sep = {
-- always_visible = true,
-- str = string.format('%s%s', separators.block, separators.slant_right),
-- hl = { fg = palette.white.base, bg = palette.fg3 },
-- },
-- right_sep = {
-- always_visible = true,
-- str = separators.slant_right,
-- hl = { fg = palette.fg3, bg = palette.bg0 },
-- },
-- },
--
-- -- table.insert(components.active[left], {
-- -- provider = function()
-- -- local status = git_diff('added')
-- -- local s
-- -- if status then
-- -- s = string.format(' %s %s ', '', status)
-- -- else
-- -- s = ''
-- -- end
-- -- return s
-- -- end,
-- -- hl = { fg = palette.bg0, bg = palette.green.base },
-- -- left_sep = {
-- -- always_visible = true,
-- -- str = separators.slant_right,
-- -- hl = { fg = palette.bg0, bg = palette.green.base },
-- -- },
-- -- })
--
-- -- table.insert(components.active[left], {
-- -- provider = function()
-- -- local status = git_diff('changed')
-- -- local s
-- -- if status then
-- -- s = string.format(' %s %s ', '', status)
-- -- else
-- -- s = ''
-- -- end
-- -- return s
-- -- end,
-- -- hl = { fg = palette.bg0, bg = palette.yellow.base },
-- -- left_sep = {
-- -- always_visible = true,
-- -- str = separators.slant_right,
-- -- hl = { fg = palette.green.base, bg = palette.yellow.base },
-- -- },
-- -- })
--
-- -- table.insert(components.active[left], {
-- -- provider = function()
-- -- local status = git_diff('removed')
-- -- local s
-- -- if status then
-- -- s = string.format(' %s %s ', '', status)
-- -- else
-- -- s = ''
-- -- end
-- -- return s
-- -- end,
-- -- hl = { fg = palette.bg0, bg = palette.red.base },
-- -- left_sep = {
-- -- always_visible = true,
-- -- str = separators.slant_right,
-- -- hl = { fg = palette.yellow.base, bg = palette.red.base },
-- -- },
-- -- right_sep = {
-- -- always_visible = true,
-- -- str = separators.slant_right,
-- -- hl = { fg = palette.red.base, bg = palette.bg0 },
-- -- },
-- -- })
--
-- lsp = {
-- provider = function()
-- if not lsp.is_lsp_attached() then return ' 󱏎 LSP ' end
--
-- local client_name = get_lsp_client_name()
-- if is_lsp_loading(client_name) then
-- return string.format(' %s LSP ', progress[clients[client_name].progress_index])
-- else
-- return ' 󱁛 LSP '
-- end
-- end,
-- hl = function()
-- if not lsp.is_lsp_attached() then return { fg = palette.bg0, bg = palette.fg3 } end
--
-- local client_name = get_lsp_client_name()
-- if is_lsp_loading(client_name) then return { fg = palette.bg0, bg = palette.yellow.base } end
--
-- return { fg = palette.bg0, bg = palette.green.base }
-- end,
-- left_sep = {
-- always_visible = true,
-- str = separators.slant_right,
-- hl = function()
-- if not lsp.is_lsp_attached() then return { fg = palette.bg0, bg = palette.fg3 } end
--
-- local client_name = get_lsp_client_name()
-- if is_lsp_loading(client_name) then return { fg = palette.bg0, bg = palette.yellow.base } end
--
-- return { fg = palette.bg0, bg = palette.green.base }
-- end,
-- },
-- right_sep = {
-- always_visible = true,
-- str = separators.slant_right,
-- hl = function()
-- if not lsp.is_lsp_attached() then return { fg = palette.fg3, bg = 'none' } end
--
-- local client_name = get_lsp_client_name()
-- if is_lsp_loading(client_name) then return { fg = palette.yellow.base, bg = 'none' } end
--
-- return { fg = palette.green.base, bg = 'none' }
-- end,
-- },
-- },
--
-- -- table.insert(components.active[left], {
-- -- provider = function()
-- -- local s
-- -- local count = vim.tbl_count(vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR }))
-- -- if count > 0 then
-- -- s = string.format(' %s %d ', '', count)
-- -- else
-- -- s = ''
-- -- end
-- -- return s
-- -- end,
-- -- hl = { fg = palette.bg0, bg = palette.red.base },
-- -- left_sep = {
-- -- always_visible = true,
-- -- str = separators.slant_right,
-- -- hl = { fg = palette.bg0, bg = palette.red.base },
-- -- },
-- -- })
--
-- -- table.insert(components.active[left], {
-- -- provider = function()
-- -- local s
-- -- local count = vim.tbl_count(vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN }))
-- -- if count > 0 then
-- -- s = string.format(' %s %d ', '', count)
-- -- else
-- -- s = ''
-- -- end
-- -- return s
-- -- end,
-- -- hl = { fg = palette.bg0, bg = palette.magenta.base },
-- -- left_sep = {
-- -- always_visible = true,
-- -- str = separators.slant_right,
-- -- hl = { fg = palette.red.base, bg = palette.magenta.base },
-- -- },
-- -- })
--
-- -- table.insert(components.active[left], {
-- -- provider = function()
-- -- local s
-- -- local count = vim.tbl_count(vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO }))
-- -- if count > 0 then
-- -- s = string.format(' %s %d ', '', count)
-- -- else
-- -- s = ''
-- -- end
-- -- return s
-- -- end,
-- -- hl = { fg = palette.bg0, bg = palette.blue.base },
-- -- left_sep = {
-- -- always_visible = true,
-- -- str = separators.slant_right,
-- -- hl = { fg = palette.magenta.base, bg = palette.blue.base },
-- -- },
-- -- })
--
-- -- table.insert(components.active[left], {
-- -- provider = function()
-- -- local s
-- -- local count = vim.tbl_count(vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT }))
-- -- if count > 0 then
-- -- s = string.format(' %s %d ', '', count)
-- -- else
-- -- s = ''
-- -- end
-- -- return s
-- -- end,
-- -- hl = { fg = palette.bg0, bg = palette.orange.base },
-- -- left_sep = {
-- -- always_visible = true,
-- -- str = separators.slant_right,
-- -- hl = { fg = palette.blue.base, bg = palette.orange.base },
-- -- },
-- -- right_sep = {
-- -- always_visible = true,
-- -- str = separators.slant_right,
-- -- hl = { fg = palette.orange.base, bg = 'none' },
-- -- },
-- -- })
--
-- -- right
-- vi_mode = {
-- provider = function() return string.format(' %s ', vi_mode.get_vim_mode()) end,
-- hl = function() return { fg = palette.bg0, bg = vi_mode.get_mode_color() } end,
-- left_sep = {
-- always_visible = true,
-- str = separators.slant_left,
-- hl = function() return { fg = vi_mode.get_mode_color(), bg = 'none' } end,
-- },
-- right_sep = {
-- always_visible = true,
-- str = separators.slant_left,
-- hl = function() return { fg = palette.bg0, bg = vi_mode.get_mode_color() } end,
-- },
-- },
--
-- macro = {
-- provider = function()
-- local s
-- local recording_register = vim.fn.reg_recording()
-- if #recording_register == 0 then
-- s = ''
-- else
-- s = string.format(' Recording @%s ', recording_register)
-- end
-- return s
-- end,
-- hl = { fg = palette.bg0, bg = palette.fg3 },
-- left_sep = {
-- always_visible = true,
-- str = separators.slant_left,
-- hl = function() return { fg = palette.fg3, bg = palette.bg0 } end,
-- },
-- },
--
-- search_count = {
-- provider = function()
-- if vim.v.hlsearch == 0 then return '' end
--
-- local ok, result = pcall(vim.fn.searchcount, { maxcount = 999, timeout = 250 })
-- if not ok then return '' end
-- if next(result) == nil then return '' end
--
-- local denominator = math.min(result.total, result.maxcount)
-- return string.format(' [%d/%d] ', result.current, denominator)
-- end,
-- hl = { fg = palette.bg0, bg = palette.white.base },
-- left_sep = {
-- always_visible = true,
-- str = separators.slant_left,
-- hl = function() return { fg = palette.white.base, bg = palette.fg3 } end,
-- },
-- right_sep = {
-- always_visible = true,
-- str = separators.slant_left,
-- hl = { fg = palette.bg0, bg = palette.white.base },
-- },
-- },
--
-- cursor_position = {
-- provider = {
-- name = 'position',
-- opts = { padding = true },
-- },
-- hl = { fg = palette.bg0, bg = palette.blue.base },
-- left_sep = {
-- always_visible = true,
-- str = string.format('%s%s', separators.slant_left, separators.block),
-- hl = function() return { fg = palette.blue.base, bg = palette.bg0 } end,
-- },
-- right_sep = {
-- always_visible = true,
-- str = ' ',
-- hl = { fg = palette.bg0, bg = palette.blue.base },
-- },
-- },
--
-- scroll_bar = {
-- provider = {
-- name = 'scroll_bar',
-- opts = { reverse = true },
-- },
-- hl = { fg = palette.blue.dim, bg = palette.blue.base },
-- },
--
-- -- inactive statusline
-- in_file_info = {
-- provider = function()
-- if vim.api.nvim_buf_get_name(0) ~= '' then
-- return file.file_info({}, { colored_icon = false })
-- else
-- return file.file_type({}, { colored_icon = false, case = 'lowercase' })
-- end
-- end,
-- hl = { fg = palette.bg0, bg = palette.blue.base },
-- left_sep = {
-- always_visible = true,
-- str = string.format('%s%s', separators.slant_left, separators.block),
-- hl = { fg = palette.blue.base, bg = 'none' },
-- },
-- right_sep = {
-- always_visible = true,
-- str = ' ',
-- hl = { fg = palette.bg0, bg = palette.blue.base },
-- },
-- },
-- }
--
-- local active = {
-- { -- left
-- c.vim_status,
-- c.file_name,
-- c.git_branch,
-- c.lsp,
-- },
-- { -- right
-- c.vi_mode,
-- c.macro,
-- c.search_count,
-- c.cursor_position,
-- c.scroll_bar,
-- },
-- }
--
-- local inactive = {
-- { -- left
-- },
-- { -- right
-- c.in_file_info,
-- },
-- }
--
-- opts.components = { active = active, inactive = inactive }
--
-- feline.setup(opts)
-- feline.use_theme(theme)
-- end
--
-- return {
-- 'freddiehaddad/feline.nvim',
-- config = config,
-- dependencies = { 'EdenEast/nightfox.nvim', 'lewis6991/gitsigns.nvim', 'nvim-tree/nvim-web-devicons' },
-- init = function()
-- -- use a global statusline
-- -- vim.opt.laststatus = 3
--
-- -- update statusbar when there's a plugin update
-- vim.api.nvim_create_autocmd('User', {
-- pattern = 'LazyCheck',
-- callback = function() vim.opt.statusline = vim.opt.statusline end,
-- })
--
-- -- update statusbar with LSP progress
-- vim.api.nvim_create_autocmd('User', {
-- pattern = 'LspProgressUpdate',
-- callback = function() update_lsp_progress() end,
-- })
--
-- -- hide the mode
-- vim.opt.showmode = false
--
-- -- hide search count on command line
-- vim.opt.shortmess:append({ S = true })
-- end,
-- opts = {
-- force_inactive = { filetypes = { '^dapui_*', '^help$', '^neotest*', '^NvimTree$', '^qf$' } },
-- disable = { filetypes = { '^alpha$' } },
-- },
-- }
return {
-- Calls `require('slimline').setup({})`
"sschleemilch/slimline.nvim",
opts = {
bold = false, -- makes primary parts and mode bold
verbose_mode = false, -- Mode as single letter or as a word
style = 'bg', -- or "fg". Whether highlights should be applied to bg or fg of components
mode_follow_style = true, -- Whether the mode color components should follow the style option
components = { -- Choose components and their location
left = {
"mode",
"path",
"git"
"rebelot/heirline.nvim",
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",
},
center = {},
right = {
"diagnostics",
"filetype_lsp",
"progress"
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",
}
},
spaces = {
components = ' ', -- string between components
left = ' ', -- string at the start of the line
right = ' ', -- string at the end of the line
-- 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",
},
sep = {
hide = {
first = false, -- hides the first separator
last = false, -- hides the last separator
},
left = '', -- left separator of components
right = '', -- right separator of components
}
-- --------------------------------------------------------------
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" },
},
hl = {
modes = {
normal = 'Type', -- highlight base of modes
insert = 'Function',
pending = 'Boolean',
visual = 'Keyword',
command = 'String',
},
base = 'Comment', -- highlight of everything in in between components
primary = 'Normal', -- highlight of primary parts (e.g. filename)
secondary = 'Comment', -- highlight of secondary parts (e.g. filepath)
{
condition = function()
return not vim.bo.modifiable or vim.bo.readonly
end,
provider = "",
hl = { fg = "orange" },
},
icons = {
diagnostics = {
ERROR = '',
WARN = '',
HINT = '',
INFO = '',
},
git = {
branch = '',
},
folder = '',
lines = '',
recording = '',
},
}
}
-- 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,83 +1,53 @@
return {
'neovim/nvim-lspconfig',
dependencies = {
-- "SmiteshP/nvim-navbuddy",
"jubnzv/virtual-types.nvim",
--"ray-x/lsp_signature.nvim",
'sontungexpt/better-diagnostic-virtual-text',
{url = "http://git.sr.ht/~p00f/clangd_extensions.nvim"},
-- "jubnzv/virtual-types.nvim",
-- "ray-x/lsp_signature.nvim",
-- 'sontungexpt/better-diagnostic-virtual-text',
{ url = "http://git.sr.ht/~p00f/clangd_extensions.nvim" },
},
config = function()
local nvim_lsp = require('lspconfig')
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 = true,
-- 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 = { "CursorMoved", "CursorMovedI" },
-- 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 = true,
-- 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 = {
-- These are unicode, should be available in any font
role_icons = {
type = "🄣",
declaration = "🄓",
expression = "🄔",
statement = ";",
specifier = "🄢",
["template argument"] = "🆃",
},
kind_icons = {
Compound = "🄲",
Recovery = "🅁",
TranslationUnit = "🅄",
PackExpansion = "🄿",
TemplateTypeParm = "🅃",
TemplateTemplateParm = "🅃",
TemplateParamObject = "🅃",
},
highlights = {
detail = "Comment",
},
memory_usage = {
border = "none",
},
symbol_info = {
border = "none",
}
-- These are unicode, should be available in any font
role_icons = {
type = "🄣",
declaration = "🄓",
expression = "🄔",
statement = ";",
specifier = "🄢",
["template argument"] = "🆃",
},
kind_icons = {
Compound = "🄲",
Recovery = "🅁",
TranslationUnit = "🅄",
PackExpansion = "🄿",
TemplateTypeParm = "🅃",
TemplateTemplateParm = "🅃",
TemplateParamObject = "🅃",
},
highlights = {
detail = "Comment",
},
memory_usage = {
border = "none",
},
symbol_info = {
border = "none",
}
}
})
vim.lsp.enable('clangd_extensions')
--local lsp_signature = require('lsp_signature')
-- Mappings.
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float)
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
-- after the language server attaches to the current buffer
vim.api.nvim_create_autocmd('LspAttach', {
@@ -87,48 +57,61 @@ return {
-- See `:help vim.lsp.*` for documentation on any of the below functions
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.definition, opts)
vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts)
--def vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts)
--vim.keymap.del("n", "grr", 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>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>rn', vim.lsp.buf.rename, opts)
vim.keymap.set('n', '<leader>D', vim.lsp.buf.type_definition, 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({
-- floating_window = true,
-- floating_window_above_cur_line = true,
-- floating_window_off_x = 10,
-- floating_window_off_y = 0,
-- })
require("clangd_extensions.inlay_hints").setup_autocmd()
require("clangd_extensions.inlay_hints").set_inlay_hints()
require("better-diagnostic-virtual-text.api").setup_buf(ev.buf, {
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})
-- require("better-diagnostic-virtual-text.api").setup_buf(ev.buf, {
-- 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
-- })
vim.diagnostic.config({
underline = false,
signs = true,
virtual_text = true,
update_in_insert = false,
severity_sort = true
})
end
vim.diagnostic.config({
underline = false,
signs = {
text = {
[vim.diagnostic.severity.HINT] = "",
[vim.diagnostic.severity.ERROR] = "",
[vim.diagnostic.severity.INFO] = "",
[vim.diagnostic.severity.WARN] = ""
}
},
virtual_text = false,
update_in_insert = false,
severity_sort = true,
-- virtual_lines = {
-- current_line = true,
-- }
})
end
})
--local capabilities = vim.lsp.protocol.make_client_capabilities()
@@ -140,16 +123,22 @@ return {
-- )
--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" },
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,
filetypes = { "cpp" },
})
nvim_lsp.pylsp.setup({
vim.lsp.config('pylsp', {
settings = {
pylint = {
enabled = true
@@ -161,9 +150,10 @@ return {
capabilities = capabilities
})
nvim_lsp.lua_ls.setup({
vim.lsp.config('lua_ls', {
settings = {
Lua = {
diagnostics = { globals = { "vim" } },
completion = {
callSnippet = "Replace"
}
@@ -171,35 +161,36 @@ return {
}
})
nvim_lsp.matlab_ls.setup({
cmd = { "matlab-language-server", "--stdio"},
filetypes = { "matlab" },
-- root_dir = nvim_lsp.util.find_git_ancestor,
root_dir = vim.fs.dirname(vim.fs.find('.git', { path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)), upward = true })[1]),
single_file_support = true,
settings = {
matlab = {
indexWorkspace = false,
installPath = "/usr/local/MATLAB/R2022b",
matlabConnectionTiming = "onStart",
telemetry = true,
},
}
})
-- nvim_lsp.matlab_ls.setup({
-- cmd = { "matlab-language-server", "--stdio" },
-- filetypes = { "matlab" },
-- -- root_dir = nvim_lsp.util.find_git_ancestor,
-- root_dir = vim.fs.dirname(vim.fs.find('.git',
-- { path = vim.fs.dirname(vim.api.nvim_buf_get_name(0)), upward = true })[1]),
-- single_file_support = true,
-- settings = {
-- matlab = {
-- -- indexWorkspace = false,
-- installPath = "/usr/local/MATLAB/R2024b",
-- -- matlabConnectionTiming = "onStart",
-- -- telemetry = true,
-- },
-- }
-- })
nvim_lsp.typos_lsp.setup({
vim.lsp.config('typos_lsp', {
cmd = { 'typos-lsp' },
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,
settings = {},
})
-- Use a loop to conveniently call 'setup' on multiple servers and
-- 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
nvim_lsp[lsp].setup({
vim.lsp.config(lsp, {
capabilities = capabilities,
})
end

View File

@@ -33,17 +33,59 @@ return { {
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,
-- },
{
"brianhuster/live-preview.nvim",
'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 = {
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.
completions = { blink = { enabled = true } },
render_modes = { 'n', 'c', 't' },
},
enabled = false,
}
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

@@ -8,6 +8,11 @@ return {
none_ls.builtins.diagnostics.gitlint,
none_ls.builtins.diagnostics.cmake_lint,
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.formatting.black},
})

View File

@@ -8,4 +8,8 @@ return {{
}, {
'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

@@ -3,4 +3,5 @@ return {
config = function()
require("pendulum").setup()
end,
enabled = false
}

View File

@@ -26,5 +26,6 @@ return {
end, { noremap = true })
end
})
end
end,
enabled = false
}

View File

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

View File

@@ -4,51 +4,101 @@ return {
'debugloop/telescope-undo.nvim',
'molecule-man/telescope-menufacture',
'nvim-telescope/telescope-symbols.nvim',
'mrloop/telescope-git-branch.nvim',
{
{
"isak102/telescope-git-file-history.nvim",
dependencies = { "tpope/vim-fugitive" }
}
}
'isak102/telescope-git-file-history.nvim',
dependencies = { 'tpope/vim-fugitive' }
},
'kiyoon/telescope-insert-path.nvim',
'zongben/navimark.nvim',
'johmsalas/text-case.nvim',
},
event = 'VeryLazy',
--cmd = ":Telescope",
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').setup {
extensions = {
menufacture = {
mappings = {
main_menu = { [{'i', 'n'}] = '<C-o>' }
main_menu = { [{ 'i', 'n' }] = '<C-o>' }
}
},
}
}
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('menufacture')
require("telescope").load_extension("git_file_history")
require("telescope").load_extension("git_branch")
local def = { noremap = true, silent = true }
local map = vim.keymap.set
map('n', '<leader>r', '<cmd>lua require("telescope.builtin").resume()<cr>', def)
map('n', '<leader>f', '<cmd>lua require("telescope").extensions.menufacture.find_files()<cr>', def)
map('n', '<leader>a', '<cmd>lua require("telescope").extensions.menufacture.grep_string()<cr>', def)
map('n', '<leader>s', '<cmd>lua require("telescope").extensions.menufacture.live_grep()<cr>', def)
map('n', '<leader>b', '<cmd>lua require("telescope.builtin").buffers()<cr>', def)
-- map('n', '<leader>fh', '<cmd>lua require('telescope.builtin').help_tags()<cr>, def)
map('n', '<leader>tc', '<cmd>lua require("telescope.builtin").commands()<cr>', def)
map('n', '<leader>t:', '<cmd>lua require("telescope.builtin").command_history()<cr>', def)
map('n', '<leader>t/', '<cmd>lua require("telescope.builtin").search_history()<cr>', def)
map('n', '<leader>tr', '<cmd>lua require("telescope.builtin").registers()<cr>', def)
map('n', '<leader>fr', function() require("telescope.builtin").resume() end, def)
map('n', '<leader>ff', function() require("telescope").extensions.menufacture.find_files() end, def)
map('n', '<leader>fa', function() require("telescope").extensions.menufacture.grep_string() end, def)
map('n', '<leader>fs', function() require("telescope").extensions.menufacture.live_grep() end, def)
map('n', '<leader>fb', function() require("telescope.builtin").buffers() end, def)
-- map('n', '<leader>fh', function() require('telescope.builtin').help_tags() end, def)
map('n', '<leader>fc', function() require("telescope.builtin").commands() end, def)
map('n', '<leader>f:', function() require("telescope.builtin").command_history() end, def)
map('n', '<leader>f/', function() require("telescope.builtin").search_history() end, def)
map('n', '<leader>fr', function() require("telescope.builtin").registers() end, def)
-- Neovim lsp pickers
map('n', 'gr', '<cmd>lua require("telescope.builtin").lsp_references()<cr>', def)
map('n', 'gd', '<cmd>lua require("telescope.builtin").lsp_definitions()<cr>', def)
map('n', 'grr', function() require("telescope.builtin").lsp_references() end, 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
-- map('n', '<leader>gc', '<cmd>lua require("telescope.builtin").git_commits()<cr>', def)
-- map('n', '<leader>gC', '<cmd>lua require("telescope.builtin").git_bcommits()<cr>', def)
-- map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', def)
-- map('n', '<leader>gb', '<cmd>lua require("telescope.builtin").git_branches()<cr>', def)
-- map('n', '<leader>gc', function() require("telescope.builtin").git_commits() end, def)
-- map('n', '<leader>gC', function() require("telescope.builtin").git_bcommits() end, def)
-- map('n', '<leader>gb', function() require("telescope.builtin").git_branches() end, def)
-- map('n', '<leader>gb', function() require("telescope.builtin").git_branches() end, def)
-- other
-- map('n', '<leader>s', '<cmd>lua require('telescope').extensions.ultisnips.ultisnips()<cr>, def)
map('n', '<leader>u', '<cmd>lua require("telescope").extensions.undo.undo()<cr>', def)
-- map('n', '<leader>s', function() require('telescope').extensions.ultisnips.ultisnips() end, 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
}

View File

@@ -41,7 +41,7 @@ return {
"ini",
"jq",
"json",
"latex",
--"latex",
"lua",
"make",
"markdown",
@@ -59,13 +59,13 @@ return {
modules = {},
highlight = {
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,
-- 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 = {

View File

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

12
.gitattributes vendored
View File

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

View File

@@ -1,44 +1,59 @@
[push]
default = simple
[user]
name = Robert Kmieć
email = KmcR@viessmann.com
email = robert.r.kmiec@gmail.com
[core]
editor = nvim
pager = delta
autocrlf = false
excludesfile = /home/rkmiec/.config/git/ignore
excludesfile = ~/.config/git/ignore
symlinks = true
attributesfile = ~/.gitattributes
fsmonitor = true
#attributesfile = ~/.gitattributes
untrackedCache = true
[init]
defaultBranch = master
[advice]
detachedHead = false
[help]
autocorrect = 1
[color]
ui = true
[column]
ui = auto
[grep]
linenumber = true
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
smtpuser = robert.r.kmiec@gmail.com
smtpserverport = 587
[merge]
conflictstyle = diff3
tool = nfugitive
[mergetool "nfugitive"]
cmd = nvim -c "Gvdiffsplit!" "$MERGED"
[diff]
tool = nvimdiff
[difftool "nvimdiff"]
cmd = nvim -d "$LOCAL" "$REMOTE"
[diff "markdown"]
xfuncname = "^#+.*$"
parrernType = perl
[fetch]
writeCommitGraph = true
all = true
#pruneTags = true
[push]
default = simple
autoSetupRemote = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
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]
cm = commit
co = checkout
@@ -51,9 +66,38 @@
diff-image = "!f() { cd -- \"${GIT_PREFIX:-.}\"; GIT_DIFF_IMAGE_ENABLED=1 git diff \"$@\"; }; f"
[interactive]
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]
features = side-by-side line-numbers decorations
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"]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
@@ -63,16 +107,8 @@
[commit]
template = .gitmessage
verbose = false
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[init]
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]
detachedHead = false
[submodule]
@@ -83,7 +119,29 @@
ui = auto
[branch]
sort = -commiterdate
[fetch]
writeCommitGraph = true
[pull]
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]
repo = /home/kmcr/repos/hems/hemsmilsimulation
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
smtpuser = robert.r.kmiec@gmail.com
smtpserverport = 587
[feature]
experimental = true