test
This commit is contained in:
parent
ee4015a153
commit
0703deacce
3 changed files with 19 additions and 32 deletions
|
|
@ -184,6 +184,9 @@ return {
|
|||
before = function()
|
||||
vim.g.cp = {
|
||||
debug = false,
|
||||
templates = {
|
||||
cursor_marker = '<++>',
|
||||
},
|
||||
languages = {
|
||||
cpp = {
|
||||
extension = 'cc',
|
||||
|
|
@ -275,18 +278,6 @@ return {
|
|||
vim.opt_local.foldtext = ''
|
||||
vim.diagnostic.enable(false)
|
||||
|
||||
local buf = vim.api.nvim_get_current_buf()
|
||||
local lines = vim.api.nvim_buf_get_lines(buf, 0, -1, false)
|
||||
for lnum, line in ipairs(lines) do
|
||||
local col = line:find('<++>', 1, true)
|
||||
if col then
|
||||
local new_line = line:sub(1, col - 1) .. line:sub(col + 4)
|
||||
vim.api.nvim_buf_set_lines(buf, lnum - 1, lnum, false, { new_line })
|
||||
vim.api.nvim_win_set_cursor(0, { lnum, col - 1 })
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
local clang_format_path = vim.fn.getcwd() .. '/.clang-format'
|
||||
if vim.fn.filereadable(clang_format_path) == 0 then
|
||||
vim.fn.writefile(
|
||||
|
|
@ -306,15 +297,10 @@ return {
|
|||
'barrettruth/preview.nvim',
|
||||
ft = { 'typst', 'tex', 'markdown' },
|
||||
after = function()
|
||||
local presets = require('preview.presets')
|
||||
require('preview').setup({
|
||||
'github',
|
||||
typst = vim.tbl_deep_extend('force', presets.typst, {
|
||||
open = { 'sioyek', '--new-instance' },
|
||||
}),
|
||||
tex = vim.tbl_deep_extend('force', presets.latex, {
|
||||
open = { 'sioyek', '--new-instance' },
|
||||
}),
|
||||
github = true,
|
||||
typst = { open = { 'sioyek', '--new-instance' } },
|
||||
latex = { open = { 'sioyek', '--new-instance' } },
|
||||
})
|
||||
end,
|
||||
keys = { { '<leader>p', '<cmd>Preview toggle<cr>' } },
|
||||
|
|
|
|||
24
flake.lock
generated
24
flake.lock
generated
|
|
@ -87,11 +87,11 @@
|
|||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772409903,
|
||||
"narHash": "sha256-yue9XaZ7WHOFJmm3DMEmrF536pHwGxTxh/xr0f1MzNU=",
|
||||
"lastModified": 1772496284,
|
||||
"narHash": "sha256-pDGgYqXFU5cY1Jn11R7N/Q6DFazg6CQq8KDlqvyl/XE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"rev": "28962d176db883e4fda4b808e220051f376969da",
|
||||
"rev": "fc9e6626baffb5b577810269713aedc37e95ef60",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -103,11 +103,11 @@
|
|||
"neovim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1772353308,
|
||||
"narHash": "sha256-k/3msPgpWW9CRFIp3nz6hJzV+GArXw4m35c0t6fKJK4=",
|
||||
"lastModified": 1772473891,
|
||||
"narHash": "sha256-E/0dAqFsUm4DggmHBl8rfI67yK227RXpzbEkZ7729bM=",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"rev": "563f9ef7994a35686419b4524cd772c97960dac1",
|
||||
"rev": "a8361c3afc5b9281814e9f16a9d4291e095b38fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -149,11 +149,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1772173633,
|
||||
"narHash": "sha256-MOH58F4AIbCkh6qlQcwMycyk5SWvsqnS/TCfnqDlpj4=",
|
||||
"lastModified": 1772419343,
|
||||
"narHash": "sha256-QU3Cd5DJH7dHyMnGEFfPcZDaCAsJQ6tUD+JuUsYqnKU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c0f3d81a7ddbc2b1332be0d8481a672b4f6004d6",
|
||||
"rev": "93178f6a00c22fcdee1c6f5f9ab92f2072072ea9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -165,11 +165,11 @@
|
|||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1772419343,
|
||||
"narHash": "sha256-QU3Cd5DJH7dHyMnGEFfPcZDaCAsJQ6tUD+JuUsYqnKU=",
|
||||
"lastModified": 1772449432,
|
||||
"narHash": "sha256-U8t09j2ZDGn5p6E1Ubsdx3MM+CG84DdjoAT1diYBEPk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "93178f6a00c22fcdee1c6f5f9ab92f2072072ea9",
|
||||
"rev": "dc7513872406b53d2ff417a003895d6daffdff2f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -234,6 +234,7 @@ in
|
|||
format = " {:%a %d/%m/%Y %H:%M:%S}";
|
||||
interval = 1;
|
||||
tooltip = false;
|
||||
on-click-right = "notify-send test 'right click'";
|
||||
};
|
||||
|
||||
"custom/power" = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue