diff --git a/config/nvim/lua/aleidk/IDE/init.lua b/config/nvim/lua/aleidk/IDE/init.lua index 9d905cf..3b6291b 100644 --- a/config/nvim/lua/aleidk/IDE/init.lua +++ b/config/nvim/lua/aleidk/IDE/init.lua @@ -1,2 +1,3 @@ require("aleidk.IDE.lsp") require("aleidk.IDE.completion") +require("aleidk.IDE.null-ls") diff --git a/config/nvim/lua/aleidk/IDE/lsp.lua b/config/nvim/lua/aleidk/IDE/lsp.lua index 4d33be2..42b716f 100644 --- a/config/nvim/lua/aleidk/IDE/lsp.lua +++ b/config/nvim/lua/aleidk/IDE/lsp.lua @@ -49,12 +49,16 @@ end -- Add any additional override configuration in the following tables. They will be passed to -- the `settings` field of the server config. You must look up that documentation yourself. local servers = { - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, - -- rust_analyzer = {}, - -- tsserver = {}, - + bashls = {}, + cssls = {}, + dockerls = {}, + emmet_ls = {}, + html = {}, + pyright = {}, + rust_analyzer = {}, + sqlls = {}, + tsserver = {}, + yamlls = {}, lua_ls = { Lua = { workspace = { checkThirdParty = false }, diff --git a/config/nvim/lua/aleidk/IDE/null-ls.lua b/config/nvim/lua/aleidk/IDE/null-ls.lua new file mode 100644 index 0000000..28f1981 --- /dev/null +++ b/config/nvim/lua/aleidk/IDE/null-ls.lua @@ -0,0 +1,38 @@ +-- Linter and formatter configuration + +require("mason-null-ls").setup({ + handlers = {}, -- this make mason-null-ls to auto setup handlers + ensure_installed = { + "blade_formatter", + "blue", + "eslint_d", + "fixjson", + "gitlint", + "intelephense", + "markdownlint", + "php-cs-fixer", + "prettierd", + "shellcheck", + "shfmt", + "sql-formatter", + "stylua", + "yamlint", + }, +}) + +local null_ls = require("null-ls.builtins") + +require("null-ls").setup({ + sources = { + null_ls.formatting.prettierd.with({ + disabled_filetypes = { "markdown" }, + }), + + null_ls.formatting.phpcsfixer.with({ + extra_args = { + "--config", + "$HOME/.config/php-cs-fixer-conf.php", + }, + }), + }, +}) diff --git a/config/nvim/lua/aleidk/plugins/colorscheme.lua b/config/nvim/lua/aleidk/plugins/colorscheme.lua index eaf0d06..bd10ca9 100644 --- a/config/nvim/lua/aleidk/plugins/colorscheme.lua +++ b/config/nvim/lua/aleidk/plugins/colorscheme.lua @@ -1,30 +1,32 @@ -local colorscheme = "rose-pine" +local colorscheme = "onedark" + return { - "rose-pine/neovim", - name = colorscheme, + "olimorris/onedarkpro.nvim", priority = 1000, - config = function(_, opts) - require(colorscheme).setup(opts) - vim.cmd.colorscheme(colorscheme) - end, opts = { - --- @usage 'auto'|'main'|'moon'|'dawn' - variant = "moon", - --- @usage 'main'|'moon'|'dawn' - dark_variant = "moon", - --- @usage string hex value or named color from rosepinetheme.com/palette - groups = { - background = "none", + options = { + transparency = true, -- Use a transparentbackground? }, - -- Change specific vim highlight groups - -- https://github.com/rose-pine/neovim/wiki/Recipes - highlight_groups = { - TelescopeBorder = { fg = "highlight_high", bg = "none" }, - TelescopeNormal = { bg = "none" }, - TelescopePromptNormal = { bg = "base" }, - TelescopeResultsNormal = { fg = "subtle", bg = "none" }, - TelescopeSelection = { fg = "text", bg = "base" }, - TelescopeSelectionCaret = { fg = "rose", bg = "rose" }, + colors = { + bg = "#000000", + fg = "#abb2bf", + red = "#ef596f", + orange = "#fab387", + yellow = "#e5c07b", + green = "#89ca78", + cyan = "#2bbac5", + blue = "#61afef", + purple = "#d55fde", + white = "#abb2bf", + black = "#000000", + gray = "#434852", + highlight = "#e2be7d", + comment = "#7f848e", + none = "NONE", }, }, + config = function(_, opts) + require("onedarkpro").setup(opts) + vim.cmd.colorscheme(colorscheme) + end, } diff --git a/config/nvim/lua/aleidk/plugins/init.lua b/config/nvim/lua/aleidk/plugins/init.lua index d82aa80..fda9c80 100644 --- a/config/nvim/lua/aleidk/plugins/init.lua +++ b/config/nvim/lua/aleidk/plugins/init.lua @@ -31,6 +31,15 @@ return { dependencies = { "hrsh7th/cmp-nvim-lsp", "L3MON4D3/LuaSnip", "saadparwaiz1/cmp_luasnip" }, }, + { + "jay-babu/mason-null-ls.nvim", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + "williamboman/mason.nvim", + "jose-elias-alvarez/null-ls.nvim", + }, + }, + { -- Useful plugin to show you pending keybinds. "folke/which-key.nvim", diff --git a/config/nvim/lua/aleidk/plugins/lsp_signature.lua b/config/nvim/lua/aleidk/plugins/lsp_signature.lua new file mode 100644 index 0000000..dc2e03a --- /dev/null +++ b/config/nvim/lua/aleidk/plugins/lsp_signature.lua @@ -0,0 +1,14 @@ +return { + "ray-x/lsp_signature.nvim", + lazy = false, -- Doesn't work if lazy loaded + opts = { + hint_enable = false, + }, + keys = { + { + "lk", + vim.lsp.buf.signature_help, + desc = "Toggle signature", + }, + }, +} diff --git a/config/nvim/lua/aleidk/plugins/nvim-spider.lua b/config/nvim/lua/aleidk/plugins/nvim-spider.lua new file mode 100644 index 0000000..2b5b634 --- /dev/null +++ b/config/nvim/lua/aleidk/plugins/nvim-spider.lua @@ -0,0 +1,13 @@ +return { + "chrisgrieser/nvim-spider", + event = "VeryLazy", + config = function() + require("spider").setup({ + skipInsignificantPunctuation = false, + }) + vim.keymap.set({ "n", "o", "x" }, "w", "lua require('spider').motion('w')", { desc = "Spider-w" }) + vim.keymap.set({ "n", "o", "x" }, "e", "lua require('spider').motion('e')", { desc = "Spider-e" }) + vim.keymap.set({ "n", "o", "x" }, "b", "lua require('spider').motion('b')", { desc = "Spider-b" }) + vim.keymap.set({ "n", "o", "x" }, "ge", "lua require('spider').motion('ge')", { desc = "Spider-ge" }) + end, +}