Skip to content

Commit 0970979

Browse files
authored
feat(nvim): Improves git integration and workflow (#67)
Some improves to nvim git integration and workflows with floaterm. ---------- LINKS: - [Omer Hamerman dofiles nvim configs](https://github.com/omerxx/dotfiles/blob/master/nvim) - [The Holy Grail of Neovim Git Integrations by @omerxx](https://youtu.be/K-FKqXj8BAQ?si=uTxcsZ7e9qi_dQzI)
1 parent 9c07322 commit 0970979

File tree

4 files changed

+66
-54
lines changed

4 files changed

+66
-54
lines changed

nvim/lua/plugins/floaterm.lua

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
return {
2-
"voldikss/vim-floaterm",
3-
lazy = false,
4-
config = function()
5-
-- Você pode adicionar configurações aqui, se necessário.
6-
-- Por exemplo, para definir opções globais:
7-
vim.g.floaterm_width = 0.8
8-
vim.g.floaterm_height = 0.8
9-
vim.g.floaterm_position = "center"
10-
vim.g.floaterm_auto_close = 1
2+
"voldikss/vim-floaterm",
3+
dependencies = {
4+
"nvim-lua/plenary.nvim",
5+
},
6+
lazy = false,
7+
config = function()
8+
-- Você pode adicionar configurações aqui, se necessário.
9+
-- Por exemplo, para definir opções globais:
10+
vim.g.floaterm_width = 0.8
11+
vim.g.floaterm_height = 0.8
12+
vim.g.floaterm_position = "center"
13+
vim.g.floaterm_auto_close = 1
14+
vim.g.floaterm_keymap_toggle = "<Leader>t"
1115

12-
-- Mapeamento de teclado para abrir/fechar o Floaterm
13-
vim.keymap.set("n", "<Leader>nt", ":FloatermToggle<CR>", { desc = "Toggle Floaterm" })
14-
vim.keymap.set("n", "<Leader>tt", ":FloatermToggle<CR>", { desc = "Toggle Floaterm" })
15-
end,
16-
dependencies = {
17-
"nvim-lua/plenary.nvim", -- Se o plugin tiver dependências
18-
},
16+
-- Mapeamento de teclado para abrir/fechar o Floaterm
17+
vim.keymap.set("n", "<Leader>t", ":FloatermToggle<CR>", { desc = "Toggle Floaterm" })
18+
vim.keymap.set("n", "<Leader>lg", ":FloatermNew --name=LazyGit lazygit<CR>", { desc = "LazyGit" })
19+
vim.keymap.set("n", "<Leader>ld", ":FloatermNew --name=LazyDocker lazydocker<CR>", { desc = "LazyDocker" })
20+
end,
1921
}
2022

nvim/lua/plugins/lsp.lua

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
return {
2-
{
3-
"williamboman/mason.nvim",
4-
config = function()
5-
require("mason").setup({
6-
ensure_installed = {
7-
"debugpy",
8-
},
9-
})
10-
end,
11-
},
122
{
133
"williamboman/mason-lspconfig.nvim",
144
config = function()

nvim/lua/plugins/mason.lua

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
return {
2+
{
3+
"williamboman/mason.nvim",
4+
config = function()
5+
require("mason").setup({
6+
ensure_installed = {
7+
"debugpy",
8+
"stylua",
9+
"shellcheck",
10+
"shfmt",
11+
"flake8",
12+
},
13+
})
14+
end,
15+
},
16+
}
17+

nvim/lua/plugins/treesitter.lua

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
11
-- Treesitter configs
22
return {
3-
"nvim-treesitter/nvim-treesitter",
4-
build = ":TSUpdate",
5-
config = function()
6-
local treesitter_configs = require("nvim-treesitter.configs")
7-
treesitter_configs.setup({
8-
highlight = {
9-
enable = true,
10-
additiona_vim_regex_highlighting = { "ruby" },
11-
},
12-
indent = { enable = true },
13-
ensure_installed = {
14-
"c",
15-
"html",
16-
"java",
17-
"javascript",
18-
"kotlin",
19-
"lua",
20-
"python",
21-
"ruby",
22-
"typescript",
23-
"bash",
24-
"diff",
25-
"luadoc",
26-
"markdown",
27-
},
28-
auto_install = true,
29-
})
30-
end,
3+
"nvim-treesitter/nvim-treesitter",
4+
build = ":TSUpdate",
5+
config = function()
6+
local treesitter_configs = require("nvim-treesitter.configs")
7+
treesitter_configs.setup({
8+
highlight = {
9+
enable = true,
10+
additiona_vim_regex_highlighting = { "ruby" },
11+
},
12+
indent = { enable = true },
13+
ensure_installed = {
14+
"bash",
15+
"c",
16+
"diff",
17+
"html",
18+
"java",
19+
"javascript",
20+
"kotlin",
21+
"lua",
22+
"luadoc",
23+
"markdown",
24+
"python",
25+
"query",
26+
"ruby",
27+
"tsx",
28+
"typescript",
29+
"yaml",
30+
},
31+
auto_install = true,
32+
})
33+
end,
3134
}
3235

0 commit comments

Comments
 (0)