Browse Source

update

master
Tovi 9 months ago
parent
commit
4a15ae70e1
13 changed files with 71 additions and 76 deletions
  1. +32
    -28
      .config/nvim/lazy-lock.json
  2. +0
    -40
      .config/nvim/lua/tovi/core/remaps.lua
  3. +2
    -1
      .config/nvim/lua/tovi/plugins/laravel.lua
  4. +3
    -0
      .config/nvim/lua/tovi/plugins/lazygit.lua
  5. +3
    -3
      .config/nvim/lua/tovi/plugins/linting.lua
  6. +3
    -3
      .config/nvim/lua/tovi/plugins/lsp/mason.lua
  7. +1
    -0
      .config/nvim/lua/tovi/plugins/neotest.lua
  8. +1
    -1
      .config/nvim/lua/tovi/plugins/nvim-cmp.lua
  9. +11
    -0
      .config/nvim/lua/tovi/plugins/retrospect.lua
  10. +7
    -0
      .config/nvim/lua/tovi/plugins/scissors.lua
  11. +6
    -0
      .config/nvim/lua/tovi/plugins/telescope.lua
  12. +1
    -0
      .config/nvim/snippets/package.json
  13. +1
    -0
      .config/nvim/snippets/vue.json

+ 32
- 28
.config/nvim/lazy-lock.json View File

@ -2,53 +2,57 @@
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"LuaSnip": { "branch": "master", "commit": "2dbef19461198630b3d7c39f414d09fb07d1fdd2" },
"cloak.nvim": { "branch": "main", "commit": "951b163e55ce7639eb320c450bde9283c4fe968b" },
"cloak.nvim": { "branch": "main", "commit": "9abe4e986e924fc54a972c1b0ff52b65a0622624" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "3d59cbd01a4b74124c5a6fb23b8cc63e5c2db3d5" },
"copilot.vim": { "branch": "release", "commit": "a8142d44602f1b3f7b5c03c52b55f8f5d3453bf0" },
"dressing.nvim": { "branch": "master", "commit": "42d767b04c50a6966c9633e3968bc65c0c2f2bfc" },
"friendly-snippets": { "branch": "main", "commit": "69a2c1675b66e002799f5eef803b87a12f593049" },
"conform.nvim": { "branch": "master", "commit": "c0e0e80f0c233cb3a249f719a44324c660163a3f" },
"copilot.vim": { "branch": "release", "commit": "315c6d2b16e018cb8020f20aaa7081ebc4070828" },
"dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" },
"friendly-snippets": { "branch": "main", "commit": "b8fae73a479ae0a1c54f5c98fa687ae8a0addc53" },
"fugitive-gitlab.vim": { "branch": "master", "commit": "55fed481c0309b3405dd3d72921d687bf36873a8" },
"gitsigns.nvim": { "branch": "main", "commit": "300a306da9973e81c2c06460f71fd7a079df1f36" },
"go.nvim": { "branch": "master", "commit": "24d2fa373d55d9900cd4b502a88214dc17e6fab6" },
"gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
"go.nvim": { "branch": "master", "commit": "b111775c494105045803f65c66029012ffeb4d9a" },
"guihua.lua": { "branch": "master", "commit": "9fb6795474918b492d9ab01b1ebaf85e8bf6fe0b" },
"harpoon": { "branch": "harpoon2", "commit": "2cd4e03372f7ee5692c8caa220f479ea07970f17" },
"laravel.nvim": { "branch": "main", "commit": "a4d6f85f2be05aca0b4dd1feb8f28cb8b4e68420" },
"harpoon": { "branch": "harpoon2", "commit": "a38be6e0dd4c6db66997deab71fc4453ace97f9c" },
"laravel.nvim": { "branch": "feature/discovery-check-improvements", "commit": "139a273fec5bb9b9a1c651f523deb3c03e2911c9" },
"lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" },
"lazygit.nvim": { "branch": "main", "commit": "1e08e3f5ac1152339690140e61a4a32b3bdc7de5" },
"leap.nvim": { "branch": "main", "commit": "9f7cf0a87ca2c3f47df37ef6787d34a65604d248" },
"leap.nvim": { "branch": "main", "commit": "46e9b1a1d7438ac72794b0857b20cad4390b827c" },
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
"lualine.nvim": { "branch": "master", "commit": "566b7036f717f3d676362742630518a47f132fff" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "3ba1b92b771f33256b4969d696b82c8ae7075364" },
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "0954d7730e749d606ddf8d7ae8846848be435d53" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "bf0f4f8062d3acbe0afcc61db01a4d19d96310e4" },
"mason.nvim": { "branch": "main", "commit": "9c9416817c9f4e6f333c749327a1ed5355cfab61" },
"mini.notify": { "branch": "main", "commit": "f430f84e24557f55906c348c9f558665893f9d8c" },
"mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
"mini.notify": { "branch": "main", "commit": "e89abd49f80a31318a26267b3d9c85a3b514f731" },
"minintro.nvim": { "branch": "master", "commit": "b7fa58cc549e8d2b362a217a7620d9aedc47d47e" },
"neotest": { "branch": "master", "commit": "dcdb40ea48f9c7b67a5576f6bb2e5f63ec15f2c0" },
"neotest-go": { "branch": "main", "commit": "d29d20d912aca81a07c50022d880cc66f0d26542" },
"neoi18n": { "branch": "master", "commit": "87c645dadb195a65d6ee5a5e3513f259f4fb436b" },
"neotest": { "branch": "master", "commit": "89a5b1fc22ee5d459262955fe564c3d14e35fd67" },
"neotest-go": { "branch": "main", "commit": "17579611af5d47bea5ff4d77e6493a6d647d3a15" },
"neotest-phpunit": { "branch": "main", "commit": "e2dfa3280d2a33495a3f710bc364d2cfd1f40c83" },
"nightfly": { "branch": "master", "commit": "829d1ff3ab0afb28d889a239c4fc17861b25cce6" },
"nightfly": { "branch": "master", "commit": "56fe47bd16272d9644fd9946a2596fa2c3905c35" },
"nui.nvim": { "branch": "main", "commit": "35da9ca1de0fc4dda96c2e214d93d363c145f418" },
"nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" },
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-lint": { "branch": "master", "commit": "2cf9ad095130755d7d87f1730bcf33c91ee822e4" },
"nvim-lsp-file-operations": { "branch": "master", "commit": "4c67b566ef8bb513692c1f26637ff3356ab02f43" },
"nvim-lspconfig": { "branch": "master", "commit": "8917d2c830e04bf944a699b8c41f097621283828" },
"nvim-treesitter": { "branch": "master", "commit": "a938e98cb4c0b715799ad2b964f6fa39fc315020" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "19a91a38b02c1c28c14e0ba468d20ae1423c39b2" },
"nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" },
"nvim-web-devicons": { "branch": "master", "commit": "b427ac5f9dff494f839e81441fb3f04a58cbcfbc" },
"nvim-lint": { "branch": "master", "commit": "966ab3dc37eee3e413692264b44a3011b05a6060" },
"nvim-lsp-file-operations": { "branch": "master", "commit": "223aca86b737dc66e9c51ebcda8788a8d9cc6cf2" },
"nvim-lspconfig": { "branch": "master", "commit": "f12f1b9e877b1e6e2ef7eae1a524d8253af4243d" },
"nvim-scissors": { "branch": "main", "commit": "8e892591583f775f272d826295f959867ae0aa6c" },
"nvim-treesitter": { "branch": "master", "commit": "76700e147bfab7630e6b97f91b32397175e8153f" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "dd0b2036c3a27cb6e6486f8bd24188c6ca43af0b" },
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
"nvim-web-devicons": { "branch": "master", "commit": "313d9e7193354c5de7cdb1724f9e2d3f442780b0" },
"oil.nvim": { "branch": "master", "commit": "bf753c3e3f8736939ad5597f92329dfe7b1df4f5" },
"plenary.nvim": { "branch": "master", "commit": "663246936325062427597964d81d30eaa42ab1e4" },
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
"retrospect.nvim": { "branch": "main", "commit": "1efdc6639c5ec556542c4d436e8e3c3ec13243f7" },
"tdo.nvim": { "branch": "main", "commit": "aa13bc99a5302bb174cc4f207f72a8ab38a47f79" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope-undo.nvim": { "branch": "main", "commit": "d3afc1c105535a90caec092ce27a113f77ba7b84" },
"telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"undotree": { "branch": "master", "commit": "d9c8b4ef872e078e8c4080812e5a3ed56d151c00" },
"undotree": { "branch": "master", "commit": "7df3be7a261ea31b528aa442b494fcb458f3d968" },
"vim-dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" },
"vim-fugitive": { "branch": "master", "commit": "854a8df0d06b8d3fcb30fa7f2b08c62b553eee3b" },
"vim-fugitive": { "branch": "master", "commit": "fab00f7c0f3a08e860e39c7adeb8fbe849921a98" },
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }
}

+ 0
- 40
.config/nvim/lua/tovi/core/remaps.lua View File

@ -18,17 +18,6 @@ vim.keymap.set("n", "<A-l>", "<C-w>l", { desc = "Move focus to split right" })
-- Copy the entire file
vim.keymap.set("n", "<leader>y", "ggyG<C-o>", { desc = "Copy the entire file to default register" })
-- Manage sessions
vim.keymap.set("n", "<F5>", function()
vim.cmd("mksession! ~/.cache//nvim/session/manual_session.vim")
end, { desc = "Manually create session" })
vim.keymap.set("n", "<F6>", function()
vim.cmd("source ~/.cache/nvim/session/manual_session.vim")
end, { desc = "Restore manually created session" })
vim.keymap.set("n", "<F7>", function()
vim.cmd("source ~/.cache/nvim/session/shutdown_session.vim")
end, { desc = "Restore session automatically created on VimLeave" })
-- Spell-check
vim.keymap.set("n", "<leader>o", "<cmd>setlocal spell! spelllang=en_au<CR>", { desc = "Toggle spell check" })
@ -75,32 +64,3 @@ vim.keymap.set(
[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
{ desc = "Search and replace for word under cursor" }
)
local group = vim.api.nvim_create_augroup("latex_group", { clear = true })
vim.api.nvim_create_autocmd("FileType", {
callback = function()
vim.keymap.set("n", "<leader>pl", function ()
local Job = require "plenary.job"
local stderr = {}
local stdout, ret = Job:new({
command = "pdflatex",
args = { vim.fn.expand('%') },
on_stderr = function(_, data)
table.insert(stderr, data)
end,
}):sync()
if ret == 0 then
vim.notify("Successfully compiled latex document", vim.log.levels.INFO)
return
end
vim.notify(table.concat(stderr, "\n"), vim.log.levels.ERROR)
end,
{}
)
end ,
pattern = { "latex", "tex" },
group = group,
})

+ 2
- 1
.config/nvim/lua/tovi/plugins/laravel.lua View File

@ -1,5 +1,7 @@
return {
"tovijaeschke/laravel.nvim",
-- enabled = false,
branch = "feature/discovery-check-improvements",
dependencies = {
"nvim-telescope/telescope.nvim",
"tpope/vim-dotenv",
@ -57,7 +59,6 @@ return {
default = "fpm",
},
exec = { "docker", "compose", "exec", "-it" },
run = { "docker", "compose", "run" },
},
},
},


+ 3
- 0
.config/nvim/lua/tovi/plugins/lazygit.lua View File

@ -4,4 +4,7 @@ return {
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
vim.keymap.set("n", "<leader>gg", "<cmd>LazyGit<cr>", { noremap = true, silent = true })
end,
}

+ 3
- 3
.config/nvim/lua/tovi/plugins/linting.lua View File

@ -9,9 +9,9 @@ return {
}
lint.linters_by_ft = {
javascript = { "eslint_d" },
typescript = { "eslint_d" },
vue = { "eslint_d" },
javascript = { "eslint" },
typescript = { "eslint" },
vue = { "eslint" },
json = { "jsonlint" },
markdown = { "markdownlint" },
php = { "phpcs" },


+ 3
- 3
.config/nvim/lua/tovi/plugins/lsp/mason.lua View File

@ -34,9 +34,9 @@ return {
"svelte",
"lua_ls",
"emmet_ls",
"pyright",
-- "pyright",
"intelephense",
"gopls",
-- "gopls",
},
automatic_installation = true,
})
@ -51,7 +51,7 @@ return {
"phpcs",
-- "gospel",
"golangci-lint",
"pylint",
-- "pylint",
"hadolint",
"gofumpt",
"goimports",


+ 1
- 0
.config/nvim/lua/tovi/plugins/neotest.lua View File

@ -42,6 +42,7 @@ return {
require("neotest-phpunit")({
root_files = { "phpunit.xml", "composer.json" },
phpunit_cmd = { "docker", "compose", "exec", "fpm", "./vendor/bin/phpunit" },
-- phpunit_cmd = { "docker", "compose", "exec", "app-fpm", "./vendor/bin/phpunit" },
filter_dirs = { "vendor" },
mapped_docker_dir = "/var/www",
append_to_cwd = "/api",


+ 1
- 1
.config/nvim/lua/tovi/plugins/nvim-cmp.lua View File

@ -17,7 +17,7 @@ return {
local lspkind = require("lspkind")
-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_vscode").lazy_load({ paths = { "~/.config/nvim/snippets" } })
local has_words_before = function()
local line, col = unpack(vim.api.nvim_win_get_cursor(0))


+ 11
- 0
.config/nvim/lua/tovi/plugins/retrospect.lua View File

@ -0,0 +1,11 @@
return {
"mrquantumcodes/retrospect.nvim",
config = function ()
local retrospect = require('retrospect')
retrospect.setup({
saveKey = "<leader>\\",
loadKey = "<leader><BS>",
style = "default",
})
end
}

+ 7
- 0
.config/nvim/lua/tovi/plugins/scissors.lua View File

@ -0,0 +1,7 @@
return {
"chrisgrieser/nvim-scissors",
dependencies = "nvim-telescope/telescope.nvim", -- optional
opts = {
snippetDir = "~/.config/nvim/snippets",
}
}

+ 6
- 0
.config/nvim/lua/tovi/plugins/telescope.lua View File

@ -145,6 +145,12 @@ return {
})
end, { desc = "Find neovim config files with FZF" })
keymap.set("n", "<leader>gD", function ()
builtin.find_files({
search_file = vim.fn.expand("<cword>"),
})
end, { desc = "Find neovim config files with FZF" })
vim.keymap.set("n", "<leader>u", "<cmd>Telescope undo<cr>")
end,
}

+ 1
- 0
.config/nvim/snippets/package.json View File

@ -0,0 +1 @@
{"name":"my-snippets","contributes":{"snippets":[{"path":".\/vue.json","language":["vue"]}]},"description":"This package.json has been generated by nvim-scissors."}

+ 1
- 0
.config/nvim/snippets/vue.json View File

@ -0,0 +1 @@
{"t + $t":{"prefix":["t","$t"],"body":"{{ $t('${1}') }}"},"this.t + this.$t":{"prefix":["this.t","this.$t"],"body":"this.$t('${1}')"}}

Loading…
Cancel
Save