Compare commits

..

2 commits

Author SHA1 Message Date
ea34c67540 updated nvim config 2023-10-27 23:04:31 +02:00
b363111117 removed comments from zshrc 2023-10-27 23:04:18 +02:00
14 changed files with 94 additions and 192 deletions

View file

@ -0,0 +1,4 @@
vim.opt.tabstop = 2
vim.opt.softtabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true

View file

@ -0,0 +1 @@
vim.opt_local.shiftwidth = 2

View file

@ -0,0 +1,6 @@
vim.opt.wrap = true -- softwrap the text
vim.opt.linebreak = true -- do not break in the middle of words
vim.opt.tabstop = 3
vim.opt.softtabstop = 3
vim.opt.shiftwidth = 3
vim.opt.expandtab = true

View file

@ -1,6 +0,0 @@
function ColorMyPencils(color)
color = color or "rose-pine"
vim.cmd.colorscheme(color)
end
ColorMyPencils()

View file

@ -0,0 +1,14 @@
local lspconfig = require('lspconfig')
lspconfig.lua_ls.setup({
settings = {
Lua = {
diagnostics = {
globals = {
'vim',
'require',
},
},
},
},
})

View file

@ -0,0 +1,2 @@
vim.keymap.set('n', '<leader>nf', '<cmd>Neotree<cr>')
vim.keymap.set('n', '<leader>nb', '<cmd>Neotree source=buffers<cr>')

View file

@ -1,5 +1,4 @@
require('lennartalff.remap') require('lennartalff.remap')
require('lennartalff.set') require('lennartalff.set')
-- vim.cmd('colorscheme rose-pine')
vim.o.termguicolors = true vim.o.termguicolors = true
vim.cmd.colorscheme 'catppuccin-frappe' vim.cmd.colorscheme 'catppuccin-frappe'

View file

@ -1,65 +0,0 @@
-- packer bootstrapping
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
return require('packer').startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use 'lewis6991/gitsigns.nvim'
use {
'nvim-telescope/telescope.nvim', tag = '0.1.1',
-- or , branch = '0.1.x',
requires = { { 'nvim-lua/plenary.nvim' } }
}
use({ 'rose-pine/neovim', as = 'rose-pine' })
use {
'nvim-treesitter/nvim-treesitter',
run = function()
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
ts_update()
end,
}
use 'tpope/vim-fugitive'
use {
'VonHeikemen/lsp-zero.nvim',
branch = 'v2.x',
requires = {
-- LSP Support
{ 'neovim/nvim-lspconfig' }, -- Required
{ -- Optional
'williamboman/mason.nvim',
run = function()
pcall(vim.cmd, 'MasonUpdate')
end,
},
{ 'williamboman/mason-lspconfig.nvim' }, -- Optional
-- Autocompletion
{ 'hrsh7th/nvim-cmp' }, -- Required
{ 'hrsh7th/cmp-nvim-lsp' }, -- Required
{ 'L3MON4D3/LuaSnip' }, -- Required
{ 'mhartington/formatter.nvim' },
}
}
use {
"ThePrimeagen/refactoring.nvim",
requires = {
{ "nvim-lua/plenary.nvim" },
{ "nvim-treesitter/nvim-treesitter" }
}
}
if packer_bootstrap then
require('packer').sync()
end
end)

View file

@ -19,14 +19,6 @@ vim.opt.smartindent = true
vim.opt.wrap = false vim.opt.wrap = false
vim.api.nvim_create_autocmd("FileType", {
pattern = "cpp",
callback = function()
vim.opt_local.shiftwidth = 2
vim.opt_local.tabstop = 2
end
})
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
pattern = 'Makefile', pattern = 'Makefile',
callback = function () callback = function ()
@ -38,16 +30,3 @@ vim.opt.scrolloff = 8
vim.opt.signcolumn = 'yes' vim.opt.signcolumn = 'yes'
vim.opt.updatetime = 500 vim.opt.updatetime = 500
vim.opt.colorcolumn = '80' vim.opt.colorcolumn = '80'
vim.api.nvim_create_autocmd('FileType', {
pattern = 'rst',
callback = function()
vim.opt.wrap = true -- softwrap the text
vim.opt.linebreak = true -- do not break in the middle of words
-- rst uses 3 space indents
vim.opt.tabstop = 3
vim.opt.softtabstop = 3
vim.opt.shiftwidth = 3
vim.opt.expandtab = true
end
})

View file

@ -2,7 +2,7 @@ return {
{ 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' }, { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
{ {
'L3MON4D3/LuaSnip', 'L3MON4D3/LuaSnip',
tag = 'v2.*', version = "v2.*",
build = 'make install_jsregexp', build = 'make install_jsregexp',
}, },
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
@ -11,9 +11,15 @@ return {
dependencies = { dependencies = {
{ 'nvim-lua/plenary.nvim' } } { 'nvim-lua/plenary.nvim' } }
}, },
{ 'rose-pine/neovim', name = 'rose-pine' }, {
{ 'catppuccin/nvim', name = 'catppuccin', priority = 1000 }, 'catppuccin/nvim',
{ 'tpope/vim-fugitive', name = 'fugitive' }, name = 'catppuccin',
priority = 1000
},
{
'tpope/vim-fugitive',
name = 'fugitive'
},
{ {
'ThePrimeagen/harpoon', 'ThePrimeagen/harpoon',
dependencies = { dependencies = {
@ -37,4 +43,7 @@ return {
main = 'ibl', main = 'ibl',
opts = {}, opts = {},
}, },
{
'jiangmiao/auto-pairs',
},
} }

View file

@ -7,6 +7,13 @@
-- require('cmp_nvim_lsp').default_capabilities() -- require('cmp_nvim_lsp').default_capabilities()
--) --)
vim.api.nvim_create_autocmd('FileType', {
pattern = 'tex',
callback = function()
require('cmp').setup.buffer { sources = {{ name = 'omni' }} }
end,
})
vim.api.nvim_create_autocmd('LspAttach', { vim.api.nvim_create_autocmd('LspAttach', {
desc = 'LSP actions', desc = 'LSP actions',
callback = function(event) callback = function(event)

View file

@ -0,0 +1,18 @@
return {
{
'nvim-neo-tree/neo-tree.nvim',
branch = 'v3.x',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons',
'MunifTanjim/nui.nvim',
},
opts = {
filesystem = {
follow_current_file = {
enabled = true,
},
}
},
},
}

View file

@ -7,78 +7,14 @@ zstyle ':prompt:pure:user' color 119
zstyle ':prompt:pure:host' color 119 zstyle ':prompt:pure:host' color 119
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=13' ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=13'
prompt pure prompt pure
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$HOME/.local/bin:$PATH export PATH=$HOME/bin:/usr/local/bin:$HOME/.local/bin:$PATH
#export PATH=$HOME/.platformio/penv/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/lennartalff/.oh-my-zsh" export ZSH="/home/lennartalff/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="" ZSH_THEME=""
# Set list of themes to pick from when loading at random COMPLETION_WAITING_DOTS="true"
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work)
# See https://github.com/ohmyzsh/ohmyzsh/issues/5765
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git zsh-autosuggestions ssh-agent jump) plugins=(git zsh-autosuggestions ssh-agent jump)
# only lazyily add ssh keys # only lazyily add ssh keys
@ -103,5 +39,3 @@ alias mount-lehre='kinit -kt "$HOME/keytabs/cta1233.keytab" cta1233@KERBEROS.TU-
alias rosterm='docker exec -it ros2-vim zsh' alias rosterm='docker exec -it ros2-vim zsh'
alias git-delete-merged="git branch --merged main | grep -v '^[ *]*main$' | xargs git branch -d" alias git-delete-merged="git branch --merged main | grep -v '^[ *]*main$' | xargs git branch -d"
# export MOZ_ENABLE_WAYLAND=1
# export XDG_CURRENT_DESKTOP=sway