add sway config

This commit is contained in:
Nydragon 2023-12-20 12:20:31 +09:00
parent 2ec2a1f726
commit a4af16f614
2 changed files with 28 additions and 16 deletions

View file

@ -1,7 +1,12 @@
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
require("nvim-tree").setup()
require("nvim-tree").setup({
filters = {
dotfiles = false,
git_ignored = false,
},
})
local function open_nvim_tree(data)
-- buffer is a real file on the disk
@ -15,7 +20,7 @@ local function open_nvim_tree(data)
end
-- open the tree, find the file but don't focus it
require("nvim-tree.api").tree.toggle({ focus = false, find_file = true, })
require("nvim-tree.api").tree.toggle({ focus = false, find_file = true })
end
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })

View file

@ -1,8 +1,15 @@
require('telescope').setup()
require("telescope").setup({
pickers = {
find_files = {
-- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d.
find_command = { "rg", "--files", "--hidden", "--no-ignore", "--glob", "!**/.git/*" },
},
},
})
local builtin = require('telescope.builtin')
local builtin = require("telescope.builtin")
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
vim.keymap.set("n", "<leader>ff", builtin.find_files, {})
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
vim.keymap.set("n", "<leader>fb", builtin.buffers, {})
vim.keymap.set("n", "<leader>fh", builtin.help_tags, {})