mirror of
https://github.com/Ascyii/nvim.git
synced 2026-01-01 04:04:24 -05:00
Implemented folding and some improvements. Moved functions to the utils module
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
local base_zet = "~/synced/brainstore/zettelkasten"
|
||||
|
||||
return {
|
||||
{
|
||||
@@ -43,6 +42,8 @@ return {
|
||||
'Ascyii/telekasten.nvim',
|
||||
dev = true,
|
||||
config = function()
|
||||
local base_zet = "~/synced/brainstore/zettelkasten"
|
||||
|
||||
-- Again can only use opts when not using config
|
||||
require("telekasten").setup({
|
||||
home = vim.fn.expand(base_zet),
|
||||
@@ -61,6 +62,7 @@ return {
|
||||
uuid_separator = "-",
|
||||
})
|
||||
|
||||
-- Telekasten occupies the z namespace
|
||||
vim.keymap.set("n", "<leader>z", "<cmd>Telekasten panel<CR>")
|
||||
vim.keymap.set("n", "<leader>zf", "<cmd>Telekasten find_notes<CR>")
|
||||
vim.keymap.set("n", "<leader>zg", "<cmd>Telekasten search_notes<CR>")
|
||||
|
||||
@@ -2,13 +2,16 @@ return {
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
keys = {
|
||||
{ "<leader>e", function()
|
||||
require("nvim-tree.api").tree.toggle({ find_file = true, update_root = true, focus = true, })
|
||||
require("nvim-tree.api").tree.toggle({
|
||||
find_file = true,
|
||||
update_root = true,
|
||||
focus = true,
|
||||
})
|
||||
end
|
||||
}
|
||||
},
|
||||
opts = {
|
||||
sort_by = "case_sensitive",
|
||||
|
||||
view = {
|
||||
width = 35,
|
||||
side = "right",
|
||||
@@ -19,7 +22,6 @@ return {
|
||||
update_focused_file = {
|
||||
enable = false,
|
||||
},
|
||||
|
||||
renderer = {
|
||||
group_empty = true,
|
||||
highlight_git = true,
|
||||
@@ -39,25 +41,21 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
git_clean = false,
|
||||
no_buffer = false,
|
||||
custom = { ".git" },
|
||||
},
|
||||
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = false,
|
||||
},
|
||||
|
||||
actions = {
|
||||
open_file = {
|
||||
quit_on_open = false,
|
||||
resize_window = true,
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ return {
|
||||
no_ignore = true, -- Also show files in gitignore
|
||||
follow = true,
|
||||
disable_devicons = true,
|
||||
prompt_title = "Find Files - custom",
|
||||
prompt_title = "Find Files",
|
||||
find_command = {
|
||||
"rg", "--files",
|
||||
"--glob", "!**/.git/*",
|
||||
|
||||
@@ -10,6 +10,7 @@ return {
|
||||
ensure_installed = { "typst", "go", "bash", "python", "nix", "lua" },
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
fold = { enable = true },
|
||||
})
|
||||
end
|
||||
},
|
||||
|
||||
@@ -1,14 +1,4 @@
|
||||
--- @return string
|
||||
local function get_cwd()
|
||||
local cwd = vim.fn.getcwd()
|
||||
local home = os.getenv("HOME")
|
||||
|
||||
if cwd:sub(1, #home) == home then
|
||||
return "~" .. cwd:sub(#home + 1)
|
||||
else
|
||||
return cwd
|
||||
end
|
||||
end
|
||||
local utils = require("utils.functions")
|
||||
|
||||
return {
|
||||
{
|
||||
@@ -21,15 +11,17 @@ return {
|
||||
},
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons'
|
||||
},
|
||||
opts = {
|
||||
options = {
|
||||
icons_enabled = false,
|
||||
icons_enabled = true,
|
||||
theme = 'gruvbox',
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
always_divide_middle = true,
|
||||
always_show_tabline = true,
|
||||
always_show_tabline = false,
|
||||
globalstatus = false,
|
||||
refresh = {
|
||||
statusline = 300,
|
||||
@@ -40,21 +32,12 @@ return {
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
lualine_c = { get_cwd, 'filename' },
|
||||
lualine_c = { utils.get_cwd(), 'filename' },
|
||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' }
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'location' },
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
extensions = { "nvim-tree" }
|
||||
|
||||
extensions = { "nvim-tree" } -- show another line on the tree
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user