merge with work setup

This commit is contained in:
Vladan Popovic 2025-12-07 13:04:02 +01:00
parent b1de5c7c10
commit 86fbe4ac56
9 changed files with 66 additions and 84 deletions

View file

@ -7,6 +7,14 @@
[[ -f /etc/bashrc ]] && source /etc/bashrc [[ -f /etc/bashrc ]] && source /etc/bashrc
[[ -f $HOME/.environ ]] && . $HOME/.environ [[ -f $HOME/.environ ]] && . $HOME/.environ
# Local user bins
add_path() case :$PATH: in *:$1:*) ;; *) PATH=$1:$PATH;; esac
add_path $HOME/.local/bin
add_path $HOME/.cargo/bin
add_path $HOME/.kubectl-plugins:$PATH
add_path $HOME/.tiup/bin
add_path $PYTHONUSERBASE/bin
# Append to history, don't overwrite. # Append to history, don't overwrite.
shopt -s histappend shopt -s histappend
@ -16,9 +24,12 @@ shopt -s histappend
[[ -f $HOME/.bash_functions ]] && source "$HOME/.bash_functions" [[ -f $HOME/.bash_functions ]] && source "$HOME/.bash_functions"
# Save working dir on every prompt. # Save working dir on every prompt.
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"; pwd > $HOME/.cwd' # export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"; pwd > $HOME/.cwd'
export PS1="${Blue}\d \A ${Off}${Yellow}\u@\h: ${Off}\w ${Green}\$(parse_branch git)${BRed}\$(parse_branch fossil)${Off}\n-$ " export PS1="${Blue}\d \A ${Off}${Yellow}\u@\h: ${Off}\w ${Green}\$(parse_branch git)${BRed}\$(parse_branch fossil)${Off}\n-$ "
# more is less
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# Use fzf if installed. # Use fzf if installed.
hash fzf 2>/dev/null && eval "$(fzf --bash)" hash fzf 2>/dev/null && eval "$(fzf --bash)"
export FZF_DEFAULT_OPTS='--border=horizontal --info=inline --no-reverse --height=50%' export FZF_DEFAULT_OPTS='--border=horizontal --info=inline --no-reverse --height=50%'

View file

@ -1,10 +1,3 @@
[general]
import = [
"~/.config/alacritty/dark.toml"
]
live_config_reload = true
working_directory = "None"
[cursor] [cursor]
thickness = 0.2 thickness = 0.2
style = "Block" style = "Block"
@ -422,3 +415,13 @@ decorations = "full"
dynamic_padding = false dynamic_padding = false
dynamic_title = true dynamic_title = true
opacity = 1 opacity = 1
[general]
live_config_reload = true
working_directory = "None"
import = [
"~/.config/alacritty/themes/themes/everforest_dark.toml"
]
[terminal]

View file

@ -1,32 +1,4 @@
# Colors (Tomorrow Night) # Colors (Tomorrow Night)
import = [
# Default colors "~/.config/alacritty/themes/themes/everforest_dark.toml"
[colors.primary] ]
background = '#1d2329'
foreground = '#c5c8c6'
[colors.cursor]
text = '#1d1f21'
cursor = '#ffffff'
# Normal colors
[colors.normal]
black = '#1d1f21'
red = '#cc6666'
green = '#7ea400'
yellow = '#e6c547'
blue = '#81a2be'
magenta = '#b294bb'
cyan = '#000000'
white = '#373b41'
# Bright colors
[colors.bright]
black = '#666666'
red = '#ff3334'
green = '#7ea400'
yellow = '#f0c674'
blue = '#81a2be'
magenta = '#b77ee0'
cyan = '#54ced6'
white = '#282a2e'

View file

@ -51,3 +51,12 @@ vim.keymap.set('n', 'gr', builtin.lsp_references)
vim.keymap.set('n', 'gi', builtin.lsp_implementations) vim.keymap.set('n', 'gi', builtin.lsp_implementations)
vim.keymap.set('n', '<leader>ci', builtin.lsp_incoming_calls) vim.keymap.set('n', '<leader>ci', builtin.lsp_incoming_calls)
vim.keymap.set('n', '<leader>co', builtin.lsp_outgoing_calls) vim.keymap.set('n', '<leader>co', builtin.lsp_outgoing_calls)
vim.keymap.set('n', '<leader>x', function()
-- Check if diagnostics are currently enabled for the current buffer
if vim.diagnostic.is_enabled() then
vim.diagnostic.enable(false)
else
vim.diagnostic.enable()
end
end, { noremap = true, silent = true, desc = "Toggle diagnostics" })

View file

@ -2,7 +2,7 @@ local autoformat_files = '*.py,*.rs,*.tf'
local common_on_attach = function(client, bufnr) local common_on_attach = function(client, bufnr)
-- Autoformat on save. -- Autoformat on save.
if client.supports_method("textDocument/formatting") then if client:supports_method("textDocument/formatting") then
vim.api.nvim_create_autocmd("BufWritePre", { vim.api.nvim_create_autocmd("BufWritePre", {
pattern = autoformat_files, pattern = autoformat_files,
callback = function() callback = function()
@ -12,10 +12,10 @@ local common_on_attach = function(client, bufnr)
end end
-- Use vim's default coloring. -- Use vim's default coloring.
client.server_capabilities.semanticTokensProvider = nil --client.server_capabilities.semanticTokensProvider = nil
for _, group in ipairs(vim.fn.getcompletion("@lsp", "highlight")) do --for _, group in ipairs(vim.fn.getcompletion("@lsp", "highlight")) do
vim.api.nvim_set_hl(0, group, {}) -- vim.api.nvim_set_hl(0, group, {})
end --end
end end
-- LSP diagnostics. -- LSP diagnostics.
@ -27,7 +27,6 @@ vim.lsp.handlers["textDocument/publishDiagnostics"] =
update_in_insert = false update_in_insert = false
}) })
-- Setup rust outside of lspconfig.
vim.g.rustaceanvim = function() vim.g.rustaceanvim = function()
return { return {
-- Plugin configuration. -- Plugin configuration.
@ -69,7 +68,6 @@ local capabilities = vim.lsp.protocol.make_client_capabilities()
vim.lsp.enable('ty') vim.lsp.enable('ty')
-- LSPs
local servers = { local servers = {
"clangd", "clangd",
"lua_ls", "lua_ls",

View file

@ -1,37 +1,33 @@
vim.pack.add({ vim.pack.add({
'https://github.com/wbthomason/packer.nvim',
'https://github.com/glepnir/nerdicons.nvim',
'https://github.com/nvim-telescope/telescope.nvim',
'https://github.com/nvim-lua/popup.nvim',
'https://github.com/nvim-lua/plenary.nvim',
'https://github.com/hrsh7th/nvim-cmp',
'https://github.com/hrsh7th/cmp-nvim-lsp',
'https://github.com/hrsh7th/cmp-buffer',
'https://github.com/hrsh7th/cmp-path',
'https://github.com/hrsh7th/cmp-cmdline',
'https://github.com/L3MON4D3/LuaSnip', 'https://github.com/L3MON4D3/LuaSnip',
'https://github.com/rafamadriz/friendly-snippets',
'https://github.com/saadparwaiz1/cmp_luasnip',
'https://github.com/benfowler/telescope-luasnip.nvim',
"https://github.com/neanias/everforest-nvim",
'https://github.com/neovim/nvim-lspconfig',
'https://github.com/aznhe21/actions-preview.nvim',
'https://github.com/folke/trouble.nvim',
'https://github.com/cespare/vim-toml',
'https://github.com/gleam-lang/gleam.vim',
'https://github.com/hashivim/vim-terraform',
'https://github.com/mrcjkb/rustaceanvim',
'https://github.com/mfussenegger/nvim-dap',
'https://github.com/mfussenegger/nvim-dap',
'https://github.com/rcarriga/nvim-dap-ui',
'https://github.com/mfussenegger/nvim-dap',
'https://github.com/nvim-neotest/nvim-nio',
'https://github.com/NeogitOrg/neogit', 'https://github.com/NeogitOrg/neogit',
'https://github.com/nvim-lua/plenary.nvim', 'https://github.com/aznhe21/actions-preview.nvim',
'https://github.com/sindrets/diffview.nvim', 'https://github.com/benfowler/telescope-luasnip.nvim',
'https://github.com/lewis6991/gitsigns.nvim', 'https://github.com/cespare/vim-toml',
'https://github.com/folke/trouble.nvim',
'https://github.com/gleam-lang/gleam.vim',
'https://github.com/glepnir/nerdicons.nvim',
'https://github.com/hashivim/vim-terraform',
'https://github.com/hedyhli/outline.nvim', 'https://github.com/hedyhli/outline.nvim',
'https://github.com/hrsh7th/cmp-buffer',
'https://github.com/hrsh7th/cmp-cmdline',
'https://github.com/hrsh7th/cmp-nvim-lsp',
'https://github.com/hrsh7th/cmp-path',
'https://github.com/hrsh7th/nvim-cmp',
'https://github.com/lewis6991/gitsigns.nvim',
'https://github.com/mfussenegger/nvim-dap',
'https://github.com/mrcjkb/rustaceanvim',
'https://github.com/neanias/everforest-nvim',
'https://github.com/nvim-lua/plenary.nvim',
'https://github.com/nvim-lua/popup.nvim',
'https://github.com/nvim-neotest/nvim-nio',
'https://github.com/nvim-telescope/telescope.nvim',
'https://github.com/rafamadriz/friendly-snippets',
'https://github.com/rcarriga/nvim-dap-ui',
'https://github.com/saadparwaiz1/cmp_luasnip',
'https://github.com/sindrets/diffview.nvim',
'https://github.com/stevearc/oil.nvim', 'https://github.com/stevearc/oil.nvim',
'https://github.com/wbthomason/packer.nvim',
}) })
require('plugins.cmp') require('plugins.cmp')

View file

@ -25,7 +25,6 @@
# exit sway (logs you out of your Wayland session) # exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
bindsym ctrl+Space exec makoctl dismiss
bindsym ctrl+Shift+Space exec makoctl dismiss --all bindsym ctrl+Shift+Space exec makoctl dismiss --all
# #
# Moving around: # Moving around:

View file

@ -1,6 +1,6 @@
# vim: set ft=sh: # vim: set ft=sh:
export EDITOR=hx export EDITOR=nvim
export GIT_EDITOR=$EDITOR export GIT_EDITOR=$EDITOR
export HISTCONTROL=ignoredups:erasedups # Avoid duplicates export HISTCONTROL=ignoredups:erasedups # Avoid duplicates
export HISTFILESIZE=100000000 # big big history export HISTFILESIZE=100000000 # big big history
@ -14,9 +14,3 @@ export PYTHONDONTWRITEBYTECODE=1
export PYTHONUSERBASE=$HOME/.env/python export PYTHONUSERBASE=$HOME/.env/python
export TZ="Europe/Belgrade" export TZ="Europe/Belgrade"
export FZF_DEFAULT_OPTS='--border=horizontal --info=inline --no-reverse --height=50%' export FZF_DEFAULT_OPTS='--border=horizontal --info=inline --no-reverse --height=50%'
# Local user bins
add_path() case :$PATH: in *:$1:*) ;; *) PATH=$1:$PATH;; esac
add_path $HOME/.local/bin
add_path $PYTHONUSERBASE/bin
add_path $HOME/.cargo/bin