Compare commits

...

3 Commits

Author SHA1 Message Date
Xavier Logerais
095d08c050 feat(autocmds): Split config for autocmds 2023-11-02 18:29:29 +01:00
Xavier Logerais
0bde02eab6 feat: Split config for colorscheme 2023-11-02 18:29:02 +01:00
Xavier Logerais
ce300bd347 feat(plugins): Ajout de plugins communautaires 2023-11-02 18:27:57 +01:00
6 changed files with 54 additions and 8 deletions

View File

@ -0,0 +1,28 @@
vim.api.nvim_create_autocmd(
"FileType", {
desc = "Customizations for groovy files",
-- group = vim.api.nvim_create_augroup("groovy", { clear = true }),
pattern = { "groovy", "Jenkinsfile" },
callback = function()
local Terminal = require('toggleterm.terminal').Terminal
local groovysh = Terminal:new({
name = "groovysh",
cmd = "groovysh",
hidden = true,
close_on_exit = true,
})
function _groovysh_toggle()
groovysh:toggle()
end
vim.api.nvim_set_keymap("n", "<F5>", "<cmd>lua _groovysh_toggle()<CR>", { noremap = true, silent = true })
vim.api.nvim_set_keymap("i", "<F5>", "<cmd>lua _groovysh_toggle()<CR>", { noremap = true, silent = true })
-- vim.api.nvim_set_keymap('n', '<F5>', ':terminal groovysh<CR>', { noremap = true, silent = true })
-- vim.opt_local.wrap = true
-- vim.opt_local.spell = true
end,
-- command = "setlocal wrap spell",
}
)

View File

@ -0,0 +1,6 @@
vim.api.nvim_create_autocmd("TermOpen", {
desc = "Auto switch to insert mode for terminal",
group = vim.api.nvim_create_augroup("term_auto_insert", { clear = true }),
pattern = "term://*",
command = "startinsert",
})

View File

@ -0,0 +1,9 @@
vim.api.nvim_create_autocmd("FileType", {
desc = "Enable wrap and spell for text like documents",
group = vim.api.nvim_create_augroup("auto_spell", { clear = true }),
pattern = { "gitcommit", "markdown", "text", "plaintex" },
callback = function()
vim.opt_local.wrap = true
vim.opt_local.spell = true
end,
})

1
lua/user/colorscheme.lua Normal file
View File

@ -0,0 +1 @@
return "astrodark"

View File

@ -1,5 +1,4 @@
return {
colorscheme = "astrodark",
-- This function is run last and is a good place to configuring
-- augroups/autocommands and custom filetypes also this just pure lua so
-- anything that doesn't fit in the normal config locations above can go here
@ -15,13 +14,10 @@ return {
-- })
-- Set up custom autocmds
vim.api.nvim_create_augroup("myterm", { clear = true })
vim.api.nvim_create_autocmd("TermOpen", {
desc = "Auto switch to insert mode for terminal",
group = "myterm",
pattern = "term://*",
command = "startinsert",
})
require "user.autocmds.text"
require "user.autocmds.terminal"
require "user.autocmds.groovy"
-- Set up custom filetypes
-- vim.filetype.add {
-- extension = {

View File

@ -17,6 +17,10 @@ return {
{ import = "astrocommunity.pack.docker" },
{ import = "astrocommunity.pack.helm" },
{ import = "astrocommunity.pack.terraform" },
{ import = "astrocommunity.pack.python" },
{ import = "astrocommunity.pack.java" },
{ import = "astrocommunity.pack.html-css" },
{ import = "astrocommunity.pack.angular" },
{ import = "astrocommunity.bars-and-lines.smartcolumn-nvim" },
{ import = "astrocommunity.bars-and-lines.vim-illuminate" },
@ -24,10 +28,12 @@ return {
{ import = "astrocommunity.programming-language-support.rest-nvim" },
{ import = "astrocommunity.completion.copilot-lua-cmp" },
{ import = "astrocommunity.diagnostics.trouble-nvim" },
{ import = "astrocommunity.project.project-nvim" },
{ import = "astrocommunity.colorscheme.vscode-nvim" },
{ import = "astrocommunity.colorscheme.github-nvim-theme" },
{ import = "astrocommunity.colorscheme.nord-nvim" },
{ import = "astrocommunity.colorscheme.nordic-nvim" },
{ import = "astrocommunity.colorscheme.iceberg-vim" },
}