Вс 15 июн 2025 16:32:01 MSK
This commit is contained in:
parent
97af93b2a8
commit
9968e699d2
11 changed files with 150 additions and 105 deletions
|
@ -1,54 +0,0 @@
|
|||
let SessionLoad = 1
|
||||
let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1
|
||||
let v:this_session=expand("<sfile>:p")
|
||||
silent only
|
||||
silent tabonly
|
||||
cd ~/projects/dotfiles/nvim
|
||||
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
|
||||
let s:wipebuf = bufnr('%')
|
||||
endif
|
||||
let s:shortmess_save = &shortmess
|
||||
if &shortmess =~ 'A'
|
||||
set shortmess=aoOA
|
||||
else
|
||||
set shortmess=aoO
|
||||
endif
|
||||
badd +6 init.lua
|
||||
badd +25 lua/plugins/theme.lua
|
||||
badd +1 lua/plugins/tree.lua
|
||||
argglobal
|
||||
%argdel
|
||||
edit lua/plugins/tree.lua
|
||||
argglobal
|
||||
balt lua/plugins/theme.lua
|
||||
setlocal fdm=expr
|
||||
setlocal fde=nvim_treesitter#foldexpr()
|
||||
setlocal fmr={{{,}}}
|
||||
setlocal fdi=#
|
||||
setlocal fdl=6
|
||||
setlocal fml=1
|
||||
setlocal fdn=20
|
||||
setlocal fen
|
||||
let s:l = 1 - ((0 * winheight(0) + 22) / 44)
|
||||
if s:l < 1 | let s:l = 1 | endif
|
||||
keepjumps exe s:l
|
||||
normal! zt
|
||||
keepjumps 1
|
||||
normal! 0
|
||||
tabnext 1
|
||||
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
|
||||
silent exe 'bwipe ' . s:wipebuf
|
||||
endif
|
||||
unlet! s:wipebuf
|
||||
set winheight=1 winwidth=20
|
||||
let &shortmess = s:shortmess_save
|
||||
let s:sx = expand("<sfile>:p:r")."x.vim"
|
||||
if filereadable(s:sx)
|
||||
exe "source " . fnameescape(s:sx)
|
||||
endif
|
||||
let &g:so = s:so_save | let &g:siso = s:siso_save
|
||||
set hlsearch
|
||||
nohlsearch
|
||||
doautoall SessionLoadPost
|
||||
unlet SessionLoad
|
||||
" vim: set ft=vim :
|
|
@ -3,7 +3,7 @@
|
|||
"auto-save.nvim": { "branch": "main", "commit": "37c82fd548e3f5ffc2d9d020a65dac1044584f44" },
|
||||
"blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" },
|
||||
"codecompanion.nvim": { "branch": "main", "commit": "9edf22cb71711cd7fab7671a25ed5424011a379d" },
|
||||
"conform.nvim": { "branch": "master", "commit": "0e93e0d12d2f7ebdea9e3e444dfaff0050cefbe6" },
|
||||
"conform.nvim": { "branch": "master", "commit": "8132ec733eed3bf415b97b76797ca41b59f51d7d" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"go.nvim": { "branch": "master", "commit": "a3455f48cff718a86275115523dcc735535a13aa" },
|
||||
"goerr-nvim": { "branch": "main", "commit": "d30ba1cab652e78dbf6a644eb4823be57e9af203" },
|
||||
|
@ -12,24 +12,25 @@
|
|||
"headlines.nvim": { "branch": "master", "commit": "bf17c96a836ea27c0a7a2650ba385a7783ed322e" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "a4e3c15dfdce8783c074539b1835edae75fa63d5" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "d50e40b3bf9324128e71b0b7e589765ce89466d2" },
|
||||
"lspsaga.nvim": { "branch": "main", "commit": "920b1253e1a26732e53fac78412f6da7f674671d" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
|
||||
"nightfly": { "branch": "master", "commit": "8c55003e89f321a48a8cd4bb426dd3e7c58f0646" },
|
||||
"nvim-dap": { "branch": "master", "commit": "ea82027c3447dc1a022be9a9884de276c05cd33a" },
|
||||
"nvim-dap": { "branch": "master", "commit": "40a8189b8a57664a1850b0823fdcb3ac95b9f635" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "036885e8e5456d3907626b634693234f628afef6" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "7ad4a11cc5742774877c529fcfb2702f7caf75e4" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "1c733e8c1957dc67f47580fe9c458a13b5612d5b" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "6b5b36659688767fb9f133bb83024ab1466fe5cd" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "464a443b5a6657f39772b20baa95d02ffe97b268" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "0f051e9813a36481f48ca1f833897210dbcfffde" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "1a1a7c5d6d75cb49bf64049dafab15ebe294a79f" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "89ebe73cd2836db80a22d9748999ace0241917a5" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||
"smartcolumn.nvim": { "branch": "main", "commit": "92f3773af80d674f1eb61e112dca79e2fa449fd1" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||
"todotxt.nvim": { "branch": "main", "commit": "225ac77fea10a9ad9a48d0247a8d3c23f33cb2ba" }
|
||||
"todotxt.nvim": { "branch": "main", "commit": "225ac77fea10a9ad9a48d0247a8d3c23f33cb2ba" },
|
||||
"zk-nvim": { "branch": "main", "commit": "8fdd7032633045ece559273370fc0ec75ee8ffce" }
|
||||
}
|
||||
|
|
|
@ -85,12 +85,6 @@ vim.api.nvim_create_autocmd("BufEnter", {
|
|||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufAdd", "BufNew", "BufNewFile", "BufWinEnter" }, {
|
||||
group = vim.api.nvim_create_augroup("TS_FOLD_WORKAROUND", {}),
|
||||
callback = function()
|
||||
-- vim.cmd([[normal zR]])
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "*",
|
||||
callback = function(args)
|
||||
|
@ -129,6 +123,7 @@ vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
|||
require("nvim-tree.api").tree.open()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "go",
|
||||
callback = function()
|
||||
|
@ -140,17 +135,12 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||
vim.opt_local.cindent = false
|
||||
end,
|
||||
})
|
||||
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
hjson = "hjson",
|
||||
},
|
||||
})
|
||||
vim.api.nvim_create_autocmd("VimResized", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
vim.opt.scrolloff = vim.fn.floor(vim.fn.winheight(0) / 2)
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("InsertEnter", {
|
||||
pattern = "*",
|
||||
|
|
|
@ -29,15 +29,11 @@ local options = {
|
|||
numberwidth = 4,
|
||||
signcolumn = "yes",
|
||||
wrap = true,
|
||||
scrolloff = 8,
|
||||
sidescrolloff = 8,
|
||||
syntax = "on",
|
||||
foldmethod = "expr",
|
||||
foldexpr = "v:lua.vim.treesitter.foldexpr()",
|
||||
-- foldexpr = "nvim_treesitter#foldexpr()"
|
||||
foldnestmax = 10,
|
||||
foldlevel = 9,
|
||||
-- foldlevelstart = 99,
|
||||
scrolloff = 999,
|
||||
so = vim.fn.floor(vim.fn.winheight(0) / 2),
|
||||
guicursor = "n-v-c:block,i-ci-ve:hor10,r-cr:hor20,o:hor50,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175",
|
||||
|
|
|
@ -27,6 +27,7 @@ require("lazy").setup({
|
|||
require("plugins.lualine"),
|
||||
require("plugins.telescope"),
|
||||
require("plugins.columns"),
|
||||
require("plugins.zk"),
|
||||
}, {
|
||||
performance = {
|
||||
rtp = {
|
||||
|
|
26
config/nvim/lua/plugins/zk.lua
Normal file
26
config/nvim/lua/plugins/zk.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
return {
|
||||
"zk-org/zk-nvim",
|
||||
version = "v0.3.0",
|
||||
config = function()
|
||||
require("zk").setup({
|
||||
picker = "telescope",
|
||||
|
||||
lsp = {
|
||||
-- `config` is passed to `vim.lsp.start(config)`
|
||||
config = {
|
||||
name = "zk",
|
||||
cmd = { "zk", "lsp" },
|
||||
filetypes = { "markdown" },
|
||||
-- on_attach = ...
|
||||
-- etc, see `:h vim.lsp.start()`
|
||||
},
|
||||
|
||||
-- automatically attach buffers in a zk notebook that match the given filetypes
|
||||
auto_attach = {
|
||||
enabled = true,
|
||||
filetypes = { "markdown" }, -- moved to lsp.config above
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue