diff --git a/init.lua b/init.lua index 6081348..7328a90 100644 --- a/init.lua +++ b/init.lua @@ -1,17 +1,16 @@ -- LAZY PKG MGR -- local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) require("vim-options") require("lazy").setup("plugins") - diff --git a/init.lua b/init.lua index 6081348..7328a90 100644 --- a/init.lua +++ b/init.lua @@ -1,17 +1,16 @@ -- LAZY PKG MGR -- local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) require("vim-options") require("lazy").setup("plugins") - diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua index 5685ffe..48a2454 100644 --- a/lua/plugins/lsp-config.lua +++ b/lua/plugins/lsp-config.lua @@ -1,40 +1,40 @@ return { - { - "williamboman/mason.nvim", - config = function() - require("mason").setup() - end, - }, - { - "williamboman/mason-lspconfig.nvim", - config = function() - require("mason-lspconfig").setup({ - ensure_installed = { - "bashls", -- bash - "jsonls", -- json - "lua_ls", -- lua - "lemminx", -- xml - "pyright", -- python - "yamlls", -- yaml - } - }) - end, - }, - { - "neovim/nvim-lspconfig", - config = function() - local lspconfig = require("lspconfig") + { + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end, + }, + { + "williamboman/mason-lspconfig.nvim", + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { + "bashls", -- bash + "jsonls", -- json + "lua_ls", -- lua + "lemminx", -- xml + "pyright", -- python + "yamlls", -- yaml + }, + }) + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + local lspconfig = require("lspconfig") - lspconfig.bashls.setup({}) - lspconfig.jsonls.setup({}) - lspconfig.lua_ls.setup({}) - lspconfig.lemminx.setup({}) - lspconfig.pyright.setup({}) - lspconfig.yamlls.setup({}) + lspconfig.bashls.setup({}) + lspconfig.jsonls.setup({}) + lspconfig.lua_ls.setup({}) + lspconfig.lemminx.setup({}) + lspconfig.pyright.setup({}) + lspconfig.yamlls.setup({}) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) - vim.keymap.set({ 'n' }, 'ca', vim.lsp.buf.code_action, {}) - end, - } + vim.keymap.set("n", "K", vim.lsp.buf.hover, {}) + vim.keymap.set("n", "gd", vim.lsp.buf.definition, {}) + vim.keymap.set("n", "ca", vim.lsp.buf.code_action, {}) + end, + }, } diff --git a/init.lua b/init.lua index 6081348..7328a90 100644 --- a/init.lua +++ b/init.lua @@ -1,17 +1,16 @@ -- LAZY PKG MGR -- local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) require("vim-options") require("lazy").setup("plugins") - diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua index 5685ffe..48a2454 100644 --- a/lua/plugins/lsp-config.lua +++ b/lua/plugins/lsp-config.lua @@ -1,40 +1,40 @@ return { - { - "williamboman/mason.nvim", - config = function() - require("mason").setup() - end, - }, - { - "williamboman/mason-lspconfig.nvim", - config = function() - require("mason-lspconfig").setup({ - ensure_installed = { - "bashls", -- bash - "jsonls", -- json - "lua_ls", -- lua - "lemminx", -- xml - "pyright", -- python - "yamlls", -- yaml - } - }) - end, - }, - { - "neovim/nvim-lspconfig", - config = function() - local lspconfig = require("lspconfig") + { + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end, + }, + { + "williamboman/mason-lspconfig.nvim", + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { + "bashls", -- bash + "jsonls", -- json + "lua_ls", -- lua + "lemminx", -- xml + "pyright", -- python + "yamlls", -- yaml + }, + }) + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + local lspconfig = require("lspconfig") - lspconfig.bashls.setup({}) - lspconfig.jsonls.setup({}) - lspconfig.lua_ls.setup({}) - lspconfig.lemminx.setup({}) - lspconfig.pyright.setup({}) - lspconfig.yamlls.setup({}) + lspconfig.bashls.setup({}) + lspconfig.jsonls.setup({}) + lspconfig.lua_ls.setup({}) + lspconfig.lemminx.setup({}) + lspconfig.pyright.setup({}) + lspconfig.yamlls.setup({}) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) - vim.keymap.set({ 'n' }, 'ca', vim.lsp.buf.code_action, {}) - end, - } + vim.keymap.set("n", "K", vim.lsp.buf.hover, {}) + vim.keymap.set("n", "gd", vim.lsp.buf.definition, {}) + vim.keymap.set("n", "ca", vim.lsp.buf.code_action, {}) + end, + }, } diff --git a/lua/plugins/lua-line.lua b/lua/plugins/lua-line.lua index 1e901d8..3d63d65 100644 --- a/lua/plugins/lua-line.lua +++ b/lua/plugins/lua-line.lua @@ -1,11 +1,11 @@ return { - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() - require("lualine").setup({ - options = { - theme = "codedark" - } - }) - end, + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("lualine").setup({ + options = { + theme = "codedark", + }, + }) + end, } diff --git a/init.lua b/init.lua index 6081348..7328a90 100644 --- a/init.lua +++ b/init.lua @@ -1,17 +1,16 @@ -- LAZY PKG MGR -- local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) require("vim-options") require("lazy").setup("plugins") - diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua index 5685ffe..48a2454 100644 --- a/lua/plugins/lsp-config.lua +++ b/lua/plugins/lsp-config.lua @@ -1,40 +1,40 @@ return { - { - "williamboman/mason.nvim", - config = function() - require("mason").setup() - end, - }, - { - "williamboman/mason-lspconfig.nvim", - config = function() - require("mason-lspconfig").setup({ - ensure_installed = { - "bashls", -- bash - "jsonls", -- json - "lua_ls", -- lua - "lemminx", -- xml - "pyright", -- python - "yamlls", -- yaml - } - }) - end, - }, - { - "neovim/nvim-lspconfig", - config = function() - local lspconfig = require("lspconfig") + { + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end, + }, + { + "williamboman/mason-lspconfig.nvim", + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { + "bashls", -- bash + "jsonls", -- json + "lua_ls", -- lua + "lemminx", -- xml + "pyright", -- python + "yamlls", -- yaml + }, + }) + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + local lspconfig = require("lspconfig") - lspconfig.bashls.setup({}) - lspconfig.jsonls.setup({}) - lspconfig.lua_ls.setup({}) - lspconfig.lemminx.setup({}) - lspconfig.pyright.setup({}) - lspconfig.yamlls.setup({}) + lspconfig.bashls.setup({}) + lspconfig.jsonls.setup({}) + lspconfig.lua_ls.setup({}) + lspconfig.lemminx.setup({}) + lspconfig.pyright.setup({}) + lspconfig.yamlls.setup({}) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) - vim.keymap.set({ 'n' }, 'ca', vim.lsp.buf.code_action, {}) - end, - } + vim.keymap.set("n", "K", vim.lsp.buf.hover, {}) + vim.keymap.set("n", "gd", vim.lsp.buf.definition, {}) + vim.keymap.set("n", "ca", vim.lsp.buf.code_action, {}) + end, + }, } diff --git a/lua/plugins/lua-line.lua b/lua/plugins/lua-line.lua index 1e901d8..3d63d65 100644 --- a/lua/plugins/lua-line.lua +++ b/lua/plugins/lua-line.lua @@ -1,11 +1,11 @@ return { - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() - require("lualine").setup({ - options = { - theme = "codedark" - } - }) - end, + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("lualine").setup({ + options = { + theme = "codedark", + }, + }) + end, } diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 8c7c50f..c6e2216 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -1,12 +1,12 @@ return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - config = function() - vim.keymap.set('n', '', ':Neotree filesystem reveal left', {}) - end, + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + }, + config = function() + vim.keymap.set("n", "", ":Neotree filesystem reveal left", {}) + end, } diff --git a/init.lua b/init.lua index 6081348..7328a90 100644 --- a/init.lua +++ b/init.lua @@ -1,17 +1,16 @@ -- LAZY PKG MGR -- local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) require("vim-options") require("lazy").setup("plugins") - diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua index 5685ffe..48a2454 100644 --- a/lua/plugins/lsp-config.lua +++ b/lua/plugins/lsp-config.lua @@ -1,40 +1,40 @@ return { - { - "williamboman/mason.nvim", - config = function() - require("mason").setup() - end, - }, - { - "williamboman/mason-lspconfig.nvim", - config = function() - require("mason-lspconfig").setup({ - ensure_installed = { - "bashls", -- bash - "jsonls", -- json - "lua_ls", -- lua - "lemminx", -- xml - "pyright", -- python - "yamlls", -- yaml - } - }) - end, - }, - { - "neovim/nvim-lspconfig", - config = function() - local lspconfig = require("lspconfig") + { + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end, + }, + { + "williamboman/mason-lspconfig.nvim", + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { + "bashls", -- bash + "jsonls", -- json + "lua_ls", -- lua + "lemminx", -- xml + "pyright", -- python + "yamlls", -- yaml + }, + }) + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + local lspconfig = require("lspconfig") - lspconfig.bashls.setup({}) - lspconfig.jsonls.setup({}) - lspconfig.lua_ls.setup({}) - lspconfig.lemminx.setup({}) - lspconfig.pyright.setup({}) - lspconfig.yamlls.setup({}) + lspconfig.bashls.setup({}) + lspconfig.jsonls.setup({}) + lspconfig.lua_ls.setup({}) + lspconfig.lemminx.setup({}) + lspconfig.pyright.setup({}) + lspconfig.yamlls.setup({}) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) - vim.keymap.set({ 'n' }, 'ca', vim.lsp.buf.code_action, {}) - end, - } + vim.keymap.set("n", "K", vim.lsp.buf.hover, {}) + vim.keymap.set("n", "gd", vim.lsp.buf.definition, {}) + vim.keymap.set("n", "ca", vim.lsp.buf.code_action, {}) + end, + }, } diff --git a/lua/plugins/lua-line.lua b/lua/plugins/lua-line.lua index 1e901d8..3d63d65 100644 --- a/lua/plugins/lua-line.lua +++ b/lua/plugins/lua-line.lua @@ -1,11 +1,11 @@ return { - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() - require("lualine").setup({ - options = { - theme = "codedark" - } - }) - end, + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("lualine").setup({ + options = { + theme = "codedark", + }, + }) + end, } diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 8c7c50f..c6e2216 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -1,12 +1,12 @@ return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - config = function() - vim.keymap.set('n', '', ':Neotree filesystem reveal left', {}) - end, + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + }, + config = function() + vim.keymap.set("n", "", ":Neotree filesystem reveal left", {}) + end, } diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua new file mode 100644 index 0000000..8114aae --- /dev/null +++ b/lua/plugins/none-ls.lua @@ -0,0 +1,14 @@ +return { + "nvimtools/none-ls.nvim", + config = function() + local null_ls = require("null-ls") + null_ls.setup({ + sources = { + null_ls.builtins.formatting.beautysh, + null_ls.builtins.formatting.black, + null_ls.builtins.formatting.stylua, + } + }) + vim.keymap.set("n", "gf", vim.lsp.buf.format, {}) + end, +} diff --git a/init.lua b/init.lua index 6081348..7328a90 100644 --- a/init.lua +++ b/init.lua @@ -1,17 +1,16 @@ -- LAZY PKG MGR -- local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) require("vim-options") require("lazy").setup("plugins") - diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua index 5685ffe..48a2454 100644 --- a/lua/plugins/lsp-config.lua +++ b/lua/plugins/lsp-config.lua @@ -1,40 +1,40 @@ return { - { - "williamboman/mason.nvim", - config = function() - require("mason").setup() - end, - }, - { - "williamboman/mason-lspconfig.nvim", - config = function() - require("mason-lspconfig").setup({ - ensure_installed = { - "bashls", -- bash - "jsonls", -- json - "lua_ls", -- lua - "lemminx", -- xml - "pyright", -- python - "yamlls", -- yaml - } - }) - end, - }, - { - "neovim/nvim-lspconfig", - config = function() - local lspconfig = require("lspconfig") + { + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end, + }, + { + "williamboman/mason-lspconfig.nvim", + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { + "bashls", -- bash + "jsonls", -- json + "lua_ls", -- lua + "lemminx", -- xml + "pyright", -- python + "yamlls", -- yaml + }, + }) + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + local lspconfig = require("lspconfig") - lspconfig.bashls.setup({}) - lspconfig.jsonls.setup({}) - lspconfig.lua_ls.setup({}) - lspconfig.lemminx.setup({}) - lspconfig.pyright.setup({}) - lspconfig.yamlls.setup({}) + lspconfig.bashls.setup({}) + lspconfig.jsonls.setup({}) + lspconfig.lua_ls.setup({}) + lspconfig.lemminx.setup({}) + lspconfig.pyright.setup({}) + lspconfig.yamlls.setup({}) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) - vim.keymap.set({ 'n' }, 'ca', vim.lsp.buf.code_action, {}) - end, - } + vim.keymap.set("n", "K", vim.lsp.buf.hover, {}) + vim.keymap.set("n", "gd", vim.lsp.buf.definition, {}) + vim.keymap.set("n", "ca", vim.lsp.buf.code_action, {}) + end, + }, } diff --git a/lua/plugins/lua-line.lua b/lua/plugins/lua-line.lua index 1e901d8..3d63d65 100644 --- a/lua/plugins/lua-line.lua +++ b/lua/plugins/lua-line.lua @@ -1,11 +1,11 @@ return { - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() - require("lualine").setup({ - options = { - theme = "codedark" - } - }) - end, + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("lualine").setup({ + options = { + theme = "codedark", + }, + }) + end, } diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 8c7c50f..c6e2216 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -1,12 +1,12 @@ return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - config = function() - vim.keymap.set('n', '', ':Neotree filesystem reveal left', {}) - end, + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + }, + config = function() + vim.keymap.set("n", "", ":Neotree filesystem reveal left", {}) + end, } diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua new file mode 100644 index 0000000..8114aae --- /dev/null +++ b/lua/plugins/none-ls.lua @@ -0,0 +1,14 @@ +return { + "nvimtools/none-ls.nvim", + config = function() + local null_ls = require("null-ls") + null_ls.setup({ + sources = { + null_ls.builtins.formatting.beautysh, + null_ls.builtins.formatting.black, + null_ls.builtins.formatting.stylua, + } + }) + vim.keymap.set("n", "gf", vim.lsp.buf.format, {}) + end, +} diff --git a/lua/plugins/nvim-treesitter.lua b/lua/plugins/nvim-treesitter.lua index 6ac26bf..79ae9c1 100644 --- a/lua/plugins/nvim-treesitter.lua +++ b/lua/plugins/nvim-treesitter.lua @@ -1,26 +1,13 @@ return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - config = function () - local configs = require("nvim-treesitter.configs") + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + local configs = require("nvim-treesitter.configs") - configs.setup({ - ensure_installed = { - "bash", - "git_config", - "git_rebase", - "gitattributes", - "gitcommit", - "gitignore", - "ini", - "lua", - "markdown", - "python", - "vim", - "xml", - "yaml" }, - highlight = { enable = true }, - indent = { enable = true }, - }) - end, + configs.setup({ + auto_install = true, + highlight = { enable = true }, + indent = { enable = true }, + }) + end, } diff --git a/init.lua b/init.lua index 6081348..7328a90 100644 --- a/init.lua +++ b/init.lua @@ -1,17 +1,16 @@ -- LAZY PKG MGR -- local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) require("vim-options") require("lazy").setup("plugins") - diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua index 5685ffe..48a2454 100644 --- a/lua/plugins/lsp-config.lua +++ b/lua/plugins/lsp-config.lua @@ -1,40 +1,40 @@ return { - { - "williamboman/mason.nvim", - config = function() - require("mason").setup() - end, - }, - { - "williamboman/mason-lspconfig.nvim", - config = function() - require("mason-lspconfig").setup({ - ensure_installed = { - "bashls", -- bash - "jsonls", -- json - "lua_ls", -- lua - "lemminx", -- xml - "pyright", -- python - "yamlls", -- yaml - } - }) - end, - }, - { - "neovim/nvim-lspconfig", - config = function() - local lspconfig = require("lspconfig") + { + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end, + }, + { + "williamboman/mason-lspconfig.nvim", + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { + "bashls", -- bash + "jsonls", -- json + "lua_ls", -- lua + "lemminx", -- xml + "pyright", -- python + "yamlls", -- yaml + }, + }) + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + local lspconfig = require("lspconfig") - lspconfig.bashls.setup({}) - lspconfig.jsonls.setup({}) - lspconfig.lua_ls.setup({}) - lspconfig.lemminx.setup({}) - lspconfig.pyright.setup({}) - lspconfig.yamlls.setup({}) + lspconfig.bashls.setup({}) + lspconfig.jsonls.setup({}) + lspconfig.lua_ls.setup({}) + lspconfig.lemminx.setup({}) + lspconfig.pyright.setup({}) + lspconfig.yamlls.setup({}) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) - vim.keymap.set({ 'n' }, 'ca', vim.lsp.buf.code_action, {}) - end, - } + vim.keymap.set("n", "K", vim.lsp.buf.hover, {}) + vim.keymap.set("n", "gd", vim.lsp.buf.definition, {}) + vim.keymap.set("n", "ca", vim.lsp.buf.code_action, {}) + end, + }, } diff --git a/lua/plugins/lua-line.lua b/lua/plugins/lua-line.lua index 1e901d8..3d63d65 100644 --- a/lua/plugins/lua-line.lua +++ b/lua/plugins/lua-line.lua @@ -1,11 +1,11 @@ return { - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() - require("lualine").setup({ - options = { - theme = "codedark" - } - }) - end, + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("lualine").setup({ + options = { + theme = "codedark", + }, + }) + end, } diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 8c7c50f..c6e2216 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -1,12 +1,12 @@ return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - config = function() - vim.keymap.set('n', '', ':Neotree filesystem reveal left', {}) - end, + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + }, + config = function() + vim.keymap.set("n", "", ":Neotree filesystem reveal left", {}) + end, } diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua new file mode 100644 index 0000000..8114aae --- /dev/null +++ b/lua/plugins/none-ls.lua @@ -0,0 +1,14 @@ +return { + "nvimtools/none-ls.nvim", + config = function() + local null_ls = require("null-ls") + null_ls.setup({ + sources = { + null_ls.builtins.formatting.beautysh, + null_ls.builtins.formatting.black, + null_ls.builtins.formatting.stylua, + } + }) + vim.keymap.set("n", "gf", vim.lsp.buf.format, {}) + end, +} diff --git a/lua/plugins/nvim-treesitter.lua b/lua/plugins/nvim-treesitter.lua index 6ac26bf..79ae9c1 100644 --- a/lua/plugins/nvim-treesitter.lua +++ b/lua/plugins/nvim-treesitter.lua @@ -1,26 +1,13 @@ return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - config = function () - local configs = require("nvim-treesitter.configs") + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + local configs = require("nvim-treesitter.configs") - configs.setup({ - ensure_installed = { - "bash", - "git_config", - "git_rebase", - "gitattributes", - "gitcommit", - "gitignore", - "ini", - "lua", - "markdown", - "python", - "vim", - "xml", - "yaml" }, - highlight = { enable = true }, - indent = { enable = true }, - }) - end, + configs.setup({ + auto_install = true, + highlight = { enable = true }, + indent = { enable = true }, + }) + end, } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 9a10d31..b627cc9 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,25 +1,25 @@ return { - { - 'nvim-telescope/telescope.nvim', tag = '0.1.5', - dependencies = { 'nvim-lua/plenary.nvim' }, - config = function() - local builtin = require("telescope.builtin") - vim.keymap.set('n', '', builtin.find_files, {}) - vim.keymap.set('n', 'fg', builtin.live_grep, {}) - end, - }, - { - "nvim-telescope/telescope-ui-select.nvim", - config = function() - require("telescope").setup({ - extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown { - } - } - } - }) - require("telescope").load_extension("ui-select") - end, - } + { + "nvim-telescope/telescope.nvim", + tag = "0.1.5", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + local builtin = require("telescope.builtin") + vim.keymap.set("n", "", builtin.find_files, {}) + vim.keymap.set("n", "fg", builtin.live_grep, {}) + end, + }, + { + "nvim-telescope/telescope-ui-select.nvim", + config = function() + require("telescope").setup({ + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown({}), + }, + }, + }) + require("telescope").load_extension("ui-select") + end, + }, } diff --git a/init.lua b/init.lua index 6081348..7328a90 100644 --- a/init.lua +++ b/init.lua @@ -1,17 +1,16 @@ -- LAZY PKG MGR -- local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) require("vim-options") require("lazy").setup("plugins") - diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua index 5685ffe..48a2454 100644 --- a/lua/plugins/lsp-config.lua +++ b/lua/plugins/lsp-config.lua @@ -1,40 +1,40 @@ return { - { - "williamboman/mason.nvim", - config = function() - require("mason").setup() - end, - }, - { - "williamboman/mason-lspconfig.nvim", - config = function() - require("mason-lspconfig").setup({ - ensure_installed = { - "bashls", -- bash - "jsonls", -- json - "lua_ls", -- lua - "lemminx", -- xml - "pyright", -- python - "yamlls", -- yaml - } - }) - end, - }, - { - "neovim/nvim-lspconfig", - config = function() - local lspconfig = require("lspconfig") + { + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end, + }, + { + "williamboman/mason-lspconfig.nvim", + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { + "bashls", -- bash + "jsonls", -- json + "lua_ls", -- lua + "lemminx", -- xml + "pyright", -- python + "yamlls", -- yaml + }, + }) + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + local lspconfig = require("lspconfig") - lspconfig.bashls.setup({}) - lspconfig.jsonls.setup({}) - lspconfig.lua_ls.setup({}) - lspconfig.lemminx.setup({}) - lspconfig.pyright.setup({}) - lspconfig.yamlls.setup({}) + lspconfig.bashls.setup({}) + lspconfig.jsonls.setup({}) + lspconfig.lua_ls.setup({}) + lspconfig.lemminx.setup({}) + lspconfig.pyright.setup({}) + lspconfig.yamlls.setup({}) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) - vim.keymap.set({ 'n' }, 'ca', vim.lsp.buf.code_action, {}) - end, - } + vim.keymap.set("n", "K", vim.lsp.buf.hover, {}) + vim.keymap.set("n", "gd", vim.lsp.buf.definition, {}) + vim.keymap.set("n", "ca", vim.lsp.buf.code_action, {}) + end, + }, } diff --git a/lua/plugins/lua-line.lua b/lua/plugins/lua-line.lua index 1e901d8..3d63d65 100644 --- a/lua/plugins/lua-line.lua +++ b/lua/plugins/lua-line.lua @@ -1,11 +1,11 @@ return { - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() - require("lualine").setup({ - options = { - theme = "codedark" - } - }) - end, + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("lualine").setup({ + options = { + theme = "codedark", + }, + }) + end, } diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 8c7c50f..c6e2216 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -1,12 +1,12 @@ return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - config = function() - vim.keymap.set('n', '', ':Neotree filesystem reveal left', {}) - end, + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + }, + config = function() + vim.keymap.set("n", "", ":Neotree filesystem reveal left", {}) + end, } diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua new file mode 100644 index 0000000..8114aae --- /dev/null +++ b/lua/plugins/none-ls.lua @@ -0,0 +1,14 @@ +return { + "nvimtools/none-ls.nvim", + config = function() + local null_ls = require("null-ls") + null_ls.setup({ + sources = { + null_ls.builtins.formatting.beautysh, + null_ls.builtins.formatting.black, + null_ls.builtins.formatting.stylua, + } + }) + vim.keymap.set("n", "gf", vim.lsp.buf.format, {}) + end, +} diff --git a/lua/plugins/nvim-treesitter.lua b/lua/plugins/nvim-treesitter.lua index 6ac26bf..79ae9c1 100644 --- a/lua/plugins/nvim-treesitter.lua +++ b/lua/plugins/nvim-treesitter.lua @@ -1,26 +1,13 @@ return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - config = function () - local configs = require("nvim-treesitter.configs") + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + local configs = require("nvim-treesitter.configs") - configs.setup({ - ensure_installed = { - "bash", - "git_config", - "git_rebase", - "gitattributes", - "gitcommit", - "gitignore", - "ini", - "lua", - "markdown", - "python", - "vim", - "xml", - "yaml" }, - highlight = { enable = true }, - indent = { enable = true }, - }) - end, + configs.setup({ + auto_install = true, + highlight = { enable = true }, + indent = { enable = true }, + }) + end, } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 9a10d31..b627cc9 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,25 +1,25 @@ return { - { - 'nvim-telescope/telescope.nvim', tag = '0.1.5', - dependencies = { 'nvim-lua/plenary.nvim' }, - config = function() - local builtin = require("telescope.builtin") - vim.keymap.set('n', '', builtin.find_files, {}) - vim.keymap.set('n', 'fg', builtin.live_grep, {}) - end, - }, - { - "nvim-telescope/telescope-ui-select.nvim", - config = function() - require("telescope").setup({ - extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown { - } - } - } - }) - require("telescope").load_extension("ui-select") - end, - } + { + "nvim-telescope/telescope.nvim", + tag = "0.1.5", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + local builtin = require("telescope.builtin") + vim.keymap.set("n", "", builtin.find_files, {}) + vim.keymap.set("n", "fg", builtin.live_grep, {}) + end, + }, + { + "nvim-telescope/telescope-ui-select.nvim", + config = function() + require("telescope").setup({ + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown({}), + }, + }, + }) + require("telescope").load_extension("ui-select") + end, + }, } diff --git a/lua/plugins/vscode-modern.lua b/lua/plugins/vscode-modern.lua index 2ae1d72..59dfcd7 100644 --- a/lua/plugins/vscode-modern.lua +++ b/lua/plugins/vscode-modern.lua @@ -1,13 +1,13 @@ return { - "gmr458/vscode_modern_theme.nvim", - lazy = false, - priority = 1000, - config = function() - require("vscode_modern").setup({ - cursorline = true, - transparent_background = false, - nvim_tree_darker = true, - }) - vim.cmd.colorscheme("vscode_modern") - end, + "gmr458/vscode_modern_theme.nvim", + lazy = false, + priority = 1000, + config = function() + require("vscode_modern").setup({ + cursorline = true, + transparent_background = false, + nvim_tree_darker = true, + }) + vim.cmd.colorscheme("vscode_modern") + end, } diff --git a/init.lua b/init.lua index 6081348..7328a90 100644 --- a/init.lua +++ b/init.lua @@ -1,17 +1,16 @@ -- LAZY PKG MGR -- local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) require("vim-options") require("lazy").setup("plugins") - diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua index 5685ffe..48a2454 100644 --- a/lua/plugins/lsp-config.lua +++ b/lua/plugins/lsp-config.lua @@ -1,40 +1,40 @@ return { - { - "williamboman/mason.nvim", - config = function() - require("mason").setup() - end, - }, - { - "williamboman/mason-lspconfig.nvim", - config = function() - require("mason-lspconfig").setup({ - ensure_installed = { - "bashls", -- bash - "jsonls", -- json - "lua_ls", -- lua - "lemminx", -- xml - "pyright", -- python - "yamlls", -- yaml - } - }) - end, - }, - { - "neovim/nvim-lspconfig", - config = function() - local lspconfig = require("lspconfig") + { + "williamboman/mason.nvim", + config = function() + require("mason").setup() + end, + }, + { + "williamboman/mason-lspconfig.nvim", + config = function() + require("mason-lspconfig").setup({ + ensure_installed = { + "bashls", -- bash + "jsonls", -- json + "lua_ls", -- lua + "lemminx", -- xml + "pyright", -- python + "yamlls", -- yaml + }, + }) + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + local lspconfig = require("lspconfig") - lspconfig.bashls.setup({}) - lspconfig.jsonls.setup({}) - lspconfig.lua_ls.setup({}) - lspconfig.lemminx.setup({}) - lspconfig.pyright.setup({}) - lspconfig.yamlls.setup({}) + lspconfig.bashls.setup({}) + lspconfig.jsonls.setup({}) + lspconfig.lua_ls.setup({}) + lspconfig.lemminx.setup({}) + lspconfig.pyright.setup({}) + lspconfig.yamlls.setup({}) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, {}) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, {}) - vim.keymap.set({ 'n' }, 'ca', vim.lsp.buf.code_action, {}) - end, - } + vim.keymap.set("n", "K", vim.lsp.buf.hover, {}) + vim.keymap.set("n", "gd", vim.lsp.buf.definition, {}) + vim.keymap.set("n", "ca", vim.lsp.buf.code_action, {}) + end, + }, } diff --git a/lua/plugins/lua-line.lua b/lua/plugins/lua-line.lua index 1e901d8..3d63d65 100644 --- a/lua/plugins/lua-line.lua +++ b/lua/plugins/lua-line.lua @@ -1,11 +1,11 @@ return { - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - config = function() - require("lualine").setup({ - options = { - theme = "codedark" - } - }) - end, + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("lualine").setup({ + options = { + theme = "codedark", + }, + }) + end, } diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 8c7c50f..c6e2216 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -1,12 +1,12 @@ return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", - "MunifTanjim/nui.nvim", - }, - config = function() - vim.keymap.set('n', '', ':Neotree filesystem reveal left', {}) - end, + "nvim-neo-tree/neo-tree.nvim", + branch = "v3.x", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-tree/nvim-web-devicons", + "MunifTanjim/nui.nvim", + }, + config = function() + vim.keymap.set("n", "", ":Neotree filesystem reveal left", {}) + end, } diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua new file mode 100644 index 0000000..8114aae --- /dev/null +++ b/lua/plugins/none-ls.lua @@ -0,0 +1,14 @@ +return { + "nvimtools/none-ls.nvim", + config = function() + local null_ls = require("null-ls") + null_ls.setup({ + sources = { + null_ls.builtins.formatting.beautysh, + null_ls.builtins.formatting.black, + null_ls.builtins.formatting.stylua, + } + }) + vim.keymap.set("n", "gf", vim.lsp.buf.format, {}) + end, +} diff --git a/lua/plugins/nvim-treesitter.lua b/lua/plugins/nvim-treesitter.lua index 6ac26bf..79ae9c1 100644 --- a/lua/plugins/nvim-treesitter.lua +++ b/lua/plugins/nvim-treesitter.lua @@ -1,26 +1,13 @@ return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - config = function () - local configs = require("nvim-treesitter.configs") + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + local configs = require("nvim-treesitter.configs") - configs.setup({ - ensure_installed = { - "bash", - "git_config", - "git_rebase", - "gitattributes", - "gitcommit", - "gitignore", - "ini", - "lua", - "markdown", - "python", - "vim", - "xml", - "yaml" }, - highlight = { enable = true }, - indent = { enable = true }, - }) - end, + configs.setup({ + auto_install = true, + highlight = { enable = true }, + indent = { enable = true }, + }) + end, } diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 9a10d31..b627cc9 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,25 +1,25 @@ return { - { - 'nvim-telescope/telescope.nvim', tag = '0.1.5', - dependencies = { 'nvim-lua/plenary.nvim' }, - config = function() - local builtin = require("telescope.builtin") - vim.keymap.set('n', '', builtin.find_files, {}) - vim.keymap.set('n', 'fg', builtin.live_grep, {}) - end, - }, - { - "nvim-telescope/telescope-ui-select.nvim", - config = function() - require("telescope").setup({ - extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown { - } - } - } - }) - require("telescope").load_extension("ui-select") - end, - } + { + "nvim-telescope/telescope.nvim", + tag = "0.1.5", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + local builtin = require("telescope.builtin") + vim.keymap.set("n", "", builtin.find_files, {}) + vim.keymap.set("n", "fg", builtin.live_grep, {}) + end, + }, + { + "nvim-telescope/telescope-ui-select.nvim", + config = function() + require("telescope").setup({ + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown({}), + }, + }, + }) + require("telescope").load_extension("ui-select") + end, + }, } diff --git a/lua/plugins/vscode-modern.lua b/lua/plugins/vscode-modern.lua index 2ae1d72..59dfcd7 100644 --- a/lua/plugins/vscode-modern.lua +++ b/lua/plugins/vscode-modern.lua @@ -1,13 +1,13 @@ return { - "gmr458/vscode_modern_theme.nvim", - lazy = false, - priority = 1000, - config = function() - require("vscode_modern").setup({ - cursorline = true, - transparent_background = false, - nvim_tree_darker = true, - }) - vim.cmd.colorscheme("vscode_modern") - end, + "gmr458/vscode_modern_theme.nvim", + lazy = false, + priority = 1000, + config = function() + require("vscode_modern").setup({ + cursorline = true, + transparent_background = false, + nvim_tree_darker = true, + }) + vim.cmd.colorscheme("vscode_modern") + end, } diff --git a/lua/vim-options.lua b/lua/vim-options.lua index d25d4a6..56aeeae 100644 --- a/lua/vim-options.lua +++ b/lua/vim-options.lua @@ -19,4 +19,3 @@ vim.cmd("set encoding=utf8") vim.g.mapleader = "," -