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

View File

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

View File

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

View File

@ -2,7 +2,7 @@ return {
"mattn/emmet-vim",
config = function()
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.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 {
-- "nvim-lualine/lualine.nvim",
}
-- config = function()
-- local c = require("darkrose.colors").get()
-- local lualine = require("lualine")
@ -194,4 +196,3 @@ return {
--
-- lualine.setup(config)
-- 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 {
"nvim-neorg/neorg",
build = ":Neorg sync-parsers",
-- tag = "*",
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("neorg").setup {
load = {
["core.defaults"] = {},
["core.completion"] = {
config = {
engine = "nvim-cmp"
},
},
["core.concealer"] = {
config = {
icon_preset = "diamond",
},
},
["core.dirman"] = {
config = {
workspaces = {
notes = "~/study/notes",
},
default_workspace = "notes",
index = "001_index.norg"
},
},
},
}
end,
-- "nvim-neorg/neorg",
-- build = ":Neorg sync-parsers",
-- -- tag = "*",
-- dependencies = { "nvim-lua/plenary.nvim" },
-- config = function()
-- require("neorg").setup {
-- load = {
-- ["core.defaults"] = {},
-- ["core.completion"] = {
-- config = {
-- engine = "nvim-cmp"
-- },
-- },
-- ["core.concealer"] = {
-- config = {
-- icon_preset = "diamond",
-- },
-- },
-- ["core.dirman"] = {
-- config = {
-- workspaces = {
-- notes = "~/study/notes",
-- },
-- default_workspace = "notes",
-- index = "001_index.norg"
-- },
-- },
-- },
-- }
-- 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>pv",
":Telescope file_browser path=%:p:h select_buffer=true<CR>",
":Ex<CR>",
{ noremap = true, desc = "open file browser" })
keymap.set("n", "<A-k>", "<cmd>cnext<CR>zz")

View File

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

View File

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