This commit is contained in:
Jaroslaw Konik 2023-07-27 12:50:35 +02:00
parent dd7cc9909c
commit fef41dd0d9
2 changed files with 36 additions and 22 deletions

View file

@ -192,10 +192,10 @@ set $darkgray #1d2021
# green gruvbox # green gruvbox
# class border|backgr|text|indicator|child_border # class border|backgr|text|indicator|child_border
client.focused $aqau $aqua $darkgray $purple $aqua client.focused $aqua $aqua $aqua $aqua $aqua
client.focused_inactive $darkgray $darkgray $yellow $purple $darkgray client.focused_inactive $darkgray $darkgray $darkgray $darkgray $darkgray
client.unfocused $red $darkgray $yellow $purple $darkgray client.unfocused $darkgray $darkgray $darkgray $darkgray $darkgray
client.urgent $red $red $white $red $red client.urgent $red $red $red $red $red
bar { bar {
i3bar_command i3bar --transparency i3bar_command i3bar --transparency
@ -224,10 +224,11 @@ exec_always --no-startup-id xset dpms 180 360 720
# bindsym $mod+d exec "dmenu_run -l 10 -nf '#F8F8F2' -nb '#282A36' -sb '#6272A4' -sf '#F8F8F2' -fn 'FiraCode Nerd Font-20' -p 'run:'" # bindsym $mod+d exec "dmenu_run -l 10 -nf '#F8F8F2' -nb '#282A36' -sb '#6272A4' -sf '#F8F8F2' -fn 'FiraCode Nerd Font-20' -p 'run:'"
exec feh --bg-fill ~/Pictures/wallpaper.jpg exec_always feh --bg-fill ~/Pictures/wallpaper.jpg
for_window [instance="Godot_Engine"] floating enable for_window [instance="Godot_Engine"] floating enable
for_window [title="Desktop @ QRect(0,0 3840x1200) — Plasma"] kill, floating enable, border none for_window [title="Desktop @ QRect(0,0 3840x1200) — Plasma"] kill, floating enable, border none
for_window [class="plasmashell"] floating enable for_window [class="plasmashell"] floating enable
for_window [title="Bevy App"] floating enable
for_window [class="Pavucontrol"] floating enable for_window [class="Pavucontrol"] floating enable
for_window [class="Plasma"] floating enable, border none for_window [class="Plasma"] floating enable, border none
for_window [title="plasma-desktop"] floating enable, border none for_window [title="plasma-desktop"] floating enable, border none

View file

@ -12,7 +12,7 @@ end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
require("lazy").setup({ require("lazy").setup({
{ "NeogitOrg/neogit", dependencies = "nvim-lua/plenary.nvim" }, { "NeogitOrg/neogit", dependencies = "nvim-lua/plenary.nvim" },
"lewis6991/fileline.nvim", "lewis6991/fileline.nvim",
"mfussenegger/nvim-dap", "mfussenegger/nvim-dap",
{ {
@ -93,11 +93,6 @@ require("lazy").setup({
"edluffy/hologram.nvim", "edluffy/hologram.nvim",
"xiyaowong/transparent.nvim", "xiyaowong/transparent.nvim",
"ellisonleao/gruvbox.nvim", "ellisonleao/gruvbox.nvim",
{
"akinsho/toggleterm.nvim",
version = "*",
opts = { winbar = { enabled = true }, shade_terminals = false, start_in_insert = true },
},
{ {
"williamboman/mason.nvim", "williamboman/mason.nvim",
build = ":MasonUpdate", -- :MasonUpdate updates registry contents build = ":MasonUpdate", -- :MasonUpdate updates registry contents
@ -117,7 +112,7 @@ require("lazy").setup({
-- Terminal tabs -- Terminal tabs
local conditions = require("heirline.conditions") local conditions = require("heirline.conditions")
local utils = require("heirline.utils") local utils = require("heirline.utils")
heirline = require("heirline") local heirline = require("heirline")
local colors = { local colors = {
bright_bg = utils.get_highlight("Folded").bg, bright_bg = utils.get_highlight("Folded").bg,
bright_fg = utils.get_highlight("Folded").fg, bright_fg = utils.get_highlight("Folded").fg,
@ -162,7 +157,7 @@ local TablineFileNameBlock = {
end end
end, end,
on_click = { on_click = {
callback = function(_, minwid, _, button) callback = function(_, minwid, _, _)
vim.api.nvim_win_set_buf(0, minwid) vim.api.nvim_win_set_buf(0, minwid)
end, end,
minwid = function(self) minwid = function(self)
@ -196,12 +191,12 @@ local TerminalLine = {
local BufferLine = { local BufferLine = {
condition = function() condition = function()
return not conditions.buffer_matches({ return not conditions.buffer_matches({
buftype = { "terminal" }, buftype = { "terminal", "nofile" },
}) })
end, end,
utils.make_buflist(TablineBufferBlock), utils.make_buflist(TablineBufferBlock),
} }
require("heirline").setup({ winbar = { TerminalLine, BufferLine } }) require("heirline").setup({ winbar = { BufferLine, TerminalLine } })
require("overseer").setup() require("overseer").setup()
@ -245,8 +240,8 @@ local function on_attach(client, buffer)
callback = function() callback = function()
vim.lsp.buf.format({ vim.lsp.buf.format({
async = false, async = false,
filter = function(client) filter = function(cl)
return client.name ~= "tsserver" return cl.name ~= "tsserver"
end, end,
}) })
end, end,
@ -362,9 +357,9 @@ vim.api.nvim_create_autocmd("BufEnter", {
callback = function() callback = function()
local layout = vim.api.nvim_call_function("winlayout", {}) local layout = vim.api.nvim_call_function("winlayout", {})
if if
layout[1] == "leaf" layout[1] == "leaf"
and vim.api.nvim_buf_get_option(vim.api.nvim_win_get_buf(layout[2]), "filetype") == "NvimTree" and vim.api.nvim_buf_get_option(vim.api.nvim_win_get_buf(layout[2]), "filetype") == "NvimTree"
and layout[3] == nil and layout[3] == nil
then then
vim.cmd("confirm quit") vim.cmd("confirm quit")
end end
@ -410,7 +405,7 @@ local telescope_builtin = require("telescope.builtin")
wk.register({ wk.register({
c = { c = {
name = "Edit", name = "Config",
e = { "<cmd>e ~/src/dotfiles/init.lua<CR>", "Edit config" }, e = { "<cmd>e ~/src/dotfiles/init.lua<CR>", "Edit config" },
u = { u = {
function() function()
@ -456,6 +451,7 @@ wk.register({
}, },
}, { prefix = "<leader>" }) }, { prefix = "<leader>" })
vim.keymap.set("n", "<Tab>", "<cmd>bnext<CR>", {})
vim.keymap.set("n", "<c-o>", "<cmd>BufferLinePick<CR>", {}) vim.keymap.set("n", "<c-o>", "<cmd>BufferLinePick<CR>", {})
vim.keymap.set("n", "<c-p>", telescope_builtin.find_files, {}) vim.keymap.set("n", "<c-p>", telescope_builtin.find_files, {})
vim.keymap.set("t", "<Esc>", "<C-\\><C-n>", {}) vim.keymap.set("t", "<Esc>", "<C-\\><C-n>", {})
@ -463,7 +459,7 @@ vim.keymap.set("n", "<c-c>", function()
if vim.bo.buftype ~= "nofile" and vim.bo.buftype ~= "terminal" then if vim.bo.buftype ~= "nofile" and vim.bo.buftype ~= "terminal" then
require("bufdelete").bufdelete(0, false) require("bufdelete").bufdelete(0, false)
end end
end, keymap_opts) end, {})
-- LSP Config -- LSP Config
require("lspconfig").tsserver.setup({}) require("lspconfig").tsserver.setup({})
@ -475,6 +471,16 @@ require("lspconfig").ruby_ls.setup({
cmd = { "bundle", "exec", "ruby-lsp" }, cmd = { "bundle", "exec", "ruby-lsp" },
on_attach = on_attach, on_attach = on_attach,
}) })
require("lspconfig").lua_ls.setup({
settings = {
Lua = {
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { "vim" },
},
},
},
})
require("lspconfig").solargraph.setup({ require("lspconfig").solargraph.setup({
cmd = { "bundle", "exec", "solargraph", "stdio" }, cmd = { "bundle", "exec", "solargraph", "stdio" },
on_attach = on_attach, on_attach = on_attach,
@ -524,3 +530,10 @@ require("nvim-treesitter.configs").setup({
-- Tests -- Tests
vim.g["test#strategy"] = "neovim" vim.g["test#strategy"] = "neovim"
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = vim.fn.expand("~") .. "/notes/*",
callback = function()
vim.fn.jobstart('git add . && git -C ~/notes commit -am "update" && git -C ~/notes push')
end,
})