Mise à jour de la configuration avant migration vers astronvim 4.x

This commit is contained in:
Xavier Logerais 2024-05-17 15:31:45 +02:00
parent a5935068ab
commit 73890a9ca5
6 changed files with 82 additions and 35 deletions

View File

@ -6,11 +6,6 @@ vim.api.nvim_create_autocmd(
local utils = require("astronvim.utils") local utils = require("astronvim.utils")
utils.notify("Loading autocmd customizations for python files") utils.notify("Loading autocmd customizations for python files")
-- Vim settings
vim.opt_local.signcolumn = "auto"
vim.opt_local.foldcolumn = "auto"
-- Terminal settings -- Terminal settings
-- Define prefered options for the terminal -- Define prefered options for the terminal
@ -69,6 +64,24 @@ vim.api.nvim_create_autocmd(
-- "<cmd>TermExec name=python cmd='python %'<cr>", -- "<cmd>TermExec name=python cmd='python %'<cr>",
'<cmd>lua _Python_buffer_exec()<cr>', '<cmd>lua _Python_buffer_exec()<cr>',
{ noremap = true, silent = true }) { noremap = true, silent = true })
utils.notify("Type <F10> to toggle the python terminal")
utils.notify("Type Ctrl+<F10> to run current buffer in the python terminal")
-- DevDocs
require('nvim-devdocs').setup({
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
})
vim.keymap.set({ 'n', 'i', 'v' }, '<F1>', ':DevdocsOpen python-3.10<CR>', { buffer = true })
utils.notify("Type <F1> to access DevDocs documentation for python")
-- Vim settings
vim.opt_local.signcolumn = "auto"
vim.opt_local.foldcolumn = "auto"
end, end,
} }
) )

View File

@ -1,4 +1,13 @@
return { return {
lsp = {
formatting = {
disabled = {
"yq",
"yamllint",
"yamlls"
},
},
},
-- This function is run last and is a good place to configuring -- This function is run last and is a good place to configuring
-- augroups/autocommands and custom filetypes also this just pure lua so -- 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 -- anything that doesn't fit in the normal config locations above can go here

View File

@ -13,7 +13,7 @@ return {
{ import = "astrocommunity.pack.yaml" }, { import = "astrocommunity.pack.yaml" },
{ import = "astrocommunity.pack.toml" }, { import = "astrocommunity.pack.toml" },
{ import = "astrocommunity.pack.markdown" }, { import = "astrocommunity.pack.markdown" },
{ import = "astrocommunity.pack.ansible" }, -- { import = "astrocommunity.pack.ansible" },
{ import = "astrocommunity.pack.docker" }, { import = "astrocommunity.pack.docker" },
{ import = "astrocommunity.pack.helm" }, { import = "astrocommunity.pack.helm" },
{ import = "astrocommunity.pack.terraform" }, { import = "astrocommunity.pack.terraform" },
@ -24,10 +24,34 @@ return {
{ import = "astrocommunity.bars-and-lines.smartcolumn-nvim" }, { import = "astrocommunity.bars-and-lines.smartcolumn-nvim" },
{ import = "astrocommunity.bars-and-lines.vim-illuminate" }, { import = "astrocommunity.bars-and-lines.vim-illuminate" },
{ import = "astrocommunity.editing-support.todo-comments-nvim" },
{ import = "astrocommunity.programming-language-support.rest-nvim" },
{ import = "astrocommunity.completion.copilot-lua-cmp" }, { import = "astrocommunity.completion.copilot-lua-cmp" },
{ import = "astrocommunity.diagnostics.trouble-nvim" }, { import = "astrocommunity.diagnostics.trouble-nvim" },
{ import = "astrocommunity.editing-support.todo-comments-nvim" },
-- { import = "astrocommunity.editing-support.chatgpt-nvim" },
{ import = "astrocommunity.programming-language-support.rest-nvim" },
-- further customize the options set by the community
{
"rest-nvim/rest.nvim",
dependencies = { "luarocks.nvim" },
config = function()
require("rest-nvim").setup()
end,
},
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
local utils = require "astronvim.utils"
if opts.ensure_installed ~= "all" then
opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed,
{ "lua", "xml", "http", "json", "graphql" })
end
end,
},
{ import = "astrocommunity.project.project-nvim" }, { import = "astrocommunity.project.project-nvim" },
{ import = "astrocommunity.colorscheme.vscode-nvim" }, { import = "astrocommunity.colorscheme.vscode-nvim" },

View File

@ -1,11 +1,7 @@
-- Github Copilot -- Github Copilot official plugin
-- (Voir https://docs.github.com/fr/copilot/getting-started-with-github-copilot?tool=neovim)
-- Désactivé en faveur de la version communautaire (définie dans plugins/community.lua) -- Actuellement désactivé en faveur de la version communautaire (définie dans plugins/community.lua)
return {}
-- Official plugin
-- https://docs.github.com/fr/copilot/getting-started-with-github-copilot?tool=neovim
-- return { -- return {
-- { -- {
-- "github/copilot.vim", -- "github/copilot.vim",
@ -16,26 +12,16 @@ return {}
-- }, -- },
-- } -- }
-- } -- }
-- Exemple de configuration des touches -- Exemple de configuration des touches
-- imap <silent><script><expr> <C-J> copilot#Accept("\<CR>") -- imap <silent><script><expr> <C-J> copilot#Accept("\<CR>")
-- let g:copilot_no_tab_map = v:true -- let g:copilot_no_tab_map = v:true
-- Alternative plugin in pure lua -- Github Copilot Chat plugin
-- (Voir https://github.com/gptlang/CopilotChat.nvim)
-- https://github.com/zbirenbaum/copilot.lua return {
-- return { {
-- { "gptlang/CopilotChat.nvim",
-- "zbirenbaum/copilot.lua", lazy = false,
-- config = function() }
-- require("copilot").setup() }
-- end,
-- cmd = "Copilot",
-- event = "InsertEnter",
-- }
-- ,
-- -- {
-- -- "zbirenbaum/copilot-cmp",
-- -- config = function()
-- -- require("copilot_cmp").setup()
-- -- end
-- -- }

View File

@ -5,5 +5,7 @@ return {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
}, },
-- opts = {} opts = {
previewer_cmd = "glow", -- for example: "glow"
}
} }

View File

@ -1,4 +1,17 @@
return { return {
-- direnv -- direnv
{ "direnv/direnv.vim", lazy = false }, { "direnv/direnv.vim", lazy = false },
{
"vhyrro/luarocks.nvim",
priority = 1000,
config = true,
},
-- {
-- "rest-nvim/rest.nvim",
-- ft = "http",
-- dependencies = { "luarocks.nvim" },
-- config = function()
-- require("rest-nvim").setup()
-- end,
-- }
} }