feat: some shit

This commit is contained in:
max_richter 2022-10-06 21:14:32 +02:00
parent fdc2bbdbe4
commit 77576e3bdf
11 changed files with 137 additions and 105 deletions

View File

@ -0,0 +1,7 @@
-- Automatically close the goto definition buffer after leaving
local buffer_id = vim.api.nvim_win_get_buf(0)
vim.api.nvim_create_autocmd({ "bufwinleave", "bufleave" }, {
pattern = "*",
once = true,
command = "bdelete " .. buffer_id,
})

View File

@ -45,13 +45,7 @@ local config = {
-- Disable sections and component separators
component_separators = "",
section_separators = "",
theme = {
-- We are going to use lualine_c an lualine_x as left and
-- right section. Both are highlighted by c theme . So we
-- are just setting default looks o statusline
normal = { c = { fg = colors.fg, bg = colors.bg } },
inactive = { c = { fg = colors.fg, bg = colors.bg } },
},
theme = "catppuccin",
},
-- These are to remove the defaults

View File

@ -1,5 +1,5 @@
-- Configure nvim-tree
require("nvim-tree").setup {
require("nvim-tree").setup({
hijack_cursor = true,
update_cwd = false,
trash = {
@ -12,23 +12,28 @@ require("nvim-tree").setup {
hint = "",
info = "",
warning = "",
error = ""
}
error = "",
},
},
view = {
hide_root_folder = true,
signcolumn = "no"
signcolumn = "no",
},
renderer = {
group_empty = true,
highlight_opened_files = "all",
icons = {
glyphs = {
git = {
untracked = "*",
},
},
show = {
folder_arrow = false,
folder = true,
file = true,
git = true
}
}
}
}
git = true,
},
},
},
})

View File

@ -27,9 +27,9 @@ return packer.startup(function(use)
-- Theming Section
use("rktjmp/fwatch.nvim") -- Used to check dark/light theme
-- use("EdenEast/nightfox.nvim")
-- use({ "catppuccin/nvim", as = "catppuccin" })
use({ "catppuccin/nvim", as = "catppuccin" })
use("nvim-lualine/lualine.nvim")
use("sam4llis/nvim-tundra")
-- use("sam4llis/nvim-tundra")
-- Layout Plugins
use("dstein64/nvim-scrollview") -- ScrollBars
@ -104,7 +104,13 @@ return packer.startup(function(use)
use({ "ThePrimeagen/harpoon" })
-- More IDE like features
use("editorconfig/editorconfig-vim")
use({
"iamcco/markdown-preview.nvim",
run = function()
vim.fn["mkdp#util#install"]()
end,
})
use({
"nvim-neotest/neotest",
requires = {

View File

@ -1,48 +0,0 @@
-- Enable Theming / Syntax
vim.g.catppuccin_flavour = "mocha" -- latte, frappe, macchiato, mocha
local cat = require("catppuccin")
cat.setup({
transparent_background = true,
compile = {
enabled = true,
path = vim.fn.stdpath("cache") .. "/catppuccin",
},
styles = {
comments = { "italic" },
strings = { "italic" },
},
integrations = {
gitsigns = true,
telescope = true,
treesitter = true,
cmp = true,
nvimtree = {
enabled = true,
show_root = false,
},
dap = {
enabled = true,
enable_ui = true,
},
native_lsp = {
enabled = true,
},
ts_rainbow = true,
indent_blankline = {
enabled = true,
colored_indent_levels = false,
},
},
})
require("nightfox").setup({
options = {
transparent = true,
},
})
vim.cmd("colorscheme catppuccin")
require("utils.theme-reloader")
require("configs.lualine")

View File

@ -0,0 +1,43 @@
require("nvim-tundra").setup({
transparent_background = true,
editor = {
search = {},
substitute = {},
},
syntax = {
booleans = { bold = true, italic = true },
comments = { bold = true, italic = true },
conditionals = {},
constants = { bold = true },
functions = {},
keywords = {},
loops = {},
numbers = { bold = true },
operators = { bold = true },
punctuation = {},
strings = {},
types = { italic = true },
},
diagnostics = {
errors = {},
warnings = {},
information = {},
hints = {},
},
plugins = {
lsp = true,
treesitter = true,
cmp = true,
context = true,
dbui = true,
gitsigns = true,
telescope = true,
},
overwrite = {
colors = {},
highlights = {},
},
})
vim.opt.background = "dark"
vim.cmd("colorscheme tundra")

View File

@ -1,43 +1,50 @@
require("nvim-tundra").setup({
-- Enable Theming / Syntax
vim.g.catppuccin_flavour = "mocha" -- latte, frappe, macchiato, mocha
local cat = require("catppuccin")
cat.setup({
transparent_background = true,
editor = {
search = {},
substitute = {},
compile = {
enabled = true,
path = vim.fn.stdpath("cache") .. "/catppuccin",
},
syntax = {
booleans = { bold = true, italic = true },
comments = { bold = true, italic = true },
conditionals = {},
constants = { bold = true },
functions = {},
keywords = {},
loops = {},
numbers = { bold = true },
operators = { bold = true },
punctuation = {},
strings = {},
types = { italic = true },
styles = {
comments = { "italic" },
strings = { "italic" },
},
diagnostics = {
errors = {},
warnings = {},
information = {},
hints = {},
},
plugins = {
lsp = true,
treesitter = true,
cmp = true,
context = true,
dbui = true,
integrations = {
gitsigns = true,
telescope = true,
treesitter = true,
cmp = true,
lsp_saga = true,
notify = true,
nvimtree = {
enabled = true,
show_root = false,
},
dap = {
enabled = true,
enable_ui = true,
},
native_lsp = {
enabled = true,
},
ts_rainbow = true,
indent_blankline = {
enabled = true,
colored_indent_levels = false,
},
overwrite = {
colors = {},
highlights = {},
},
})
vim.opt.background = "dark"
vim.cmd("colorscheme tundra")
-- require("nightfox").setup({
-- options = {
-- transparent = true,
-- },
-- })
vim.cmd("colorscheme catppuccin")
require("utils.theme-reloader")
require("configs.lualine")

View File

@ -28,10 +28,11 @@ local function updateTheme()
if line then
local light = string.find(line, "light")
if light then
-- vim.cmd("colorscheme dayfox")
vim.g.catppuccin_flavour = "latte"
else
-- vim.cmd("colorscheme nightfox")
vim.g.catppuccin_flavour = "mocha"
end
vim.cmd("colorscheme catppuccin")
end
end

View File

@ -174,6 +174,11 @@ input "1739:24385:Synaptics_TM2438-005" {
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
bindsym $mod+Control+Left move workspace to output left
bindsym $mod+Control+Right move workspace to output right
bindsym $mod+Control+Up move workspace to output up
bindsym $mod+Control+Down move workspace to output down
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
@ -187,8 +192,9 @@ input "1739:24385:Synaptics_TM2438-005" {
for_window [app_id="gnome-calculator"] floating enable
for_window [app_id="qalculate-gtk"] floating enable
for_window [title="Zoom Meeting.*"] floating disable
for_window [title="Firefox Developer Edition — Sharing Indicator"] floating enable, sticky enable, move position 10 980
for_window [title="Firefox Developer Edition — Sharing Indicator"] floating enable, sticky enable, move position 10 980, resize set 75 50
for_window [title="Property Browser"] floating enable
for_window [title="Picture in Picture"] floating enable
for_window [title="Zoom Meeting.*"] inhibit_idle visible
for_window [app_id="firefox" title="^Picture-in-Picture$"] floating enable, move position 1300 600, sticky enable, resize set 600 450

View File

@ -2,6 +2,14 @@ local wezterm = require("wezterm")
local padding = 30
local function scheme_for_appearance(appearance)
if appearance:find("Dark") then
return "3024 Night"
else
return "Catppuccin Latte"
end
end
return {
font = wezterm.font("FiraCodeNerdFont"),
font_size = 13,
@ -11,6 +19,7 @@ return {
use_fancy_tab_bar = false,
hide_tab_bar_if_only_one_tab = true,
alternate_buffer_wheel_scroll_speed = 1,
color_scheme = scheme_for_appearance(wezterm.gui.get_appearance()),
window_close_confirmation = "AlwaysPrompt",
window_padding = {
left = padding,

View File

@ -28,3 +28,5 @@ alias lt="tree -L 2 --filelimit 150 --dirsfirst"
alias dc="docker-compose"
alias t="tmux"
alias nx="pnpm exec nx"