Add some other things for luasnip
This commit is contained in:
parent
ad9c779b20
commit
21403a7774
6 changed files with 35 additions and 9 deletions
|
@ -25,7 +25,7 @@ vim.keymap.set({ "i", "s" }, "<c-l>", function()
|
||||||
end
|
end
|
||||||
end, { silent = true })
|
end, { silent = true })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader><leader>s", "<cmd>source ~/.config/nvim_dev/lua/custom/luasnip.lua<CR>")
|
vim.keymap.set("n", "<leader><leader>s", "<cmd>source ~/.config/nvim/lua/custom/luasnip.lua<CR>")
|
||||||
|
|
||||||
-- Load custom snippets
|
-- Load custom snippets
|
||||||
for _, ft_path in ipairs(vim.api.nvim_get_runtime_file("lua/custom/snippets/*.lua", true)) do
|
for _, ft_path in ipairs(vim.api.nvim_get_runtime_file("lua/custom/snippets/*.lua", true)) do
|
||||||
|
|
18
lua/custom/plugins/tmux_navigator.lua
Normal file
18
lua/custom/plugins/tmux_navigator.lua
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
return {
|
||||||
|
"christoomey/vim-tmux-navigator",
|
||||||
|
cmd = {
|
||||||
|
"TmuxNavigateLeft",
|
||||||
|
"TmuxNavigateDown",
|
||||||
|
"TmuxNavigateUp",
|
||||||
|
"TmuxNavigateRight",
|
||||||
|
"TmuxNavigatePrevious",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
|
||||||
|
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
|
||||||
|
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
|
||||||
|
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
|
||||||
|
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
|
-- Clear snippets collection when souring lua file
|
||||||
|
require("luasnip.session.snippet_collection").clear_snippets "lua"
|
||||||
|
|
||||||
local ls = require "luasnip"
|
local ls = require "luasnip"
|
||||||
|
|
||||||
|
|
||||||
print("hello from lua snips")
|
|
||||||
|
|
||||||
ls.add_snippets("lua", {
|
ls.add_snippets("lua", {
|
||||||
ls.parser.parse_snippet("expand", "-- this is what was expanded kek"),
|
ls.parser.parse_snippet("expand", "-- this is what was expanded kek"),
|
||||||
ls.parser.parse_snippet("pipa", "Pipasik"),
|
ls.parser.parse_snippet("pipa", "Pipasik"),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
9
lua/custom/snippets/python.lua
Normal file
9
lua/custom/snippets/python.lua
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
-- Clear snippets collection when souring lua file
|
||||||
|
require("luasnip.session.snippet_collection").clear_snippets "lua"
|
||||||
|
|
||||||
|
local ls = require "luasnip"
|
||||||
|
|
||||||
|
ls.add_snippets("lua", {
|
||||||
|
ls.parser.parse_snippet("expand", "-- this is what was expanded kek"),
|
||||||
|
ls.parser.parse_snippet("pipa", "Pipasik"),
|
||||||
|
})
|
|
@ -1,10 +1,10 @@
|
||||||
local set = vim.keymap.set
|
local set = vim.keymap.set
|
||||||
|
|
||||||
-- Basic movement keybinds, these make navigating splits easy for me
|
-- Basic movement keybinds, these make navigating splits easy for me
|
||||||
set("n", "<c-j>", "<c-w><c-j>")
|
-- set("n", "<c-j>", "<c-w><c-j>")
|
||||||
set("n", "<c-k>", "<c-w><c-k>")
|
-- set("n", "<c-k>", "<c-w><c-k>")
|
||||||
set("n", "<c-l>", "<c-w><c-l>")
|
-- set("n", "<c-l>", "<c-w><c-l>")
|
||||||
set("n", "<c-h>", "<c-w><c-h>")
|
-- set("n", "<c-h>", "<c-w><c-h>")
|
||||||
|
|
||||||
-- Bindings for reloading LUA files (used when working with lua files)
|
-- Bindings for reloading LUA files (used when working with lua files)
|
||||||
-- set("n", "<leader>x", "<cmd>.lua<CR>", { desc = "Execute the current lne" })
|
-- set("n", "<leader>x", "<cmd>.lua<CR>", { desc = "Execute the current lne" })
|
||||||
|
|
Loading…
Reference in a new issue