From 59743882012a426d3a974ac34ca0fd77b554658e Mon Sep 17 00:00:00 2001 From: Pablu23 Date: Wed, 26 Jun 2024 14:32:57 +0200 Subject: [PATCH] Add python and odin lsp and another theme as comment --- init.lua | 1 + lazy-lock.json | 1 + lua/plugins/catppuccin.lua | 27 +++++++++++++++++++-------- lua/plugins/lsp-config.lua | 9 +++++++-- lua/plugins/none-ls.lua | 1 - lua/plugins/treesitter.lua | 31 +++++++++++++++++++++---------- 6 files changed, 49 insertions(+), 21 deletions(-) diff --git a/init.lua b/init.lua index 9e9cba2..701ebc0 100644 --- a/init.lua +++ b/init.lua @@ -14,3 +14,4 @@ vim.opt.rtp:prepend(lazypath) require("vim-options") require("lazy").setup("plugins") + diff --git a/lazy-lock.json b/lazy-lock.json index 0eb3424..6c69fbb 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -17,6 +17,7 @@ "nvim-lspconfig": { "branch": "master", "commit": "a284b14b3a9c4851f900286cd7eb68e3a8f90b1c" }, "nvim-treesitter": { "branch": "master", "commit": "00a8cfd562dc805eb4d732fbca35e23640dbf7c8" }, "nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" }, + "oxocarbon.nvim": { "branch": "main", "commit": "c5846d10cbe4131cc5e32c6d00beaf59cb60f6a2" }, "plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" } diff --git a/lua/plugins/catppuccin.lua b/lua/plugins/catppuccin.lua index 772d39f..b60a0e4 100644 --- a/lua/plugins/catppuccin.lua +++ b/lua/plugins/catppuccin.lua @@ -1,13 +1,24 @@ -return { - "catppuccin/nvim", - name = "catppuccin", - priority = 1000, - lazy = false, - config= function() +return +{ + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, + lazy = false, + config = function() require("catppuccin").setup({ transparent_background = true, }) - vim.cmd.colorscheme "catppuccin" - end + vim.cmd.colorscheme "catppuccin" + end } +-- { +-- "nyoom-engineering/oxocarbon.nvim", +-- config = function() +-- vim.opt.background = "dark" +-- vim.cmd.colorscheme "oxocarbon" +-- +-- -- vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) +-- -- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) +-- end +-- } diff --git a/lua/plugins/lsp-config.lua b/lua/plugins/lsp-config.lua index fe7b4f4..406f3d7 100644 --- a/lua/plugins/lsp-config.lua +++ b/lua/plugins/lsp-config.lua @@ -15,7 +15,8 @@ return { "rust_analyzer", "html", "zls", - "biome", + "pyright", + "ols", }, }) end, @@ -50,7 +51,11 @@ return { capabilities = capabilities, handlers = handlers, }) - lspconfig.biome.setup({ + lspconfig.pyright.setup({ + capabilities = capabilities, + handlers = handlers, + }) + lspconfig.ols.setup({ capabilities = capabilities, handlers = handlers, }) diff --git a/lua/plugins/none-ls.lua b/lua/plugins/none-ls.lua index b08d8a6..c45f71f 100644 --- a/lua/plugins/none-ls.lua +++ b/lua/plugins/none-ls.lua @@ -6,7 +6,6 @@ return { sources = { null_ls.builtins.formatting.stylua, null_ls.builtins.formatting.gofmt, - null_ls.builtins.formatting.biome, }, }) vim.keymap.set("n", "gf", vim.lsp.buf.format, {}) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 0388f75..40e7334 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,12 +1,23 @@ return { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - config = function() - local config = require("nvim-treesitter.configs") - config.setup({ - ensure_installed = {"lua", "go", "zig", "markdown", "json", "yaml"}, - highlight = {enable = true}, - indent = {enable = true}, - }) - end + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + local config = require("nvim-treesitter.configs") + config.setup({ + ensure_installed = { "lua", "go", "zig", "markdown", "json", "yaml", "javascript", "typescript", "bash", "python" }, + highlight = { enable = true }, + indent = { enable = true }, + }) + + local treesitter_parser_config = require("nvim-treesitter.parsers").get_parser_configs() + treesitter_parser_config.templ = { + install_info = { + url = "https://github.com/vrischmann/tree-sitter-templ.git", + files = { "src/parser.c", "src/scanner.c" }, + branch = "master", + }, + } + + vim.treesitter.language.register("templ", "templ") + end }