Compare commits
5 commits
8aa9882196
...
9f78d3edf1
Author | SHA1 | Date | |
---|---|---|---|
9f78d3edf1 | |||
2bff5edc9e | |||
5c3304bebf | |||
18e82da1c6 | |||
d79b876cd0 |
13 changed files with 150 additions and 60 deletions
|
@ -7,8 +7,8 @@ TERM = "xterm-256color"
|
||||||
size = 16.0
|
size = 16.0
|
||||||
|
|
||||||
[font.normal]
|
[font.normal]
|
||||||
family = "FiraCode Nerd Font Mono"
|
family = "JetBrainsMono Nerd Font Mono"
|
||||||
style = "Light"
|
style = "ExtraLight"
|
||||||
|
|
||||||
[window]
|
[window]
|
||||||
opacity = 1
|
opacity = 1
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Default colors
|
# Default colors
|
||||||
[colors.primary]
|
[colors.primary]
|
||||||
background = '#282828'
|
background = '#1d2021'
|
||||||
foreground = '#d4be98'
|
foreground = '#d4be98'
|
||||||
|
|
||||||
# Normal colors
|
# Normal colors
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
vim.g.gruvbox_material_better_performance = 1
|
vim.g.gruvbox_material_better_performance = 1
|
||||||
vim.g.gruvbox_material_background = 'medium'
|
vim.g.gruvbox_material_background = 'hard'
|
||||||
|
vim.g.gruvbox_material_foreground = 'original'
|
||||||
vim.opt.background = 'dark'
|
vim.opt.background = 'dark'
|
||||||
vim.cmd('colorscheme gruvbox-material')
|
vim.cmd('colorscheme gruvbox-material')
|
||||||
|
|
|
@ -3,6 +3,7 @@ require("conform").setup({
|
||||||
python = { "black" },
|
python = { "black" },
|
||||||
javascript = { "prettierd" },
|
javascript = { "prettierd" },
|
||||||
markdown = { "mdformat" },
|
markdown = { "mdformat" },
|
||||||
|
go = { "gofmt" },
|
||||||
json = {"jq"}
|
json = {"jq"}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -196,6 +196,61 @@ lazy.setup({
|
||||||
require("plugins.lspconfig")
|
require("plugins.lspconfig")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
branch = "dev",
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>xx",
|
||||||
|
"<cmd>Trouble diagnostics toggle<cr>",
|
||||||
|
desc = "Diagnostics (Trouble)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>xX",
|
||||||
|
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||||
|
desc = "Buffer Diagnostics (Trouble)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>cs",
|
||||||
|
"<cmd>Trouble symbols toggle focus=false<cr>",
|
||||||
|
desc = "Symbols (Trouble)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>cl",
|
||||||
|
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
||||||
|
desc = "LSP Definitions / references / ... (Trouble)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>xL",
|
||||||
|
"<cmd>Trouble loclist toggle<cr>",
|
||||||
|
desc = "Location List (Trouble)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>xQ",
|
||||||
|
"<cmd>Trouble qflist toggle<cr>",
|
||||||
|
desc = "Quickfix List (Trouble)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
modes = {
|
||||||
|
mydiags = {
|
||||||
|
mode = "diagnostics", -- inherit from diagnostics mode
|
||||||
|
filter = {
|
||||||
|
any = {
|
||||||
|
buf = 0, -- current buffer
|
||||||
|
{
|
||||||
|
severity = vim.diagnostic.severity.ERROR, -- errors only
|
||||||
|
-- limit to files in the current project
|
||||||
|
function(item)
|
||||||
|
return item.filename:find(vim.loop.cwd(), 1, true)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
|
@ -204,6 +259,19 @@ lazy.setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
'dense-analysis/ale',
|
||||||
|
config = function()
|
||||||
|
vim.g.ale_linters_explicit = 1
|
||||||
|
vim.g.ale_echo_msg_error_str = 'E'
|
||||||
|
vim.g.ale_echo_msg_warning_str = 'W'
|
||||||
|
vim.g.ale_echo_msg_format = '[%linter%] %s [%severity%]'
|
||||||
|
--vim.g.ale_linters = {
|
||||||
|
-- go = { 'golangci-lint' },
|
||||||
|
--}
|
||||||
|
end
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"lervag/vimtex",
|
"lervag/vimtex",
|
||||||
config = function()
|
config = function()
|
||||||
|
@ -211,7 +279,7 @@ lazy.setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
'tpope/vim-commentary',
|
--'tpope/vim-commentary',
|
||||||
|
|
||||||
-- {
|
-- {
|
||||||
-- "mrcjkb/rustaceanvim",
|
-- "mrcjkb/rustaceanvim",
|
||||||
|
@ -260,5 +328,10 @@ lazy.setup({
|
||||||
'ThePrimeagen/vim-be-good',
|
'ThePrimeagen/vim-be-good',
|
||||||
|
|
||||||
--JQ
|
--JQ
|
||||||
'jrop/jq.nvim'
|
'jrop/jq.nvim',
|
||||||
|
|
||||||
|
{
|
||||||
|
'BooleanCube/keylab.nvim',
|
||||||
|
opts = {}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -18,6 +18,9 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||||
client.server_capabilities.semanticTokensProvider = nil
|
client.server_capabilities.semanticTokensProvider = nil
|
||||||
|
|
||||||
|
--Enable inlay hints
|
||||||
|
--vim.lsp.inlay_hint.enable(ev.buf,true)
|
||||||
|
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||||
local bufopts = { noremap = true, silent = true, buffer = ev.buf }
|
local bufopts = { noremap = true, silent = true, buffer = ev.buf }
|
||||||
|
@ -35,6 +38,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
vim.keymap.set("n", "<space>ge", function() vim.diagnostic.goto_next() end, bufopts)
|
vim.keymap.set("n", "<space>ge", function() vim.diagnostic.goto_next() end, bufopts)
|
||||||
vim.keymap.set("n", "<space>gE", function() vim.diagnostic.goto_prev() end, bufopts)
|
vim.keymap.set("n", "<space>gE", function() vim.diagnostic.goto_prev() end, bufopts)
|
||||||
vim.keymap.set("n", "<space>fo", function() conform.format({ lsp_fallback = true }) end, bufopts)
|
vim.keymap.set("n", "<space>fo", function() conform.format({ lsp_fallback = true }) end, bufopts)
|
||||||
|
vim.keymap.set("n", "<space>n", "<cmd>!toke check<cr>")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -50,6 +54,26 @@ mason_lspconfig.setup_handlers({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
["gopls"] = function ()
|
||||||
|
lspconfig["gopls"].setup({
|
||||||
|
capabilities = capabilities,
|
||||||
|
settings = {
|
||||||
|
gopls = {
|
||||||
|
["ui.completion.usePlaceholders"] = true,
|
||||||
|
["ui.diagnostic.staticcheck"] = true,
|
||||||
|
["ui.inlayhint.hints"] = {
|
||||||
|
assignVariablesTypes = true,
|
||||||
|
compositeLiteralFields = true,
|
||||||
|
compositeLiteralTypes = true,
|
||||||
|
constantValues = true,
|
||||||
|
functionTypeParameters = true,
|
||||||
|
parameterNames = true,
|
||||||
|
rangeVariableTypes = true
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end,
|
||||||
["lua_ls"] = function()
|
["lua_ls"] = function()
|
||||||
lspconfig["lua_ls"].setup({
|
lspconfig["lua_ls"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
|
@ -61,6 +85,7 @@ mason_lspconfig.setup_handlers({
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
globals = { 'vim' },
|
globals = { 'vim' },
|
||||||
},
|
},
|
||||||
|
hint = { enable = true }
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -2,8 +2,8 @@ require('lualine').setup {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = 'auto',
|
theme = 'auto',
|
||||||
component_separators = { left = '', right = ''},
|
component_separators = { left = '', right = ''},
|
||||||
section_separators = { left = '', right = ''},
|
section_separators = { left = '', right = ''},
|
||||||
disabled_filetypes = {
|
disabled_filetypes = {
|
||||||
statusline = {},
|
statusline = {},
|
||||||
winbar = {},
|
winbar = {},
|
||||||
|
@ -18,11 +18,11 @@ require('lualine').setup {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = {'mode'},
|
lualine_a = {},
|
||||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
lualine_b = {},
|
||||||
lualine_c = {'filename'},
|
lualine_c = {},
|
||||||
lualine_x = {'lsp', 'fileformat', 'filetype'},
|
lualine_x = {'filetype'},
|
||||||
lualine_y = {'progress'},
|
lualine_y = {},
|
||||||
lualine_z = {'location'}
|
lualine_z = {'location'}
|
||||||
},
|
},
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
|
|
|
@ -8,6 +8,7 @@ null_ls.setup({
|
||||||
null_ls.builtins.formatting.prettierd.with({
|
null_ls.builtins.formatting.prettierd.with({
|
||||||
filetypes = { "html", "json", "css", "js", "yaml", "markdown" },
|
filetypes = { "html", "json", "css", "js", "yaml", "markdown" },
|
||||||
}),
|
}),
|
||||||
|
null_ls.builtins.diagnostics.golangci_lint,
|
||||||
},
|
},
|
||||||
on_attach = function(client,bufnr)
|
on_attach = function(client,bufnr)
|
||||||
if client.supports_method("textDocument/formatting") then
|
if client.supports_method("textDocument/formatting") then
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Hardcoded values
|
# Hardcoded values
|
||||||
set -g status-bg "#282828"
|
set -g status-bg "#1d2021"
|
||||||
set -g @unfocused-fg "#d4be98"
|
set -g @unfocused-fg "#d4be98"
|
||||||
set -g @focused-bg "#d4be98"
|
set -g @focused-bg "#d4be98"
|
||||||
set -g @focused-fg "#282828"
|
set -g @focused-fg "#1d2021"
|
||||||
# Set status bar position
|
# Set status bar position
|
||||||
set -g status-position top
|
set -g status-position top
|
||||||
|
|
||||||
|
|
|
@ -15,22 +15,10 @@ setopt HIST_VERIFY
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
export READER=mupdf
|
export READER=mupdf
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if [ "$(arch)" = "arm64" ]; then
|
|
||||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
||||||
#else
|
|
||||||
# eval "$(/usr/local/bin/brew shellenv)"
|
|
||||||
#fi
|
|
||||||
|
|
||||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
|
||||||
|
|
||||||
# bun
|
|
||||||
export BUN_INSTALL="$HOME/.bun"
|
|
||||||
export PATH="$BUN_INSTALL/bin:$PATH"
|
|
||||||
enable-fzf-tab
|
enable-fzf-tab
|
||||||
|
|
||||||
# opam configuration
|
# opam configuration
|
||||||
source $HOME/.opam/opam-init/init.zsh > /dev/null 2>&1 || true
|
source $HOME/.opam/opam-init/init.zsh > /dev/null 2>&1 || true
|
||||||
|
|
||||||
eval "$(direnv hook zsh)"
|
eval "$(direnv hook zsh)"
|
||||||
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
|
|
|
@ -71,16 +71,18 @@ case $1 in
|
||||||
alacritty_theme_name="gruvbox_dark"
|
alacritty_theme_name="gruvbox_dark"
|
||||||
zsh_theme_name="gruvbox_dark"
|
zsh_theme_name="gruvbox_dark"
|
||||||
nvim_color_scheme="gruvbox-material"
|
nvim_color_scheme="gruvbox-material"
|
||||||
background_color="#282828"
|
background_color="#1d2021"
|
||||||
tmux_bar_unfocused_fg="#d4be98"
|
tmux_bar_unfocused_fg="#d4be98"
|
||||||
tmux_bar_focused_bg="#d4be98"
|
tmux_bar_focused_bg="#d4be98"
|
||||||
tmux_bar_focused_fg="#282828"
|
tmux_bar_focused_fg="#1d2021"
|
||||||
|
|
||||||
|
|
||||||
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_better_performance = 1<CR>' || true
|
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_better_performance = 1<CR>' || true
|
||||||
echo "vim.g.gruvbox_material_better_performance = 1" > ~/.config/nvim/lua/core/theme.lua
|
echo "vim.g.gruvbox_material_better_performance = 1" > ~/.config/nvim/lua/core/theme.lua
|
||||||
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_background = "medium"<CR>' || true
|
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_background = "hard"<CR>' || true
|
||||||
echo "vim.g.gruvbox_material_background = 'medium'" >> ~/.config/nvim/lua/core/theme.lua
|
echo "vim.g.gruvbox_material_background = 'hard'" >> ~/.config/nvim/lua/core/theme.lua
|
||||||
|
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_foreground = "original"<CR>' || true
|
||||||
|
echo "vim.g.gruvbox_material_foreground = 'original'" >> ~/.config/nvim/lua/core/theme.lua
|
||||||
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.opt.background = "dark"<CR>' || true
|
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.opt.background = "dark"<CR>' || true
|
||||||
echo "vim.opt.background = 'dark'" >> ~/.config/nvim/lua/core/theme.lua
|
echo "vim.opt.background = 'dark'" >> ~/.config/nvim/lua/core/theme.lua
|
||||||
|
|
||||||
|
@ -101,6 +103,8 @@ case $1 in
|
||||||
echo "vim.g.gruvbox_material_better_performance = 1" > ~/.config/nvim/lua/core/theme.lua
|
echo "vim.g.gruvbox_material_better_performance = 1" > ~/.config/nvim/lua/core/theme.lua
|
||||||
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_background = "soft"<CR>' || true
|
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_background = "soft"<CR>' || true
|
||||||
echo "vim.g.gruvbox_material_background = 'soft'" >> ~/.config/nvim/lua/core/theme.lua
|
echo "vim.g.gruvbox_material_background = 'soft'" >> ~/.config/nvim/lua/core/theme.lua
|
||||||
|
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_foreground = "original"<CR>' || true
|
||||||
|
echo "vim.g.gruvbox_material_foreground = 'original'" >> ~/.config/nvim/lua/core/theme.lua
|
||||||
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.opt.background = "light"<CR>' || true
|
nvim --server /tmp/nvim.pipe --remote-send ':lua vim.opt.background = "light"<CR>' || true
|
||||||
echo "vim.opt.background = 'light'" >> ~/.config/nvim/lua/core/theme.lua
|
echo "vim.opt.background = 'light'" >> ~/.config/nvim/lua/core/theme.lua
|
||||||
|
|
||||||
|
|
15
.zshenv
15
.zshenv
|
@ -4,19 +4,4 @@ TRAPUSR1() {
|
||||||
exec "${SHELL}"
|
exec "${SHELL}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add paths
|
|
||||||
export PATH="$HOME/.local/share/nvim/mason/bin:$PATH"
|
|
||||||
export PATH="/Users/afonso/.local/bin:$PATH"
|
|
||||||
export PATH="/opt/homebrew/bin:$PATH"
|
|
||||||
export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
|
|
||||||
export PATH="$HOME/go/bin:$PATH"
|
|
||||||
export PATH="$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin:$PATH"
|
|
||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
|
||||||
export PATH="$HOME/.ghcup/bin:$PATH"
|
|
||||||
export DYLD_LIBRARY_PATH="/opt/homebrew/lib:$DYLD_LIBRARY_PATH"
|
|
||||||
export JAVA_HOME="/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home"
|
export JAVA_HOME="/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home"
|
||||||
export PATH="$HOME/.miniforge3/bin:$PATH"
|
|
||||||
export PATH="/opt/homebrew/opt/texlive/bin/:$PATH"
|
|
||||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
||||||
|
|
||||||
|
|
22
.zshrc
22
.zshrc
|
@ -1,5 +1,17 @@
|
||||||
# If you come from bash you might have to change your $PATH.
|
# Add paths
|
||||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
export PATH="/usr/sbin:/sbin:$PATH"
|
||||||
|
export PATH="$HOME/.local/share/nvim/mason/bin:$PATH"
|
||||||
|
export PATH="/Users/afonso/.local/bin:$PATH"
|
||||||
|
export PATH="/opt/homebrew/bin:$PATH"
|
||||||
|
export PATH="$HOME/go/bin:$PATH"
|
||||||
|
export PATH="$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin:$PATH"
|
||||||
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
|
export PATH="$HOME/.ghcup/bin:$PATH"
|
||||||
|
export PATH="$HOME/.miniforge3/bin:$PATH"
|
||||||
|
export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
|
||||||
|
|
||||||
|
export GOPATH=$HOME/.go
|
||||||
|
export PATH=$PATH:$GOPATH/bin
|
||||||
|
|
||||||
# Path to your oh-my-zsh installation.
|
# Path to your oh-my-zsh installation.
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
@ -76,6 +88,7 @@ ZSH_CUSTOM=/Users/afonso/.config/zsh
|
||||||
source $HOME/.config/zsh/themes/gruvbox_dark.zsh
|
source $HOME/.config/zsh/themes/gruvbox_dark.zsh
|
||||||
source $HOME/.config/zsh/overrides.zsh
|
source $HOME/.config/zsh/overrides.zsh
|
||||||
|
|
||||||
|
zvm_after_init_commands+=('[ -f $HOME/.fzf.zsh ] && source $HOME/.fzf.zsh')
|
||||||
plugins=(zsh-vi-mode git sudo macos tmux command-not-found web-search zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting fzf-tab)
|
plugins=(zsh-vi-mode git sudo macos tmux command-not-found web-search zsh-autosuggestions zsh-history-substring-search zsh-syntax-highlighting fzf-tab)
|
||||||
|
|
||||||
|
|
||||||
|
@ -129,11 +142,10 @@ else
|
||||||
else
|
else
|
||||||
export PATH="/Users/afonso/.miniforge3/bin:$PATH"
|
export PATH="/Users/afonso/.miniforge3/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
unset __conda_setup
|
|
||||||
|
|
||||||
if [ -f "/Users/afonso/.miniforge3/etc/profile.d/mamba.sh" ]; then
|
if [ -f "/Users/afonso/.miniforge3/etc/profile.d/mamba.sh" ]; then
|
||||||
. "/Users/afonso/.miniforge3/etc/profile.d/mamba.sh"
|
. "/Users/afonso/.miniforge3/etc/profile.d/mamba.sh"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
unset __conda_setup
|
||||||
# <<< conda initialize <<<
|
# <<< conda initialize <<<
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue