From 73890a9ca557c69c0ac425384288ba7760b0ac33 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Fri, 17 May 2024 15:31:45 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20la=20configuration?= =?UTF-8?q?=20avant=20migration=20vers=20astronvim=204.x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/user/autocmds/python.lua | 23 +++++++++++++++----- lua/user/init.lua | 9 ++++++++ lua/user/plugins/community.lua | 30 ++++++++++++++++++++++++--- lua/user/plugins/copilot.lua | 38 +++++++++++----------------------- lua/user/plugins/devdocs.lua | 4 +++- lua/user/plugins/others.lua | 13 ++++++++++++ 6 files changed, 82 insertions(+), 35 deletions(-) diff --git a/lua/user/autocmds/python.lua b/lua/user/autocmds/python.lua index c3be502..2a6a539 100644 --- a/lua/user/autocmds/python.lua +++ b/lua/user/autocmds/python.lua @@ -6,11 +6,6 @@ vim.api.nvim_create_autocmd( local utils = require("astronvim.utils") utils.notify("Loading autocmd customizations for python files") - -- Vim settings - - vim.opt_local.signcolumn = "auto" - vim.opt_local.foldcolumn = "auto" - -- Terminal settings -- Define prefered options for the terminal @@ -69,6 +64,24 @@ vim.api.nvim_create_autocmd( -- "TermExec name=python cmd='python %'", 'lua _Python_buffer_exec()', { noremap = true, silent = true }) + + utils.notify("Type to toggle the python terminal") + utils.notify("Type Ctrl+ 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' }, '', ':DevdocsOpen python-3.10', { buffer = true }) + + utils.notify("Type to access DevDocs documentation for python") + + -- Vim settings + + vim.opt_local.signcolumn = "auto" + vim.opt_local.foldcolumn = "auto" end, } ) diff --git a/lua/user/init.lua b/lua/user/init.lua index 2c38f15..9cb236f 100644 --- a/lua/user/init.lua +++ b/lua/user/init.lua @@ -1,4 +1,13 @@ return { + lsp = { + formatting = { + disabled = { + "yq", + "yamllint", + "yamlls" + }, + }, + }, -- 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 diff --git a/lua/user/plugins/community.lua b/lua/user/plugins/community.lua index 29bb9e7..82fdb55 100644 --- a/lua/user/plugins/community.lua +++ b/lua/user/plugins/community.lua @@ -13,7 +13,7 @@ return { { import = "astrocommunity.pack.yaml" }, { import = "astrocommunity.pack.toml" }, { import = "astrocommunity.pack.markdown" }, - { import = "astrocommunity.pack.ansible" }, + -- { import = "astrocommunity.pack.ansible" }, { import = "astrocommunity.pack.docker" }, { import = "astrocommunity.pack.helm" }, { import = "astrocommunity.pack.terraform" }, @@ -24,10 +24,34 @@ return { { import = "astrocommunity.bars-and-lines.smartcolumn-nvim" }, { 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.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.colorscheme.vscode-nvim" }, diff --git a/lua/user/plugins/copilot.lua b/lua/user/plugins/copilot.lua index edb5cb9..8c6c5ca 100644 --- a/lua/user/plugins/copilot.lua +++ b/lua/user/plugins/copilot.lua @@ -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) -return {} - --- Official plugin - --- https://docs.github.com/fr/copilot/getting-started-with-github-copilot?tool=neovim +-- Actuellement désactivé en faveur de la version communautaire (définie dans plugins/community.lua) -- return { -- { -- "github/copilot.vim", @@ -16,26 +12,16 @@ return {} -- }, -- } -- } + -- Exemple de configuration des touches -- imap