diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/alpha/completition/init.lua | 1 | ||||
| -rw-r--r-- | lua/alpha/dap/configs/kotlin.lua | 18 | ||||
| -rw-r--r-- | lua/alpha/lsp/default.lua | 1 | ||||
| -rw-r--r-- | lua/alpha/lsp/servers/kotlin.lua | 1 | ||||
| -rw-r--r-- | lua/alpha/lsp/servers/kotlin_language_server.lua | 12 | ||||
| -rw-r--r-- | lua/alpha/lsp/servers/phpactor.lua | 4 | ||||
| -rw-r--r-- | lua/config/keymaps.lua | 1 | ||||
| -rw-r--r-- | lua/config/options.lua | 75 | ||||
| -rw-r--r-- | lua/plugins/completition.lua | 25 | ||||
| -rw-r--r-- | lua/plugins/flutter.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/lualine.lua | 4 | ||||
| -rw-r--r-- | lua/plugins/oil.lua | 10 |
12 files changed, 148 insertions, 6 deletions
diff --git a/lua/alpha/completition/init.lua b/lua/alpha/completition/init.lua index 92e1f91..61a3d1c 100644 --- a/lua/alpha/completition/init.lua +++ b/lua/alpha/completition/init.lua @@ -36,6 +36,7 @@ cmp.setup { ["<c-space>"] = cmp.mapping.complete(), }, sources = { + { name = "dictionary" }, { name = "nvim_lua" }, { name = "nvim_lsp" }, { name = "path" }, diff --git a/lua/alpha/dap/configs/kotlin.lua b/lua/alpha/dap/configs/kotlin.lua new file mode 100644 index 0000000..aa486db --- /dev/null +++ b/lua/alpha/dap/configs/kotlin.lua @@ -0,0 +1,18 @@ +local dap = require('dap') + +dap.adapters.kotlin = { + type = 'executable'; + command = "kotlin-debug-adapter"; +} + +dap.configurations.kotlin = { + { + type = 'kotlin', + request = 'launch', + program = "${file}", + name = 'Launch kotlin program', + projectRoot = "${workspaceFolder}/app", + mainClass = "AppKt", + } +} +dap.defaults.kotlin.auto_continue_if_many_stopped = false diff --git a/lua/alpha/lsp/default.lua b/lua/alpha/lsp/default.lua index 639282d..b436be5 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"} }, + kotlin_language_server = { enable = true, filetypes = {"kotlin"}, root_dir = require("lspconfig.util").root_pattern("build.gradle.kts", "pom.xml", ".git") }, }, default_options = function (options) return vim.tbl_deep_extend("force", { diff --git a/lua/alpha/lsp/servers/kotlin.lua b/lua/alpha/lsp/servers/kotlin.lua new file mode 100644 index 0000000..39cdd0d --- /dev/null +++ b/lua/alpha/lsp/servers/kotlin.lua @@ -0,0 +1 @@ +- diff --git a/lua/alpha/lsp/servers/kotlin_language_server.lua b/lua/alpha/lsp/servers/kotlin_language_server.lua new file mode 100644 index 0000000..2a02f7d --- /dev/null +++ b/lua/alpha/lsp/servers/kotlin_language_server.lua @@ -0,0 +1,12 @@ +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 = { + ["kotlin-language-server"] = { + } + } + }, ops) +end diff --git a/lua/alpha/lsp/servers/phpactor.lua b/lua/alpha/lsp/servers/phpactor.lua index e6bebcd..ab5d21d 100644 --- a/lua/alpha/lsp/servers/phpactor.lua +++ b/lua/alpha/lsp/servers/phpactor.lua @@ -45,7 +45,7 @@ local function phpactor_attach(_, bufnr) table.insert(out, match) end - vim.api.nvim_buf_set_option(popup.bufnr, "filetype", "markdown") + -- vim.api.nvim_buf_set_option(popup.bufnr, "filetype", "markdown") vim.api.nvim_buf_set_lines(popup.bufnr, 0, 1, false, out) end, {}) end @@ -61,7 +61,7 @@ return function(ops) init_options = { ["language_server_worse_reflection.inlay_hints.enable"] = true, ["language_server_worse_reflection.inlay_hints.params"] = true, - -- ["language_server_worse_reflection.inlay_hints.types"] = true, + ["language_server_worse_reflection.inlay_hints.types"] = true, ["language_server_configuration.auto_config"] = false, ["code_transform.import_globals"] = true, ["language_server_phpstan.enabled"] = true, diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 3013d65..cf70ef0 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -81,3 +81,4 @@ map("n", "<leader>vi", function() require('nvim-python-repl').toggle_vertical() map("n", "<leader>rl",function() require('rust-tools').inlay_hints.enable() end, {desc = "Enable inlay hints auto update and set them for all the buffers"}) map("n", "<leader>rdl",function() require('rust-tools').inlay_hints.disable() end, {desc = "Disable inlay hints auto update and unset them for all buffers"}) map("n", "<leader>rrn", function () require('rust-tools').runnables.runnables() end, {desc = "run rust"}) +map("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" }) diff --git a/lua/config/options.lua b/lua/config/options.lua index c6449c6..de3b12f 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -1,43 +1,116 @@ +-- Establece el "mapleader" como un espacio en blanco para atajos de teclado personalizados. vim.g.mapleader = " " + +-- Configura el sistema de snippets para utilizar "luasnip". vim.g.snippets = "luasnip" +-- Configuración de opciones globales local opt = vim.o +-- Desactiva el soporte del mouse. opt.mouse = "" + +-- Muestra el número de líneas actual. opt.number = true + +-- Muestra números relativos. opt.relativenumber = true + +-- Muestra texto oculto con "conceal" en el nivel 3. opt.conceallevel = 3 + +-- Permite cambiar entre buffers sin guardar. opt.hidden = true + +-- Utiliza espacios en lugar de tabuladores para la indentación. opt.expandtab = true + +-- Configura el ancho de la tabulación y la indentación. opt.tabstop = 4 opt.softtabstop = 4 opt.shiftwidth = 4 + +-- Habilita el autoindentado. opt.smartindent = true + +-- Desactiva las campanas de error. opt.errorbells = false + +-- Habilita el ajuste de línea. opt.wrap = true + +-- Habilita el corrector ortográfico. opt.spell = true -opt.spelllang = "en_us,es" + +-- Establece los idiomas para el corrector ortográfico. +opt.spelllang = "en_us,es_es,es" + +-- Desactiva la creación de archivos de intercambio. opt.swapfile = false + +-- Habilita la persistencia de archivos undofile. opt.undofile = true + +-- Establece la ubicación del directorio para los archivos undofile. opt.undodir = os.getenv "HOME" .. "/.cache/nvim/undodir" + +-- Desactiva el resaltado de búsqueda. opt.hlsearch = false + +-- Activa la búsqueda incremental. opt.incsearch = true + +-- Ignora mayúsculas y minúsculas en las búsquedas. opt.ignorecase = true + +-- Utiliza mayúsculas y minúsculas en las búsquedas según sea necesario. opt.smartcase = true + +-- Habilita los colores en la interfaz de terminal. opt.termguicolors = true + +-- Configura el desplazamiento vertical cuando se acerca al límite de la ventana. opt.scrolloff = 4 + +-- Configura el desplazamiento lateral cuando se acerca al límite de la ventana. opt.sidescrolloff = 4 + +-- Desactiva la visualización del modo actual. opt.showmode = false + +-- Usa el portapapeles del sistema. opt.clipboard = "unnamedplus" + +-- Abre nuevas ventanas abajo y a la derecha por defecto. opt.splitbelow = true opt.splitright = true + +-- Guarda automáticamente los archivos antes de cambiar a otra ventana o salir. opt.autowrite = true + +-- Muestra caracteres especiales (como espacios y tabuladores) de manera visible. opt.list = true + +-- Configura los caracteres especiales que se muestran con opt.list. opt.listchars = "tab:\\ ,trail:-" + +-- Siempre muestra la línea de estado. opt.laststatus = 3 + +-- Configura la altura del área de comandos. opt.cmdheight = 1 + +-- Establece el tiempo de actualización en milisegundos. opt.updatetime = 50 + +-- Muestra la columna de signos. opt.signcolumn = "yes" + +-- No ajusta automáticamente el tamaño de las ventanas divididas. opt.equalalways = false + +-- Mantiene la pantalla dividida visible. opt.splitkeep = "screen" + +-- Configura los mensajes cortos. opt.shortmess = "filnxtToOFWIcC" diff --git a/lua/plugins/completition.lua b/lua/plugins/completition.lua index 795b016..b659fb7 100644 --- a/lua/plugins/completition.lua +++ b/lua/plugins/completition.lua @@ -24,6 +24,31 @@ return { }, config = true, }, + { + "uga-rosa/cmp-dictionary", + config = function() + local dict = require("cmp_dictionary") + + dict.setup({ + -- The following are default values. + exact = 2, + first_case_insensitive = false, + document = false, + document_command = "wn %s -over", + sqlite = false, + max_items = -1, + capacity = 5, + debug = false, + }) + + dict.switcher({ + spelllang = { + es = "./../../spell/dic_es.dict", + }, + }) + end, + }, + }, event = "VeryLazy", config = function() diff --git a/lua/plugins/flutter.lua b/lua/plugins/flutter.lua index 9d83940..91cabad 100644 --- a/lua/plugins/flutter.lua +++ b/lua/plugins/flutter.lua @@ -1,7 +1,7 @@ return { 'akinsho/flutter-tools.nvim', - lazy = false, + lazy = true, filetype = 'dart', dependencies = { 'nvim-lua/plenary.nvim', diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 3147f5a..e4c3b4a 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -33,7 +33,7 @@ return { winbar = { lualine_a = {}, lualine_b = {}, - lualine_c = { "filename" }, + lualine_c = {}, lualine_x = {}, lualine_y = {}, lualine_z = {}, @@ -41,7 +41,7 @@ return { inactive_winbar = { lualine_a = {}, lualine_b = {}, - lualine_c = { "filename" }, + lualine_c = { {"filename", file_status = true, path = 1} }, lualine_x = {}, lualine_y = {}, lualine_z = {}, diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua new file mode 100644 index 0000000..4d0968b --- /dev/null +++ b/lua/plugins/oil.lua @@ -0,0 +1,10 @@ +return +{ + 'stevearc/oil.nvim', + opts = {}, + -- Optional dependencies + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function () + require('oil').setup() + end, +} |