While people tend to have complex #vim and #neovim configurations I just have this tiny one, less than 100 lines :-) It has served me for years with minor adjustments…
vim.cmd("filetype plugin indent on")
vim.cmd [[packadd packer.nvim]]
local function plugins(use)
use 'wbthomason/packer.nvim'
use 'ap/vim-buftabline'
use {
'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
}
use 'Mofiqul/dracula.nvim'
use 'mmarchini/bpftrace.vim'
use 'vim-scripts/git_patch_tags.vim'
use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate'
}
use {
'VonHeikemen/lsp-zero.nvim',
branch = 'v2.x',
requires = {
{'neovim/nvim-lspconfig'},
{
'williamboman/mason.nvim',
run = function()
pcall(vim.cmd, 'MasonUpdate')
end,
},
{'williamboman/mason-lspconfig.nvim'},
{'hrsh7th/nvim-cmp'},
{'hrsh7th/cmp-nvim-lsp'},
{'L3MON4D3/LuaSnip'},
}
}
end
require('packer').startup(plugins)
vim.g.mapleader = ","
vim.opt.autoindent = true
vim.opt.backspace = "indent,eol,start"
vim.opt.backup = false
vim.opt.clipboard = "unnamedplus"
vim.opt.compatible = false
vim.opt.completeopt = "menuone,noinsert,noselect"
vim.opt.hidden = true
vim.opt.history = 2000
vim.opt.hlsearch = true
vim.opt.incsearch = true
vim.opt.listchars="tab:>-,trail:·"
vim.opt.mouse = ""
vim.opt.path:append("**")
vim.opt.ruler = true
vim.opt.shortmess:append("c")
vim.opt.showmatch = true
vim.opt.swapfile = false
vim.opt.tags = "./tags;/"
vim.opt.termguicolors = true
vim.opt.wildmenu = true
vim.opt.wrap = false
if vim.g.neovide then
vim.o.guifont = "FiraCode Nerd Font Mono:h12"
end
vim.api.nvim_create_autocmd(
{ "FocusGained", "BufEnter" },
{ pattern = "*", command = [[:checktime]],
group = vim.api.nvim_create_augroup("BufCheck", { clear = true }) }
)
local function nmap(shortcut, command)
local opts = { noremap = true, silent = true }
vim.api.nvim_set_keymap('n', shortcut, command, opts)
end
nmap("<silent>", "<C-l> :nohl<CR><C-l>")
nmap("<leader>cd", ":lcd %:p:h<CR>:pwd<CR>")
vim.cmd[[colorscheme dracula]]
require('lualine').setup {
options = {
theme = 'dracula-nvim'
}
}
#notetomyself: download and extract #riscv #toolchain:
echo elf glibc musl | xargs -n1 | xargs -I{} echo https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2022.08.25/riscv64-{}-ubuntu-20.04-nightly-2022.08.25-nightly.tar.gz | xargs curl -sSL | tar zx -i
this is sad and true unfortunately. https://lunduke.substack.com/p/microsofts-growing-control-of-linux #microsoft #linux #opensource #proprietary
Fetching a tag from #ubuntu #linux #kernel tree:
function git-fetch-linux-ubuntu-tag {
local tag=refs/tags/cod/mainline/$1
git fetch --no-tags \
git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack \
$tag:$tag
}
Usage example:
$ git checkout -b tmp
Switched to a new branch 'tmp'
$ git-fetch-linux-ubuntu-tag v6.3
From git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack
* [new tag] cod/mainline/v6.3 -> cod/mainline/v6.3
$ git merge v6.3
Building:
LANG=C fakeroot debian/rules clean
LANG=C fakeroot debian/rules binary-headers binary-generic binary-perarch
#remindertomyself: fetch a #git tag for the given #ubuntu #mainline #linux #kernel #snapshot:
$ git fetch --no-tags git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack refs/tags/cod/mainline/v6.3-rc7:refs/tags/cod/mainline/v6.3-rc7
From git://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mainline-crack
* [new tag] cod/mainline/v6.3-rc7 -> cod/mainline/v6.3-rc7
suppilovahvero in linux-tpmdd on next took 19s
$ git tag
cod/mainline/v6.3-rc7
Compilation:
LANG=C fakeroot debian/rules clean
LANG=C fakeroot debian/rules binary-headers binary-generic binary-perarch
I have now kind of current state of desktop in both #x86 and #ARM ends :-)
The 2nd is both the computer I do music with (i.e. my studio machine) and also #ARM test farm for #TPM. I compile ARM kernels with it and run them in VMWare Fusion, which provides nicely packaged #vTPM’s.
i find paying for #sublimetext and using it with #neovintageous much better option than #vscode, if I need a GUI editor e.g. in meetings. It is fast and uncluttered. If you write code normally in the #terminal with #neovim, vscode can feel a bit sticky, and also stressful because it has too much shit going on in the screen estate. Milliseconds do affect to the overall feeling just like they would when e.g. when playing with a MIDI keyboard.
And generally if it is not fully open source, I feel less worried to use an application where I pay a sum of money for the license. Because the profit is often acquired by some means anyway, it is the most transparent for me…
$ ps -T -o comm,policy,rtprio -p $(pgrep -w -d ',' irq) | egrep '(snd|hci)'
irq/148-xhci_hc FF 85
irq/147-ahci[00 FF 50
irq/203-snd_hda FF 90
irq/204-snd_hda FF 90