From c34d4613bb1016f395762983d03a995477d5785d Mon Sep 17 00:00:00 2001 From: Elvis Claros Castro Date: Thu, 29 Feb 2024 14:09:14 -0300 Subject: Estable --- lua/alpha/completition/init.lua | 1 + lua/alpha/lsp/default.lua | 1 + lua/alpha/lsp/servers/python.lua | 16 ++++++++++++++++ lua/plugins/firenvim.lua | 10 ++++++++++ lua/plugins/nvim-python-repl.lua | 4 ++-- 5 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 lua/alpha/lsp/servers/python.lua create mode 100644 lua/plugins/firenvim.lua (limited to 'lua') diff --git a/lua/alpha/completition/init.lua b/lua/alpha/completition/init.lua index 61a3d1c..9933971 100644 --- a/lua/alpha/completition/init.lua +++ b/lua/alpha/completition/init.lua @@ -29,6 +29,7 @@ cmp.setup { end end, { "i", "s" }), [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.select_next_item(), [""] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Insert, select = true, diff --git a/lua/alpha/lsp/default.lua b/lua/alpha/lsp/default.lua index b436be5..e4bf24e 100644 --- a/lua/alpha/lsp/default.lua +++ b/lua/alpha/lsp/default.lua @@ -17,6 +17,7 @@ return { tsserver = { enable = true }, volar = { enable = true }, texlab = { enable = true, filetypes = {"tex", "bib"} }, + pyright = { enable = true, filetypes = {"python"} }, kotlin_language_server = { enable = true, filetypes = {"kotlin"}, root_dir = require("lspconfig.util").root_pattern("build.gradle.kts", "pom.xml", ".git") }, }, default_options = function (options) diff --git a/lua/alpha/lsp/servers/python.lua b/lua/alpha/lsp/servers/python.lua new file mode 100644 index 0000000..6cdbf9e --- /dev/null +++ b/lua/alpha/lsp/servers/python.lua @@ -0,0 +1,16 @@ +local lsp_attach = require "alpha.lsp.attach" +local lsp_flags = require "alpha.lsp.flags" +return function (ops) + return vim.tbl_extend("force", { + on_attach = lsp_attach, + flags = lsp_flags, + settings = { + ["pyright"] = { + disableOrganizeImports = false, + disableDiagnostics = false, + disableLanguageServices = false, + typeCheckingMode = "strict", + } + } + }, ops) +end diff --git a/lua/plugins/firenvim.lua b/lua/plugins/firenvim.lua new file mode 100644 index 0000000..0b69060 --- /dev/null +++ b/lua/plugins/firenvim.lua @@ -0,0 +1,10 @@ +return { + 'glacambre/firenvim', + + -- Lazy load firenvim + -- Explanation: https://github.com/folke/lazy.nvim/discussions/463#discussioncomment-4819297 + lazy = not vim.g.started_by_firenvim, + build = function() + vim.fn["firenvim#install"](0) + end +} diff --git a/lua/plugins/nvim-python-repl.lua b/lua/plugins/nvim-python-repl.lua index cfab1b6..f2952ed 100644 --- a/lua/plugins/nvim-python-repl.lua +++ b/lua/plugins/nvim-python-repl.lua @@ -5,8 +5,8 @@ return ft = {"python", "lua", "scala"}, config = function() require("nvim-python-repl").setup({ - execute_on_send = false, - vsplit = true, + execute_on_send = true, + vsplit = false, }) end } -- cgit v1.2.3