lots of updates

This commit is contained in:
Lucas Barbieri 2024-04-18 16:21:39 -03:00
parent 3fa5fab512
commit 8c28dafcb3
12 changed files with 275 additions and 254 deletions

View File

@ -178,7 +178,6 @@ vim.api.nvim_create_autocmd('TextYankPost', {
pattern = '*', pattern = '*',
}) })
local fb_actions = require "telescope".extensions.file_browser.actions
-- [[ Configure Telescope ]] -- [[ Configure Telescope ]]
require('telescope').setup { require('telescope').setup {
defaults = { defaults = {
@ -195,15 +194,14 @@ require('telescope').setup {
} }
}, },
extensions = { extensions = {
file_browser = { -- file_browser = {
initial_mode = "normal", -- initial_mode = "normal",
theme = "ivy", -- theme = "ivy",
hijack_netrw = true -- hijack_netrw = true
}, -- },
}, },
} }
require("telescope").load_extension("file_browser")
-- Enable telescope fzf native, if installed -- Enable telescope fzf native, if installed
pcall(require('telescope').load_extension, 'fzf') pcall(require('telescope').load_extension, 'fzf')
@ -235,7 +233,7 @@ require('nvim-treesitter.configs').setup {
auto_install = false, auto_install = false,
highlight = { enable = true }, highlight = { enable = true },
indent = { enable = true }, -- indent = { enable = true },
incremental_selection = { incremental_selection = {
enable = true, enable = true,
keymaps = { keymaps = {

View File

@ -27,6 +27,7 @@ return {
else else
options = { options = {
show_buffer_icons = false, show_buffer_icons = false,
diagnostics = "nvim_lsp",
} }
end end

View File

@ -122,25 +122,24 @@ return {
}, },
sources = { sources = {
{ name = 'nvim_lsp' }, { name = 'nvim_lsp' },
{ name = "neorg" }, { name = "orgmode" },
{ name = 'luasnip' }, { name = 'luasnip' },
{ name = 'buffer' },
{ name = 'path' }, { name = 'path' },
{ name = 'buffer' },
}, },
formatting = { formatting = {
fields = { "menu", "abbr", "kind" }, fields = { "abbr", "menu", "kind" },
format = function(entry, item) format = require('lspkind').cmp_format({
local menu_icon = { mode = 'symbol_text', -- show only symbol annotations
nvim_lsp = "", maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
luasnip = "", -- can also be a function to dynamically calculate max width such as
buffer = 'Ω ', -- maxwidth = function() return math.floor(0.45 * vim.o.columns) end,
path = "", ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first)
} show_labelDetails = true, -- show labelDetails in menu. Disabled by default
item.menu = menu_icon[entry.source.name] -- The function below will be called before any actual modifications from lspkind
item.kind = " " .. item.kind -- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))
return item })
end,
}, },
window = { window = {
completion = cmp.config.window.bordered(winhighlight), completion = cmp.config.window.bordered(winhighlight),

View File

@ -2,7 +2,7 @@ return {
"mattn/emmet-vim", "mattn/emmet-vim",
config = function() config = function()
local autocmd = vim.api.nvim_create_autocmd local autocmd = vim.api.nvim_create_autocmd
autocmd("FileType", { pattern = { "html", "css" }, command = [[EmmetInstall]] }) autocmd("FileType", { pattern = { "html", "css", "vue", "js" }, command = [[EmmetInstall]] })
vim.keymap.set("n", "<leader>le", function() vim.keymap.set("n", "<leader>le", function()
vim.cmd(string.format("Emmet %s", vim.fn.input("Emmet: "))) vim.cmd(string.format("Emmet %s", vim.fn.input("Emmet: ")))

View File

@ -1,4 +0,0 @@
return {
"nvim-telescope/telescope-file-browser.nvim",
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
}

View File

@ -1,5 +1,7 @@
return { return {
-- "nvim-lualine/lualine.nvim", }
-- config = function() -- config = function()
-- local c = require("darkrose.colors").get() -- local c = require("darkrose.colors").get()
-- local lualine = require("lualine") -- local lualine = require("lualine")
@ -194,4 +196,3 @@ return {
-- --
-- lualine.setup(config) -- lualine.setup(config)
-- end, -- end,
}

View File

@ -0,0 +1,7 @@
return {
'echasnovski/mini.nvim',
version = false,
config = function()
require('mini.surround').setup()
end
}

View File

@ -1,32 +1,32 @@
return { return {
"nvim-neorg/neorg", -- "nvim-neorg/neorg",
build = ":Neorg sync-parsers", -- build = ":Neorg sync-parsers",
-- tag = "*", -- -- tag = "*",
dependencies = { "nvim-lua/plenary.nvim" }, -- dependencies = { "nvim-lua/plenary.nvim" },
config = function() -- config = function()
require("neorg").setup { -- require("neorg").setup {
load = { -- load = {
["core.defaults"] = {}, -- ["core.defaults"] = {},
["core.completion"] = { -- ["core.completion"] = {
config = { -- config = {
engine = "nvim-cmp" -- engine = "nvim-cmp"
}, -- },
}, -- },
["core.concealer"] = { -- ["core.concealer"] = {
config = { -- config = {
icon_preset = "diamond", -- icon_preset = "diamond",
}, -- },
}, -- },
["core.dirman"] = { -- ["core.dirman"] = {
config = { -- config = {
workspaces = { -- workspaces = {
notes = "~/study/notes", -- notes = "~/study/notes",
}, -- },
default_workspace = "notes", -- default_workspace = "notes",
index = "001_index.norg" -- index = "001_index.norg"
}, -- },
}, -- },
}, -- },
} -- }
end, -- end,
} }

View File

@ -0,0 +1,12 @@
return {
'nvim-orgmode/orgmode',
event = 'VeryLazy',
ft = { 'org' },
config = function()
-- Setup orgmode
require('orgmode').setup({
org_agenda_files = '~/orgfiles/**/*',
org_default_notes_file = '~/orgfiles/refile.org',
})
end,
}

View File

@ -22,7 +22,7 @@ keymap.set("n", "<C-f>", "<cmd>silent !tmux neww tmux-sessionizer<CR>")
keymap.set("n", "<leader>f", vim.lsp.buf.format, { desc = "format current buffer" }) keymap.set("n", "<leader>f", vim.lsp.buf.format, { desc = "format current buffer" })
keymap.set("n", keymap.set("n",
"<leader>pv", "<leader>pv",
":Telescope file_browser path=%:p:h select_buffer=true<CR>", ":Ex<CR>",
{ noremap = true, desc = "open file browser" }) { noremap = true, desc = "open file browser" })
keymap.set("n", "<A-k>", "<cmd>cnext<CR>zz") keymap.set("n", "<A-k>", "<cmd>cnext<CR>zz")

View File

@ -1,4 +1,3 @@
-- vim.opt.guicursor = ""
vim.opt.mouse = "a" vim.opt.mouse = "a"
vim.opt.nu = true vim.opt.nu = true
@ -55,6 +54,13 @@ autocmd("Filetype", {
end end
}) })
autocmd("Filetype", {
pattern = "*",
callback = function()
vim.o.formatoptions = "jql"
end
})
vim.opt.conceallevel = 2 vim.opt.conceallevel = 2
vim.opt.concealcursor = "n" vim.opt.concealcursor = "n"

View File

@ -13,6 +13,7 @@ return {
dependencies = { dependencies = {
-- Creates a beautiful debugger UI -- Creates a beautiful debugger UI
'rcarriga/nvim-dap-ui', 'rcarriga/nvim-dap-ui',
"nvim-neotest/nvim-nio",
-- Installs the debug adapters for you -- Installs the debug adapters for you
'williamboman/mason.nvim', 'williamboman/mason.nvim',