Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions atuin/.config/atuin/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
update_check = false
style="compact"
inline_height=20
auto_sync = false
2 changes: 1 addition & 1 deletion bash/.aliases
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export PATH=/home/joaj/.local/bin:$PATH
export PATH=$PATH:"$XDG_DATA_HOME"/cargo/bin
export PATH=$PATH:"$XDG_CONFIG_HOME"/emacs/bin
export PATH=$PATH:"$XDG_DATA_HOME"/gem/ruby/2.7.0/bin
export PATH=$PATH:"$XDG_CONFIG_HOME"/emacs/bin
export PATH=$PATH:"$XDG_DATA_HOME"/bob/nvim-bin
export MANPAGER='vim -R -M +MANPAGER -'

source ~/.secrets
Expand Down
11 changes: 9 additions & 2 deletions bash/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@

PS1='[\u@\h \W]\$ '

source .profile
source .aliases
source /home/joaj/.profile
source /home/joaj/.aliases

# vim: set ft=sh:

#. "$HOME/.atuin/bin/env"

[[ -f ~/.bash-preexec.sh ]] && source ~/.bash-preexec.sh
#eval "$(atuin init bash)"

. "$HOME/.local/share/../bin/env"
4 changes: 4 additions & 0 deletions bash/.profile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ export HOSTNAME=$(hostname)
TZ='Europe/Lisbon'; export TZ

# vim: set ft=sh:

. "$HOME/.atuin/bin/env"

. "$HOME/.local/share/../bin/env"
6 changes: 6 additions & 0 deletions ctw/.ctw.aliases
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
alias clang-format-adp='bazel run //bazel/tools/clang_format:fix'
alias clang-check-adp='bazel run //bazel/tools/clang_format:check application/adp'
alias buildifier='bazel run //bazel/tools/buildifier:fix'
alias klockwork='bazel run //application/adp/tools/klocwork:klocwork_analysis -- -t "//application/adp/activities/driver:driver_activity" -o ~/klocwork'
alias carmen='wine "/home/joaj/.wine/drive_c/Program Files (x86)/Systemtesttools/CARMEN/bin/TopEd.exe"'
alias mapr='sshfs jmfreitas1@bmwdpdesp000104.advantagedp.org:/maprposix /home/joaj/mapr'
50 changes: 30 additions & 20 deletions git/.gitconfig
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
[user]
email = joaj.freitas@gmail.com
name = João Freitas
signingkey = 7ED1B2BB849809852B25C6ECE7EF5BDBBED2E1E6
[commit]
gpgsign = true
email = joao.mc.freitas@ctw.bmwgroup.com
name = João Freitas
[core]
editor = nvim
attributesfile = ~/.config/git/attributes
hooksPath=hooks
whitespace = trailing-space,space-before-tab
[merge "json"]
name = custom merge driver for json files
driver = git-json-merge %A %O %B
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
editor = nvim
whitespace = trailing-space,space-before-tab
[column]
ui = auto
[branch]
sort = -committerdate
[apply]
whitespace = fix
whitespace = fix
[merge]
conflictStyle = zdiff3
[rerere]
enabled = true
enabled = true
autoupdated = true
[push]
recurseSubmodules = check
autoSetupRemote = true
[diff]
algorithm = histogram
colorMoved = plain
renames = true
mnemonicPrefix = true
[fetch]
prune = true
[rebase]
autoSquash = true
autoStash = true
updateRefs = true
[pull]
rebase = true
[alias]
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all -n 15
out = "log @{u}.."
6 changes: 6 additions & 0 deletions nvim/.config/nvim/.stylua.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
column_width = 160
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 4
quote_style = "AutoPreferSingle"
call_parentheses = "None"
1 change: 1 addition & 0 deletions nvim/.config/nvim/ftdetect/fcp.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
autocmd BufRead,BufNewFile *.fcp set filetype=fcp
81 changes: 57 additions & 24 deletions nvim/.config/nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,30 +1,63 @@
-- disable netrw at the very start of your init.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '

require('plugins').setup()
require('lsp').setup()
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/luasnippets" })
require("telescope").setup({
extensions = {
fzf = {
fuzzy = true,
override_generic_sorter = true,
override_file_sorter = true,
case_mode = "smart_case",
},
},
vim.g.have_nerd_font = true

vim.wo.number = true
vim.o.mouse = 'a'

vim.schedule(function()
vim.o.clipboard = 'unnamedplus'
end)

vim.o.undofile = true
vim.o.ignorecase = true
vim.o.smartcase = true
vim.o.signcolumn = 'yes'
vim.o.updatetime = 250

vim.opt.swapfile = false

vim.o.inccommand = 'split'
vim.o.scrolloff = 10
vim.o.confirm = true

vim.o.splitright = true
vim.o.splitbelow = true

vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })

vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('highlight-yank', { clear = true }),
callback = function()
vim.hl.on_yank()
end,
})

-- Set conceallevel to 1 for markdown files, needed for obsidian.nvim
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWinEnter' }, {
pattern = { '*.md' },
command = 'lua vim.opt.conceallevel = 1',
})

vim.api.nvim_create_autocmd('BufWritePre', {
desc = 'Format on save',
pattern = { '*.lua', '*.rs', '*.py', '*.ts', '*.js', '*.cpp', '*.h', '*.c' },
group = vim.api.nvim_create_augroup('format-on-save', { clear = true }),
callback = function()
vim.lsp.buf.format()
end,
})
require("telescope").load_extension("fzf")

require('plugins').setup()
require('luasnip.loaders.from_lua').load { paths = '~/.config/nvim/luasnippets' }
require('keybindings').setup()
require('colorscheme').setup()
require('neovide').setup()
require('completion').setup()
require('dap_config').setup()
require('gitsigns_config').setup()
require(vim.uv.os_gethostname()).setup()

vim.o.autochdir = true
vim.wo.number = true
vim.opt.clipboard = "unnamedplus"
vim.g.mapleader = " "

vim.o.tabstop = 4
vim.o.expandtab = true
vim.o.softtabstop = 4
vim.o.shiftwidth = 4
90 changes: 59 additions & 31 deletions nvim/.config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,61 @@
{
"LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" },
"blame.nvim": { "branch": "main", "commit": "dedbcdce857f708c63f261287ac7491a893912d0" },
"cmp-ledger": { "branch": "main", "commit": "4b278333d4a4b59fd960383eac687eb47c23abe5" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"friendly-snippets": { "branch": "main", "commit": "45a1b96e46efe5fce8af325d4bed45feb9d29d0f" },
"gitsigns.nvim": { "branch": "main", "commit": "375c44bdfdde25585466a966f00c2e291db74f2d" },
"gruvbox": { "branch": "master", "commit": "f1ecde848f0cdba877acb0c740320568252cc482" },
"image.nvim": { "branch": "master", "commit": "61c76515cfc3cdac8123ece9e9761b20c3dc1315" },
"lazy.nvim": { "branch": "main", "commit": "d1de92dffab5a862332fdd1892889d362369c12f" },
"limelight.vim": { "branch": "master", "commit": "785c1e17fe90c587ebca88920baa3146cd6e30fa" },
"lsp-zero.nvim": { "branch": "v3.x", "commit": "87701af045b3032515776abeb47eb8c2ddb5e679" },
"lunar.nvim": { "branch": "master", "commit": "08bbc93b96ad698d22fc2aa01805786bcedc34b9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" },
"mason.nvim": { "branch": "main", "commit": "f96a31855fa8aea55599cea412fe611b85a874ed" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
"nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" },
"nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" },
"nvim-lspconfig": { "branch": "master", "commit": "cf97d2485fc3f6d4df1b79a3ea183e24c272215e" },
"nvim-nio": { "branch": "master", "commit": "7969e0a8ffabdf210edd7978ec954a47a737bbcc" },
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
"telescope.nvim": { "branch": "master", "commit": "bfcc7d5c6f12209139f175e6123a7b7de6d9c18a" },
"CopilotChat.nvim": { "branch": "main", "commit": "69199d46b56f67a226789da256264c6291c4e63d" },
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"LuaSnip": { "branch": "master", "commit": "dae4f5aaa3574bd0c2b9dd20fb9542a02c10471c" },
"aw-watcher-vim": { "branch": "master", "commit": "4ba86d05a940574000c33f280fd7f6eccc284331" },
"blame.nvim": { "branch": "main", "commit": "f3f6153ea94e1120f2776f22bbbd63c4aeebaf32" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
"cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" },
"cmp-ledger": { "branch": "main", "commit": "0b5c010dac3e3323d3611462ee9f0c8ee7f51d34" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"codecompanion-copilot-enterprise.nvim": { "branch": "main", "commit": "81f70ecfd9fa74fd33f1eddb578414e604986b1e" },
"codecompanion.nvim": { "branch": "main", "commit": "26fa57cd0ac019c9bae539e7530f7c9401cbee55" },
"copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" },
"copilot.vim": { "branch": "release", "commit": "a12fd5672110c8aa7e3c8419e28c96943ca179be" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"fugitive-gitlab.vim": { "branch": "master", "commit": "3584cf7e607ba7822f991d407a8d780e05aae287" },
"gitsigns.nvim": { "branch": "main", "commit": "1ce96a464fdbc24208e24c117e2021794259005d" },
"gruvbox.nvim": { "branch": "main", "commit": "a472496e1a4465a2dd574389dcf6cdb29af9bf1b" },
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
"image.nvim": { "branch": "master", "commit": "446a8a5cc7a3eae3185ee0c697732c32a5547a0b" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"limelight.vim": { "branch": "master", "commit": "0c8cc7f503a775c505dc9c67f1f5041ab4d5f1fd" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "ae609525ddf01c153c39305730b1791800ffe4fe" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"mini.icons": { "branch": "main", "commit": "efc85e42262cd0c9e1fdbf806c25cb0be6de115c" },
"neogit": { "branch": "master", "commit": "73870229977fdd8747025820e15e98cfde787b9c" },
"neotest": { "branch": "master", "commit": "deadfb1af5ce458742671ad3a013acb9a6b41178" },
"neotest-gtest": { "branch": "main", "commit": "b66f1d33cbf3b37b9803e6bc7ef47ac60eba86b1" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
"nvim-dap": { "branch": "master", "commit": "e47878dcf1ccc30136b30d19ab19fe76946d61cd" },
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
"nvim-lspconfig": { "branch": "master", "commit": "59cd07d8df2fefde32556268b8d52606a32152a1" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-tree.lua": { "branch": "master", "commit": "037d89e60fb01a6c11a48a19540253b8c72a3c32" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
"obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" },
"oil.nvim": { "branch": "master", "commit": "f55b25e493a7df76371cfadd0ded5004cb9cd48a" },
"one-small-step-for-vimkind": { "branch": "main", "commit": "1af6ffb9b5229a856e8090fa2f690e0931a5aace" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"project.nvim": { "branch": "main", "commit": "84df1ae586772d40fb5b723a9dfc16bdd376e84a" },
"rustaceanvim": { "branch": "master", "commit": "88575b98bb9937fb9983ddec5e532b67e75ce677" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"true-zen.nvim": { "branch": "main", "commit": "2b9e210e0d1a735e1fa85ec22190115dffd963aa" },
"vim-fugitive": { "branch": "master", "commit": "8c8cdf4405cb8bdb70dd9812a33bb52363a87dbc" },
"vim-ledger": { "branch": "master", "commit": "7b97c8765bf920e92fd950a7a5bc37cb2b13a494" },
"which-key.nvim": { "branch": "main", "commit": "af4ded85542d40e190014c732fa051bdbf88be3d" }
}
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
"vim-ledger": { "branch": "master", "commit": "6d12e23e7261342f9dd4a23b9dd3a504454df002" },
"vim-lumen": { "branch": "master", "commit": "97157aac9f0d24c144a3defdfe5057ee61e18dcb" },
"vim-rhubarb": { "branch": "master", "commit": "5496d7c94581c4c9ad7430357449bb57fc59f501" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
"whitespace.nvim": { "branch": "master", "commit": "8bf60b4a6892aa517a78a6014896078ae0c4c642" }
}
23 changes: 3 additions & 20 deletions nvim/.config/nvim/lua/colorscheme.lua
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
local M = {}

local sunset = function(month)
local sunset = { 18, 18, 19, 20, 21, 22, 22, 21, 20, 19, 18, 18 }
return sunset[month]
end

local sunrise = function(month)
local sunrise = { 8, 8, 7, 6, 7, 6, 6, 7, 7, 8, 7, 8 }
return sunrise[month]
end


M.setup = function()
vim.opt.termguicolors = true
vim.cmd.colorscheme("gruvbox")
local time = os.date("*t")


if time.hour <= sunrise(time.month) or time.hour >= sunset(time.month) then
vim.o.background = "dark"
else
vim.o.background = "light"
end
vim.cmd.colorscheme 'gruvbox'
vim.opt.colorcolumn = '80'
vim.api.nvim_set_hl(0, 'Beacon', { bg = 'white' })
end

return M
73 changes: 73 additions & 0 deletions nvim/.config/nvim/lua/completion.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
local M = {}

M.setup = function()
cmp = require 'cmp'
lvim = require 'lvim'

cmp.setup {
mapping = cmp.mapping.preset.insert {
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.abort(),
['<CR>'] = cmp.mapping.confirm { select = true },
},
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end,
},
sources = {
{ name = 'copilot' },
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
{ name = 'emoji' },
{ name = 'buffer' },
{ name = 'cmp_tabnine' },
{ name = 'ledger' },
},
formatting = {
format = function(entry, vim_item)
local max_width = 0 --lvim.builtin.cmp.formatting.max_width
if max_width ~= 0 and #vim_item.abbr > max_width then
vim_item.abbr = string.sub(vim_item.abbr, 1, max_width - 1) .. lvim.icons.ui.Ellipsis
end
if lvim.use_icons then
vim_item.kind = lvim.icons.kind[vim_item.kind] --lvim.builtin.cmp.formatting.kind_icons[vim_item.kind]

if entry.source.name == 'copilot' then
vim_item.kind = lvim.icons.git.Octoface
vim_item.kind_hl_group = 'CmpItemKindCopilot'
end

if entry.source.name == 'cmp_tabnine' then
vim_item.kind = lvim.icons.misc.Robot
vim_item.kind_hl_group = 'CmpItemKindTabnine'
end

if entry.source.name == 'crates' then
vim_item.kind = lvim.icons.misc.Package
vim_item.kind_hl_group = 'CmpItemKindCrate'
end

if entry.source.name == 'lab.quick_data' then
vim_item.kind = lvim.icons.misc.CircuitBoard
vim_item.kind_hl_group = 'CmpItemKindConstant'
end

if entry.source.name == 'emoji' then
vim_item.kind = lvim.icons.misc.Smiley
vim_item.kind_hl_group = 'CmpItemKindEmoji'
end
end
vim_item.menu = lvim.formatting.source_names[entry.source.name]
vim_item.dup = lvim.formatting.duplicates[entry.source.name] or lvim.formatting.duplicated_default

return vim_item
end,
},
}
end

return M
Loading