Compare commits

...

4 Commits

Author SHA1 Message Date
e22c19be74
nvim: typst, nushell lsps added properly
tore out outdated configs
2024-08-05 19:17:00 -04:00
38edb7c62a
zathura: fix zathsec 2024-08-05 18:44:09 -04:00
ac829aa714
nvim: fix treesitter error 2024-08-05 18:43:39 -04:00
c58fa424ac
nvim: update coding config
- treesitter upgrade
- defer pyright hints to ruff
2024-08-05 18:22:59 -04:00
10 changed files with 39 additions and 54 deletions

6
.gitmodules vendored
View File

@ -71,12 +71,6 @@
path = src/.local/share/nvim/site/pack/3pp/start/vim-ledger
url = https://github.com/ledger/vim-ledger.git
# document typesetting
# ftplugin/typst.vim
[submodule "src/.local/share/nvim/site/pack/3pp/start/typst.vim"]
path = src/.local/share/nvim/site/pack/3pp/start/typst.vim
url = https://github.com/kaarmu/typst.vim.git
# color theme
# init.lua
[submodule "src/.local/share/nvim/site/pack/3pp/start/nvim-noirbuddy"]

View File

@ -61,6 +61,7 @@ nftables
sdcv
ufw
rofi
rink
progress
speedtest-cli
obs-studio
@ -145,6 +146,7 @@ arc-gtk-theme
lxappearance-gtk3
radare2
typst
typst-lsp
neovide
# .local/bin/pyinstantref script

View File

@ -17,7 +17,7 @@ abbr -a -- ds swal;
# zathura
alias thur='zathura'
# stricter sandbox zathura
alias zathsec='/usr/bin/zathura -c ~/.config/zathura-sec'
alias zathsec='/usr/bin/zathura-sandbox -c ~/.config/zathura-sec'
# tmux with 256-color and UTF-8
function tmx; tmux -u -2 $argv; end

View File

@ -23,16 +23,6 @@ function GitRoot()
return fnamemodify(finddir('.git', ";"), ":h")
endfunc
" compile typst doc on write
function TypstWatch()
vsp
vertical resize 20
exec 'terminal ' .. 'typst watch --root ' .. GitRoot() .. " " .. expand("%:")
exec "norm \<c-w>h"
endfunc
nnoremap <silent><leader>fc :call TypstWatch()<cr>
nnoremap <silent><leader>fr :silent exec "!zathura --fork " . expand("%:p:r") . ".pdf &"<cr>
let g:AutoPairs = {'(':')', '[':']', '{':'}',"'":"'",'"':'"', '$':'$', "```" : "```", "`": "`"}

View File

@ -82,12 +82,6 @@ nnoremap <silent> ZF :qa<cr>
" see .config/nvim/lua/init.lua
lua require('init')
" Code folding
set foldmethod=expr
set foldexpr=nvim_treesitter#foldexpr()
" unfold by default
set foldlevel=99
" auto-pairs
packadd auto-pairs
let g:AutoPairsFlyMode = 0

View File

@ -42,7 +42,21 @@ vim.cmd.packadd("vim-gitgutter")
vim.cmd.packadd("nvim-treesitter")
require 'nvim-treesitter.configs'.setup {
ensure_installed = { "c", "cpp", "javascript", "typescript", "python", "vim", "fish", "bash", "lua", "rust" },
ensure_installed = {
"c",
"cpp",
"javascript",
"typescript",
"python",
"vim",
"fish",
"bash",
"lua",
"rust",
"query",
"typst",
"toml",
},
sync_install = false,
auto_install = false,
highlight = {
@ -58,6 +72,11 @@ require 'nvim-treesitter.configs'.setup {
},
}
-- code folding
vim.wo.foldmethod = 'expr'
vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
vim.wo.foldlevel = 99 -- unfold by default
------
-- treesitter (language intelligent) motions
------
@ -148,6 +167,12 @@ end
-- find ruff config file path
local ruff_config = vim.fs.root(0, { ".git", "pyproject.toml" }) or ""
vim.cmd.packadd("cmp-nvim-lsp")
local cmp_nvim_lsp = require('cmp_nvim_lsp')
local pyright_cap = cmp_nvim_lsp.default_capabilities()
-- disable hint level diagnostics in pyright (defer to ruff)
pyright_cap.textDocument.publishDiagnostics = { tagSupport = { valueSet = { 2 } } }
-- table declares LSPs to be set up
-- as well as settings per server (overrides defaults)
local servers = {
@ -157,7 +182,8 @@ local servers = {
-- defer to ruff
disableOrganizeImports = true,
},
}
},
capabilities = pyright_cap,
},
ruff = {
settings = {
@ -213,6 +239,12 @@ local servers = {
},
},
},
typst_lsp = {
settings = {
exportPdf = "onSave" -- alternatively onType / never
}
},
nushell = {},
}
for lsp, sv_settings in pairs(servers) do
-- defaults
@ -231,7 +263,6 @@ end
-- completions
------
vim.cmd.packadd("nvim-cmp")
vim.cmd.packadd("cmp-nvim-lsp")
local cmp = require('cmp')
cmp.setup({

View File

@ -1,25 +0,0 @@
# zathura profile for opening foreign files
set sandbox strict
# make things fit better
set scroll-page-aware true
set adjust-open width
set font "IBM Plex Sans 12"
set recolor-darkcolor "#ffffff"
set recolor-lightcolor rgba(0,0,0,0)
set recolor false
set recolor-keephue true
set recolor-reverse-video true
set default-bg "#000000ff"
set index-bg "#000000"
set index-active-bg "#111111"
set index-active-fg "#FFFFFF"
set inputbar-bg rgba(0,0,0,0.5)
set inputbar-fg "#CCCCCC"
set statusbar-bg rgba(0,0,0,0.5)
set selection-clipboard clipboard

@ -1 +1 @@
Subproject commit aa02427dfeaead86fae038024ae7b29299f08b8c
Subproject commit 1aad04ecde5ebf8f2b3eea5c6f39d38b251757f5

@ -1 +1 @@
Subproject commit 3557e41418b4a6c5b85d5d64abe94c9c50fa9b14
Subproject commit 33a17515b79ddb10d750320fa994098bdc3e93ef

@ -1 +0,0 @@
Subproject commit d9a7650e76c85f8ba437e056d08dd43b01b8bfd6