feat: add ToggleWrap
parent
cda2cae5e5
commit
92c08534aa
1
init.lua
1
init.lua
|
@ -15,3 +15,4 @@ require("config.autotags")
|
||||||
require("config.conform")
|
require("config.conform")
|
||||||
require("options")
|
require("options")
|
||||||
require("keymaps")
|
require("keymaps")
|
||||||
|
require("commands")
|
||||||
|
|
|
@ -1,36 +1,36 @@
|
||||||
{
|
{
|
||||||
"FTerm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" },
|
"FTerm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" },
|
||||||
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
|
||||||
"catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" },
|
"catppuccin": { "branch": "main", "commit": "d97387aea8264f484bb5d5e74f2182a06c83e0d8" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "12b3995537f52ba2810a9857e8ca256881febbda" },
|
"conform.nvim": { "branch": "master", "commit": "00f9d91391b04b1935e2f15948bd96cc111e7d3a" },
|
||||||
"copilot.vim": { "branch": "release", "commit": "1e135c5303bc60598f6314a2276f31dc91aa34dd" },
|
"copilot.vim": { "branch": "release", "commit": "25feddf8e3aa79f0573c8f43ddb13c44c530cfa5" },
|
||||||
"dashboard-nvim": { "branch": "master", "commit": "1c8b82c5b02bb890862538be2061e37ef801a99b" },
|
"dashboard-nvim": { "branch": "master", "commit": "5182c09ac8085dc73b78ad0ea9f5479c9a866fc4" },
|
||||||
"git-blame.nvim": { "branch": "master", "commit": "ad1d1365c9189d89797fe8d559677d5f55dc2830" },
|
"git-blame.nvim": { "branch": "master", "commit": "fb84fad97cd4b51caee3c865e8a33a0d413b77a8" },
|
||||||
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
|
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" },
|
"lazy.nvim": { "branch": "main", "commit": "9895337d1f4c0cea1186d92148e3d80f6551eda8" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "273fdde8ac5e51f3a223ba70980e52bbc09d9f6f" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
|
||||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" },
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
|
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
|
||||||
"monokai.nvim": { "branch": "master", "commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63" },
|
"monokai.nvim": { "branch": "master", "commit": "b8bd44d5796503173627d7a1fc51f77ec3a08a63" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" },
|
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" },
|
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
|
||||||
"nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" },
|
"nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "6ae8a14828b0f3bff1721a35a1dfd604b6a933bb" },
|
"nvim-dap": { "branch": "master", "commit": "5a2f7121869394502521c52b2bc581ab22c69447" },
|
||||||
"nvim-grey": { "branch": "main", "commit": "d822f82a990198e354845fe4d191f5f527302444" },
|
"nvim-grey": { "branch": "main", "commit": "8fb9f591b0c60678b3b2d257cc7ee7421af37d4f" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" },
|
"nvim-lspconfig": { "branch": "master", "commit": "9bda20fb967075355f253911bc066a8b5a03c77e" },
|
||||||
"nvim-tree.lua": { "branch": "master", "commit": "347e1eb35264677f66a79466bb5e3d111968e12c" },
|
"nvim-tree.lua": { "branch": "master", "commit": "2bc725a3ebc23f0172fb0ab4d1134b81bcc13812" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "bbc67f736e22c37c23f2c11a05bfa23b715af30c" },
|
"nvim-treesitter": { "branch": "master", "commit": "7c9c5bed8340031f8a6dad47a58a26eaf15b9a56" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "cb57b07803476ee902c89412aeff219a9a58be13" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "794bba734ec95eaff9bb82fbd112473be2087283" },
|
"nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
|
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
||||||
"themery.nvim": { "branch": "main", "commit": "1005a58801276d29c4b1e11244cf7631250f9143" },
|
"themery.nvim": { "branch": "main", "commit": "1005a58801276d29c4b1e11244cf7631250f9143" },
|
||||||
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
|
"vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" },
|
||||||
"vscode-js-debug": { "branch": "main", "commit": "0b40365364f2867691701bff5aedf68d7fa0fe9d" }
|
"vscode-js-debug": { "branch": "main", "commit": "7349abcd0aaf72375645a4a876afab6479e0ed7e" }
|
||||||
}
|
}
|
|
@ -4,3 +4,14 @@ local api = vim.api
|
||||||
api.nvim_create_user_command("ShowFilePath", function()
|
api.nvim_create_user_command("ShowFilePath", function()
|
||||||
print(vim.fn.expand("%:p"))
|
print(vim.fn.expand("%:p"))
|
||||||
end, { bang = true })
|
end, { bang = true })
|
||||||
|
|
||||||
|
-- Toggle wrap
|
||||||
|
vim.api.nvim_create_user_command("ToggleWrap", function()
|
||||||
|
if vim.wo.wrap then
|
||||||
|
vim.wo.wrap = false
|
||||||
|
print("Word wrap disabled")
|
||||||
|
else
|
||||||
|
vim.wo.wrap = true
|
||||||
|
print("Word wrap enabled")
|
||||||
|
end
|
||||||
|
end, {})
|
||||||
|
|
|
@ -2,12 +2,12 @@ local M = {}
|
||||||
|
|
||||||
M.dashboard_config = function()
|
M.dashboard_config = function()
|
||||||
local logo = [[
|
local logo = [[
|
||||||
██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
|
██╗ ██╗██╗███╗ ███╗ Z
|
||||||
██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
|
██║ ██║██║████╗ ████║ Z
|
||||||
██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
|
██║ ██║██║██╔████╔██║ z
|
||||||
██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z
|
╚██╗ ██╔╝██║██║╚██╔╝██║ z
|
||||||
███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
|
╚████╔╝ ██║██║ ╚═╝ ██║
|
||||||
╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
╚═══╝ ╚═╝╚═╝ ╚═╝
|
||||||
]]
|
]]
|
||||||
|
|
||||||
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||||
|
@ -15,21 +15,19 @@ M.dashboard_config = function()
|
||||||
local opts = {
|
local opts = {
|
||||||
theme = "doom",
|
theme = "doom",
|
||||||
hide = {
|
hide = {
|
||||||
-- this is taken care of by lualine
|
|
||||||
-- enabling this messes up the actual laststatus setting after loading a file
|
|
||||||
statusline = false,
|
statusline = false,
|
||||||
},
|
},
|
||||||
config = {
|
config = {
|
||||||
header = vim.split(logo, "\n"),
|
header = vim.split(logo, "\n"),
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
center = {
|
center = {
|
||||||
-- { action = LazyVim.telescope("files"), desc = " Find File", icon = " ", key = "f" },
|
{ action = "Telescope find_files", desc = " Find File", icon = " ", key = "f" },
|
||||||
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
||||||
{ action = "Telescope oldfiles", desc = " Recent Files", icon = " ", key = "r" },
|
{ action = "Telescope oldfiles", desc = " Recent Files", icon = " ", key = "r" },
|
||||||
{ action = "Telescope live_grep", desc = " Find Text", icon = " ", key = "g" },
|
{ action = "Telescope live_grep", desc = " Find Text", icon = " ", key = "g" },
|
||||||
{ action = [[lua LazyVim.telescope.config_files()()]], desc = " Config", icon = " ", key = "c" },
|
-- { action = [[lua Lazy.telescope.config_files()()]], desc = " Config", icon = " ", key = "c" },
|
||||||
{ action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
-- { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" },
|
||||||
{ action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
-- { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" },
|
||||||
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
||||||
{ action = "qa", desc = " Quit", icon = " ", key = "q" },
|
{ action = "qa", desc = " Quit", icon = " ", key = "q" },
|
||||||
},
|
},
|
||||||
|
|
|
@ -37,6 +37,8 @@ local mappings = {
|
||||||
["<leader>fm"] = "<cmd>Format<CR>",
|
["<leader>fm"] = "<cmd>Format<CR>",
|
||||||
-- Disable help menu
|
-- Disable help menu
|
||||||
["<F1>"] = "<nop>",
|
["<F1>"] = "<nop>",
|
||||||
|
-- Toggle word wrap
|
||||||
|
["<leader>w"] = "<cmd>ToggleWrap<CR>",
|
||||||
},
|
},
|
||||||
x = {
|
x = {
|
||||||
["<A-j>"] = ":move '>+1<CR>gv-gv",
|
["<A-j>"] = ":move '>+1<CR>gv-gv",
|
||||||
|
|
Loading…
Reference in New Issue