Added git alises, disabled some more nvim plugins and installed a C compiler

This commit is contained in:
2024-11-19 10:06:43 +02:00
parent 92010ca06c
commit 4b0452609b
6 changed files with 88 additions and 80 deletions

View File

@@ -55,7 +55,7 @@ lualine.setup({
sections = {
lualine_a = { { 'mode', icon = '' } },
lualine_b = {
require('auto-session.lib').current_session_name,
-- require('auto-session.lib').current_session_name,
{ 'branch', icon = '' },
{
'diagnostics',

View File

@@ -1,38 +1,38 @@
return {
{
'williamboman/mason.nvim',
lazy = false,
opts = {
ui = {
icons = {
package_installed = '',
package_pending = '',
package_uninstalled = '',
},
},
},
},
{
'WhoIsSethDaniel/mason-tool-installer.nvim',
lazy = false,
opts = {
ensure_installed = {
-- 'stylua', -- lua formatting
-- 'clang-format', -- C/C++ formatter
-- 'codelldb', -- C/C++ debugger
-- 'cpplint', -- C/C++ linter
-- 'black', -- python formatter
-- 'isort', -- python formatter for imports
-- 'flake8', -- python linter
-- 'gofumpt', -- go formatter
-- -- 'golangci-lint', -- go linter
-- 'prettierd', -- multi-lang formatter
-- 'prettier', -- prettierd but slower, used as a fallback
-- 'jq', -- json formatter
-- 'jsonlint', -- json linter
-- 'shellcheck', -- bash linter
-- 'beautysh', -- shell formatter
},
},
},
-- {
-- 'williamboman/mason.nvim',
-- lazy = false,
-- opts = {
-- ui = {
-- icons = {
-- package_installed = '✓',
-- package_pending = '➜',
-- package_uninstalled = '✗',
-- },
-- },
-- },
-- },
-- {
-- 'WhoIsSethDaniel/mason-tool-installer.nvim',
-- lazy = false,
-- opts = {
-- ensure_installed = {
-- -- 'stylua', -- lua formatting
-- -- 'clang-format', -- C/C++ formatter
-- -- 'codelldb', -- C/C++ debugger
-- -- 'cpplint', -- C/C++ linter
-- -- 'black', -- python formatter
-- -- 'isort', -- python formatter for imports
-- -- 'flake8', -- python linter
-- -- 'gofumpt', -- go formatter
-- -- -- 'golangci-lint', -- go linter
-- -- 'prettierd', -- multi-lang formatter
-- -- 'prettier', -- prettierd but slower, used as a fallback
-- -- 'jq', -- json formatter
-- -- 'jsonlint', -- json linter
-- -- 'shellcheck', -- bash linter
-- -- 'beautysh', -- shell formatter
-- },
-- },
-- },
}

View File

@@ -1,5 +1,5 @@
return {
'nvim-java/nvim-java',
lazy = false,
opts = {}
-- 'nvim-java/nvim-java',
-- lazy = false,
-- opts = {}
}

View File

@@ -1,41 +1,41 @@
return {
'mfussenegger/nvim-lint',
lazy = false,
config = function()
local lint = require('lint')
lint.linters_by_ft = {
c = { 'clangtidy' },
cpp = { 'clangtidy' },
go = { 'golangcilint' },
python = { 'flake8' },
json = { 'jsonlint' },
bash = { 'shellcheck' },
}
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave', 'TextChanged', 'TextChangedI' }, {
group = vim.api.nvim_create_augroup('nvim-lint', { clear = true }),
callback = function()
require('lint').try_lint()
end,
})
-- NOTE: most if not all of clangt-idy warnings are
-- also reported by clangd, so this function filters clang-tidy warnings
-- to avoid duplication of warnings
local clangtidy_parser = lint.linters.clangtidy.parser
lint.linters.clangtidy.parser = function(output, bufnr, linter_cwd)
local diagnostics = clangtidy_parser(output, bufnr, linter_cwd)
diagnostics = vim.tbl_filter(function(diagnostic)
if diagnostic.severity == vim.diagnostic.severity.WARN then
return false
end
if diagnostic.severity == vim.diagnostic.severity.ERROR then
return false
end
return true
end, diagnostics)
return diagnostics
end
end,
-- 'mfussenegger/nvim-lint',
-- lazy = false,
-- config = function()
-- local lint = require('lint')
-- lint.linters_by_ft = {
-- c = { 'clangtidy' },
-- cpp = { 'clangtidy' },
-- go = { 'golangcilint' },
-- python = { 'flake8' },
-- json = { 'jsonlint' },
-- bash = { 'shellcheck' },
-- }
--
-- vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave', 'TextChanged', 'TextChangedI' }, {
-- group = vim.api.nvim_create_augroup('nvim-lint', { clear = true }),
-- callback = function()
-- require('lint').try_lint()
-- end,
-- })
--
-- -- NOTE: most if not all of clangt-idy warnings are
-- -- also reported by clangd, so this function filters clang-tidy warnings
-- -- to avoid duplication of warnings
-- local clangtidy_parser = lint.linters.clangtidy.parser
-- lint.linters.clangtidy.parser = function(output, bufnr, linter_cwd)
-- local diagnostics = clangtidy_parser(output, bufnr, linter_cwd)
-- diagnostics = vim.tbl_filter(function(diagnostic)
-- if diagnostic.severity == vim.diagnostic.severity.WARN then
-- return false
-- end
-- if diagnostic.severity == vim.diagnostic.severity.ERROR then
-- return false
-- end
--
-- return true
-- end, diagnostics)
-- return diagnostics
-- end
-- end,
}

8
.zshrc
View File

@@ -18,7 +18,6 @@ autoload -Uz _zinit
zinit ice wait lucid && zinit light zsh-users/zsh-syntax-highlighting
zinit ice wait lucid && zinit light zsh-users/zsh-completions
zinit ice wait lucid && zinit light Aloxaf/fzf-tab
zinit ice wait lucid && zinit snippet OMZP::command-not-found
zinit ice wait lucid atload'_zsh_autosuggest_start && bindkey "^y" autosuggest-accept'
zinit light zsh-users/zsh-autosuggestions
@@ -60,7 +59,14 @@ alias ls='eza'
alias tree='eza --tree'
alias c='clear'
alias vim='nvim'
# Git Aliases
alias gs='git status'
alias gp='git push'
alias gP='git pull'
alias gl='git log --oneline --decorate'
alias gc='git commit'
alias ga='git add'
export EDITOR=nvim
export PAGER='nvim -R'

View File

@@ -34,6 +34,8 @@
bc
keychain
bat
sqlite
clang
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the