Compare commits

...

4 Commits

6 changed files with 27 additions and 27 deletions

View File

@ -6,6 +6,7 @@ https://www.youtube.com/feeds/videos.xml?channel_id=UCUQo7nzH1sXVpzL92VesANw "Te
https://www.youtube.com/feeds/videos.xml?channel_id=UCV0qA-eDDICsRR9rPcnG7tw "Tech" https://www.youtube.com/feeds/videos.xml?channel_id=UCV0qA-eDDICsRR9rPcnG7tw "Tech"
https://www.youtube.com/feeds/videos.xml?channel_id=UCR-DXc1voovS8nhAvccRZhg "Tech" https://www.youtube.com/feeds/videos.xml?channel_id=UCR-DXc1voovS8nhAvccRZhg "Tech"
https://www.youtube.com/feeds/videos.xml?channel_id=UCVRJ6D343dX-x730MRP8tNw "Tech" https://www.youtube.com/feeds/videos.xml?channel_id=UCVRJ6D343dX-x730MRP8tNw "Tech"
https://www.youtube.com/feeds/videos.xml?channel_id=UCG5Ph9Mm6UEQLJJ-kGIC2AQ "Tech" "OneMarcFifty"
https://www.youtube.com/feeds/videos.xml?channel_id=UCWedHS9qKebauVIK2J7383g "Tech" "Underscore_" https://www.youtube.com/feeds/videos.xml?channel_id=UCWedHS9qKebauVIK2J7383g "Tech" "Underscore_"
https://www.youtube.com/feeds/videos.xml?channel_id=UC9C07cryUrKzLuAzwITPA3A "SC2" "SC2HL" https://www.youtube.com/feeds/videos.xml?channel_id=UC9C07cryUrKzLuAzwITPA3A "SC2" "SC2HL"

View File

@ -0,0 +1,14 @@
local nvimtree_status_ok, nvimtree = pcall(require, "nvim-tree")
if not nvimtree_status_ok then
return
end
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.opt.termguicolors = true
vim.keymap.set("n", "<leader>f", ":NvimTreeToggle<cr>", {silent = true, noremap = true})
nvimtree.setup({
})

View File

@ -23,7 +23,6 @@ local new_maker = function(filepath, bufnr, opts)
}):sync() }):sync()
end end
local fb_actions = require "telescope".extensions.file_browser.actions
local function telescope_buffer_dir() local function telescope_buffer_dir()
return vim.fn.expand('%:p:h') return vim.fn.expand('%:p:h')
end end
@ -49,22 +48,10 @@ telescope.setup {
case_mode = "smart_case", -- or "ignore_case" or "respect_case" case_mode = "smart_case", -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case" -- the default case_mode is "smart_case"
}, },
file_browser = {
theme = "dropdown",
-- disables netrw and use telescope-file-browser in its place
hijack_netrw = true,
mappings = {
["n"] = {
-- your custom normal mode mappings
["h"] = fb_actions.goto_parent_dir,
},
},
},
} }
} }
telescope.load_extension('fzf') telescope.load_extension('fzf')
telescope.load_extension('file_browser')
-- keymaps -- keymaps
@ -85,15 +72,3 @@ end)
-- vim.keymap.set('n', '<leader>d', function() -- vim.keymap.set('n', '<leader>d', function()
-- builtin.diagnostics() -- builtin.diagnostics()
-- end) -- end)
vim.keymap.set("n", "<leader>fb", function()
telescope.extensions.file_browser.file_browser({
path = "%:p:h",
cwd = telescope_buffer_dir(),
respect_gitignore = false,
hidden = true,
grouped = true,
previewer = false,
initial_mode = "normal",
layout_config = { height = 40 }
})
end)

View File

@ -25,6 +25,7 @@ zk.setup({
local opts = { noremap=true, silent=false } local opts = { noremap=true, silent=false }
-- Create a new note after asking for its title. -- Create a new note after asking for its title.
vim.api.nvim_set_keymap("n", "<leader>zl", "<Cmd>ZkNew { title = vim.fn.input('Title (litterature): '), dir = 'litterature'}<CR>", opts)
vim.api.nvim_set_keymap("n", "<leader>zs", "<Cmd>ZkNew { title = vim.fn.input('Title (slipbox): '), dir = 'slipbox'}<CR>", opts) vim.api.nvim_set_keymap("n", "<leader>zs", "<Cmd>ZkNew { title = vim.fn.input('Title (slipbox): '), dir = 'slipbox'}<CR>", opts)
vim.api.nvim_set_keymap("v", "<leader>zs", ":'<,'>ZkNewFromTitleSelection { dir = 'slipbox'}<CR>", opts) vim.api.nvim_set_keymap("v", "<leader>zs", ":'<,'>ZkNewFromTitleSelection { dir = 'slipbox'}<CR>", opts)
@ -47,7 +48,7 @@ vim.api.nvim_set_keymap("n", "<leader>zb", "<Cmd>ZkBacklinks<CR>", opts)
-- Alternative for backlinks using pure LSP and showing the source context. -- Alternative for backlinks using pure LSP and showing the source context.
--map('n', '<leader>zb', '<Cmd>lua vim.lsp.buf.references()<CR>', opts) --map('n', '<leader>zb', '<Cmd>lua vim.lsp.buf.references()<CR>', opts)
-- Open notes linked by the current buffer. -- Open notes linked by the current buffer.
vim.api.nvim_set_keymap("n", "<leader>zl", "<Cmd>ZkLinks<CR>", opts) vim.api.nvim_set_keymap("n", "<leader>zL", "<Cmd>ZkLinks<CR>", opts)
-- Preview a linked note. -- Preview a linked note.
vim.api.nvim_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts) vim.api.nvim_set_keymap("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)

View File

@ -107,6 +107,15 @@ return packer.startup(function(use)
"nvim-telescope/telescope-file-browser.nvim" "nvim-telescope/telescope-file-browser.nvim"
} }
use {
'nvim-tree/nvim-tree.lua',
requires = {
'nvim-tree/nvim-web-devicons', -- optional
},
config = [[require('config.nvimtree')]],
}
use { use {
'lervag/vimtex', 'lervag/vimtex',
config = [[require('config.vimtex')]], config = [[require('config.vimtex')]],

View File

@ -31,7 +31,7 @@
}, },
"Links": { "Links": {
"prefix": ["l", "link"], "prefix": ["l", "link"],
"body": ["[${1}](${2}) ${0}"], "body": ["[${1}](${2})${0}"],
"description": "Add links" "description": "Add links"
}, },
"URLS": { "URLS": {