From 23080159f9ef2bc84d6833053838cb37f15fbb3b Mon Sep 17 00:00:00 2001 From: Mathias Scheider Date: Thu, 26 Mar 2026 23:01:29 +0100 Subject: [PATCH] linter --- term/.config/nvim/lua/plugins/none-ls.lua | 17 +++++ term/.config/nvim/lua/plugins/telescope.lua | 65 +++++++++++--------- term/.config/nvim/lua/plugins/treesitter.lua | 29 ++++----- 3 files changed, 67 insertions(+), 44 deletions(-) create mode 100644 term/.config/nvim/lua/plugins/none-ls.lua diff --git a/term/.config/nvim/lua/plugins/none-ls.lua b/term/.config/nvim/lua/plugins/none-ls.lua new file mode 100644 index 0000000..3c2f125 --- /dev/null +++ b/term/.config/nvim/lua/plugins/none-ls.lua @@ -0,0 +1,17 @@ +return { + "nvimtools/none-ls.nvim", + config = function() + local null_ls = require("null-ls") + + null_ls.setup({ + sources = { + null_ls.builtins.formatting.stylua, + null_ls.builtins.diagnostics.stylua, + null_ls.builtins.formatting.black, + null_ls.builtins.diagnostics.black, + }, + }) + + vim.keymap.set("n", "gf", vim.lsp.buf.format, {}) + end, +} diff --git a/term/.config/nvim/lua/plugins/telescope.lua b/term/.config/nvim/lua/plugins/telescope.lua index e61b86f..f869daf 100644 --- a/term/.config/nvim/lua/plugins/telescope.lua +++ b/term/.config/nvim/lua/plugins/telescope.lua @@ -1,32 +1,37 @@ return { - { - "nvim-telescope/telescope.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - local builtin = require("telescope.builtin") - require("telescope").setup({ - defaults = { - prompt_prefix = " ", - entry_prefix = " ", - initial_mode = "insert", - sorting_strategy = "ascending", - file_ignore_patterns = { - "node_modules", ".git", "__pycache__", "*.pyc", "dist", "build" - }, - -- Disable treesitter in preview - preview = { - treesitter = false, - }, - }, - }) - 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").load_extension("ui-select") - end, - }, + { + "nvim-telescope/telescope.nvim", + dependencies = { "nvim-lua/plenary.nvim" }, + config = function() + local builtin = require("telescope.builtin") + require("telescope").setup({ + defaults = { + prompt_prefix = " ", + entry_prefix = " ", + initial_mode = "insert", + sorting_strategy = "ascending", + file_ignore_patterns = { + "node_modules", + ".git", + "__pycache__", + "*.pyc", + "dist", + "build", + }, + -- Disable treesitter in preview + preview = { + treesitter = false, + }, + }, + }) + 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").load_extension("ui-select") + end, + }, } diff --git a/term/.config/nvim/lua/plugins/treesitter.lua b/term/.config/nvim/lua/plugins/treesitter.lua index ad61880..6fce23b 100644 --- a/term/.config/nvim/lua/plugins/treesitter.lua +++ b/term/.config/nvim/lua/plugins/treesitter.lua @@ -1,16 +1,17 @@ return { - "nvim-treesitter/nvim-treesitter", - lazy = true, - build = ":TSUpdate", - event = { "BufReadPost", "BufNewFile" }, - config = function() - local ok, configs = pcall(require, "nvim-treesitter.configs") - if ok then - configs.setup({ - ensure_installed = { "python", "lua", "json", "yaml", "markdown" }, - highlight = { enable = true }, - indent = { enable = true }, - }) - end - end, + "nvim-treesitter/nvim-treesitter", + lazy = true, + build = ":TSUpdate", + event = { "BufReadPost", "BufNewFile" }, + config = function() + local ok, configs = pcall(require, "nvim-treesitter.configs") + if ok then + configs.setup({ + auto_install = true, + -- ensure_installed = { "python", "lua", "json", "yaml", "markdown" }, + highlight = { enable = true }, + indent = { enable = true }, + }) + end + end, }