add sway config
This commit is contained in:
parent
2ec2a1f726
commit
a4af16f614
2 changed files with 28 additions and 16 deletions
|
@ -1,21 +1,26 @@
|
|||
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
|
||||
local real_file = vim.fn.filereadable(data.file) == 1
|
||||
-- buffer is a real file on the disk
|
||||
local real_file = vim.fn.filereadable(data.file) == 1
|
||||
|
||||
-- buffer is a [No Name]
|
||||
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
|
||||
-- buffer is a [No Name]
|
||||
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
|
||||
|
||||
if not real_file and not no_name then
|
||||
return
|
||||
end
|
||||
if not real_file and not no_name then
|
||||
return
|
||||
end
|
||||
|
||||
-- open the tree, find the file but don't focus it
|
||||
require("nvim-tree.api").tree.toggle({ focus = false, find_file = true, })
|
||||
-- open the tree, find the file but don't focus it
|
||||
require("nvim-tree.api").tree.toggle({ focus = false, find_file = true })
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
|
||||
|
|
|
@ -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, {})
|
||||
|
|
Loading…
Add table
Reference in a new issue