Compare commits

..

No commits in common. "ea34c6754024cd595e21b344f080ac3911612211" and "3550ff67f7d095e9968949d0832d315838f2a4d0" have entirely different histories.

14 changed files with 192 additions and 94 deletions

View file

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

View file

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

View file

@ -1,6 +0,0 @@
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

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

View file

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

View file

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

View file

@ -1,35 +1,35 @@
require('nvim-treesitter.configs').setup {
-- A list of parser names, or "all" (the five listed parsers should always be installed)
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "cpp", "python", "yaml" },
-- A list of parser names, or "all" (the five listed parsers should always be installed)
ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "cpp", "python", "yaml" },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = true,
-- List of parsers to ignore installing (for "all")
ignore_install = { "javascript" },
-- List of parsers to ignore installing (for "all")
ignore_install = { "javascript" },
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
-- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
highlight = {
enable = true,
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
highlight = {
enable = true,
-- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files
disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
}

View file

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

View file

@ -0,0 +1,65 @@
-- 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,6 +19,14 @@ vim.opt.smartindent = true
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', {
pattern = 'Makefile',
callback = function ()
@ -30,3 +38,16 @@ vim.opt.scrolloff = 8
vim.opt.signcolumn = 'yes'
vim.opt.updatetime = 500
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' },
{
'L3MON4D3/LuaSnip',
version = "v2.*",
tag = 'v2.*',
build = 'make install_jsregexp',
},
'lewis6991/gitsigns.nvim',
@ -11,15 +11,9 @@ return {
dependencies = {
{ 'nvim-lua/plenary.nvim' } }
},
{
'catppuccin/nvim',
name = 'catppuccin',
priority = 1000
},
{
'tpope/vim-fugitive',
name = 'fugitive'
},
{ 'rose-pine/neovim', name = 'rose-pine' },
{ 'catppuccin/nvim', name = 'catppuccin', priority = 1000 },
{ 'tpope/vim-fugitive', name = 'fugitive' },
{
'ThePrimeagen/harpoon',
dependencies = {
@ -43,7 +37,4 @@ return {
main = 'ibl',
opts = {},
},
{
'jiangmiao/auto-pairs',
},
}

View file

@ -7,13 +7,6 @@
-- 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', {
desc = 'LSP actions',
callback = function(event)

View file

@ -1,18 +0,0 @@
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,14 +7,78 @@ zstyle ':prompt:pure:user' color 119
zstyle ':prompt:pure:host' color 119
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=13'
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/.platformio/penv/bin:$PATH
# Path to your oh-my-zsh installation.
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=""
COMPLETION_WAITING_DOTS="true"
# Set list of themes to pick from when loading at random
# 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)
# only lazyily add ssh keys
@ -39,3 +103,5 @@ alias mount-lehre='kinit -kt "$HOME/keytabs/cta1233.keytab" cta1233@KERBEROS.TU-
alias rosterm='docker exec -it ros2-vim zsh'
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