local map = vim.keymap.set local telescope_builtin = require("telescope.builtin") local smart_splits = require("smart-splits") map( "n", "", "BufferLineCyclePrev", { desc = "Prev buffer" }) map( "n", "", "BufferLineCycleNext", { desc = "Next buffer" }) map( { "n", "i" }, "", "noh",{ desc = "Escape and clear hlsearch"}) map( "n", "ff", telescope_builtin.find_files, { desc = "Find Files" }) map( "n", "fb", telescope_builtin.buffers, { desc = "List Buffers" }) map( "n", "fh", telescope_builtin.help_tags, { desc = "Help Tags" }) map( "n", "fp", telescope_builtin.git_files, { desc = "Find Files (Git)" }) map( "n", "fc", function() telescope_builtin.git_files({ cwd = "~/.dotfiles"}) end, { desc = "Edit Dotfiles" }) map( "n", "", "NeoTreeFocusToggle", { desc = "Open NeoTree" }) map( {"n", "x"}, "ga", ":EasyAlign", { desc = "Align text" }) -- resizing splits map('n', '', smart_splits.resize_left) map('n', '', smart_splits.resize_down) map('n', '', smart_splits.resize_up) map('n', '', smart_splits.resize_right) -- moving between splits map('n', '', smart_splits.move_cursor_left) map('n', '', smart_splits.move_cursor_down) map('n', '', smart_splits.move_cursor_up) map('n', '', smart_splits.move_cursor_right) -- swapping buffers between windows map('n', 'h', smart_splits.swap_buf_left) map('n', 'j', smart_splits.swap_buf_down) map('n', 'k', smart_splits.swap_buf_up) map('n', 'l', smart_splits.swap_buf_right) -- null-ls map( 'n', "lf", vim.lsp.buf.format, { desc = "Format file"})