diff options
| author | seth <[email protected]> | 2023-12-31 08:01:03 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2023-12-31 08:52:04 -0500 |
| commit | dec8d36cbdbb3b9c5c12792ed199892ce2e82069 (patch) | |
| tree | 89422c04c25b4ed4c3156d4477c894416500e8b3 /config | |
| parent | ae9136a14ae0b0fe91faad59b23d3a532ca84ed5 (diff) | |
back to regular lua
Diffstat (limited to 'config')
42 files changed, 410 insertions, 464 deletions
diff --git a/config/default.nix b/config/default.nix deleted file mode 100644 index 79756d6..0000000 --- a/config/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{pkgs, ...}: { - imports = [ - ./plugins - ./keymaps.nix - ]; - - config = { - clipboard.providers.wl-copy.enable = pkgs.stdenv.isLinux; - - colorschemes.catppuccin = { - enable = true; - flavour = "mocha"; - - disableItalic = true; - }; - - enableMan = false; - - globals = { - mapleader = ","; - }; - - options = { - shiftwidth = 2; - tabstop = 2; - smartindent = true; - wrap = true; - syntax = "on"; - termguicolors = true; - }; - }; -} diff --git a/config/globals.lua b/config/globals.lua new file mode 100644 index 0000000..ce1cd3b --- /dev/null +++ b/config/globals.lua @@ -0,0 +1,6 @@ +vim.g.mapleader = "," + +-- for deno's lsp +vim.g.markdown_fenced_languages = { + "ts=typescript", +} diff --git a/config/init.lua b/config/init.lua new file mode 100644 index 0000000..e7b816f --- /dev/null +++ b/config/init.lua @@ -0,0 +1,4 @@ +require("getchoo.globals") +require("getchoo.keymaps") +require("getchoo.options") +require("getchoo.plugins") diff --git a/config/keymaps.lua b/config/keymaps.lua new file mode 100644 index 0000000..b220c77 --- /dev/null +++ b/config/keymaps.lua @@ -0,0 +1,48 @@ +local opts = { noremap = true, silent = true } +local set = function(mode, key, vimcmd) + vim.keymap.set(mode, key, vimcmd, opts) +end + +if pcall(require, "neo-tree.command") then + set("n", "<leader>t", function() + require("neo-tree.command").execute({ + toggle = true, + dir = vim.loop.cwd(), + }) + end) +end + +if pcall(require, "flash") then + set({ "n", "o", "x" }, "s", function() + require("flash").jump() + end) +end + +for i = 1, 9 do + set("n", "<leader>" .. i, function() + vim.cmd("BufferLineGoToBuffer " .. i) + end) +end + +set("n", "<leader>q", function() + vim.cmd("BufferLinePickClose") +end) + +local diagnostic = vim.diagnostic +set("n", "<leader>e", diagnostic.open_float) +set("n", "[d", diagnostic.goto_prev) +set("n", "]d", diagnostic.goto_next) +set("n", "<leader>u", diagnostic.setloclist) +set("n", "<leader>ca", vim.lsp.buf.code_action) + +set("n", "<leader>f", function() + vim.cmd("Telescope") +end) + +set("n", "<leader>p", function() + vim.cmd("TroubleToggle") +end) + +set("n", "<leader>z", function() + vim.cmd("FormatToggle") +end) diff --git a/config/keymaps.nix b/config/keymaps.nix deleted file mode 100644 index 231da71..0000000 --- a/config/keymaps.nix +++ /dev/null @@ -1,82 +0,0 @@ -{lib, ...}: let - setBind = lib.recursiveUpdate { - mode = "n"; - lua = true; - options = { - noremap = true; - silent = true; - }; - }; -in { - keymaps = map setBind ( - [ - { - key = "<leader>t"; - action = '' - function() - require("neo-tree.command").execute({ - toggle = true, - dir = vim.loop.cwd() - }) - end - ''; - } - - { - mode = ["n" "o" "x"]; - key = "s"; - action = '' - function() - require("flash").jump() - end - ''; - } - - { - key = "<leader>q"; - action = '' - function() - vim.cmd("BufferLinePickClose") - end - ''; - } - - { - key = "<leader>f"; - action = '' - function() - vim.cmd("Telescope") - end - ''; - } - - { - key = "<leader>p"; - action = '' - function() - vim.cmd("TroubleToggle") - end - ''; - } - - { - key = "<leader>z"; - action = '' - function() - vim.cmd("FormatToggle") - end - ''; - } - ] - ++ ( - map (n: { - key = "<leader>${toString n}"; - action = '' - function() - vim.cmd("BufferLineGoToBuffer ${toString n}") - end - ''; - }) (lib.range 1 9) - ) - ); -} diff --git a/config/options.lua b/config/options.lua new file mode 100644 index 0000000..294067c --- /dev/null +++ b/config/options.lua @@ -0,0 +1,8 @@ +local opt = vim.opt + +opt.shiftwidth = 2 +opt.tabstop = 2 +opt.smartindent = true +opt.wrap = true +opt.syntax = "on" +opt.termguicolors = true diff --git a/config/plugins/bufferline.lua b/config/plugins/bufferline.lua new file mode 100644 index 0000000..a74dfa2 --- /dev/null +++ b/config/plugins/bufferline.lua @@ -0,0 +1,20 @@ +require("bufferline").setup({ + options = { + always_show_bufferline = false, + + diagnostics = "nvim_lsp", + + mode = "buffers", + numbers = "ordinal", + separator_style = "slant", + + offsets = { + { + filetype = "neo-tree", + text = "neo-tree", + highlight = "Directory", + text_align = "left", + }, + }, + }, +}) diff --git a/config/plugins/bufferline.nix b/config/plugins/bufferline.nix deleted file mode 100644 index fe1cd17..0000000 --- a/config/plugins/bufferline.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - plugins.bufferline = { - enable = true; - - alwaysShowBufferline = false; - diagnostics = "nvim_lsp"; - mode = "buffers"; - numbers = "ordinal"; - separatorStyle = "slant"; - offsets = [ - { - filetype = "neo-tree"; - text = "neo-tree"; - highlight = "Directory"; - text_align = "left"; - } - ]; - }; -} diff --git a/config/plugins/catppuccin.lua b/config/plugins/catppuccin.lua new file mode 100644 index 0000000..6f8c367 --- /dev/null +++ b/config/plugins/catppuccin.lua @@ -0,0 +1,29 @@ +local compile_path = vim.fn.stdpath("cache") .. "/catppuccin-nvim" +vim.fn.mkdir(compile_path, "p") +vim.opt.runtimepath:append(compile_path) + +require("catppuccin").setup({ + compile_path = compile_path, + flavour = "mocha", + integrations = { + cmp = true, + flash = true, + gitsigns = true, + indent_blankline = { + enabled = true, + }, + lsp_trouble = true, + native_lsp = { + enabled = true, + }, + neotree = true, + treesitter_context = true, + treesitter = true, + telescope = true, + which_key = true, + }, + + no_italic = true, +}) + +vim.cmd.colorscheme("catppuccin") diff --git a/config/plugins/cmp.lua b/config/plugins/cmp.lua new file mode 100644 index 0000000..eee5eb1 --- /dev/null +++ b/config/plugins/cmp.lua @@ -0,0 +1,42 @@ +local cmp = require("cmp") + +cmp.setup({ + completion = { + compleopt = "menu,menuone,insert", + }, + + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + + mapping = { + ["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + ["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + ["<C-b>"] = cmp.mapping.scroll_docs(-4), + ["<C-f>"] = cmp.mapping.scroll_docs(4), + ["<C-Space>"] = cmp.mapping.complete(), + ["<C-e>"] = cmp.mapping.abort(), + ["<CR>"] = cmp.mapping({ + i = function(fallback) + if cmp.visible() and cmp.get_active_entry() then + cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false }) + else + fallback() + end + end, + + s = cmp.mapping.confirm({ select = true }), + c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }), + }), + }, + + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "async_path" }, + { name = "buffer" }, + { name = "rg" }, + }), +}) diff --git a/config/plugins/cmp.nix b/config/plugins/cmp.nix deleted file mode 100644 index 1bc85f1..0000000 --- a/config/plugins/cmp.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - plugins = { - nvim-cmp = { - enable = true; - - completion = { - completeopt = "menu,menuone,noinsert"; - }; - - mapping = { - "<C-n>" = "cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert })"; - "<C-p>" = "cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert })"; - "<C-b>" = "cmp.mapping.scroll_docs(-4)"; - "<C-f>" = "cmp.mapping.scroll_docs(4)"; - "<C-Space>" = "cmp.mapping.complete()"; - "<C-e>" = "cmp.mapping.abort()"; - "<CR>" = "cmp.mapping.confirm({ select = true })"; - "<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true})"; - }; - - snippet.expand = "luasnip"; - - sources = map (name: {inherit name;}) [ - "nvim_lsp" - "luasnip" - "path" - "buffer" - "rg" - ]; - }; - }; -} diff --git a/config/plugins/default.nix b/config/plugins/default.nix deleted file mode 100644 index 229942e..0000000 --- a/config/plugins/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - # import all files besides those prefixed with `_` - imports = builtins.map (file: ./${file}) ( - builtins.filter ( - name: name != "default.nix" && (builtins.substring 0 1 name) != "_" - ) ( - builtins.attrNames ( - builtins.readDir ./. - ) - ) - ); -} diff --git a/config/plugins/dressing.lua b/config/plugins/dressing.lua new file mode 100644 index 0000000..a4fcb44 --- /dev/null +++ b/config/plugins/dressing.lua @@ -0,0 +1 @@ +require("dressing") diff --git a/config/plugins/efmls.lua b/config/plugins/efmls.lua new file mode 100644 index 0000000..979cafb --- /dev/null +++ b/config/plugins/efmls.lua @@ -0,0 +1,59 @@ +local alex = require("efmls-configs.linters.alex") +local actionlint = require("efmls-configs.linters.actionlint") +local beautysh = require("efmls-configs.formatters.beautysh") +local codespell = require("efmls-configs.linters.codespell") +local fish_indent = require("efmls-configs.formatters.fish_indent") +local prettier = require("efmls-configs.formatters.prettier") +local prettier_eslint = require("efmls-configs.formatters.prettier_eslint") +local shellcheck = require("efmls-configs.linters.shellcheck") +local statix = require("efmls-configs.linters.statix") +local stylua = require("efmls-configs.formatters.stylua") + +local languages = { + all = { alex, codespell }, + + bash = { + beautysh, + shellcheck, + }, + + css = { prettier }, + + fish = { fish_indent }, + + html = { prettier }, + + javascript = { prettier_eslint }, + + json = { prettier }, + + lua = { stylua }, + + nix = { statix }, + + sass = { prettier }, + + scss = { prettier }, + + sh = { beautysh, shellcheck }, + + typescript = { prettier_eslint }, + + yaml = { prettier, actionlint }, + + zsh = { beautysh }, +} + +return { + filetypes = vim.tbl_keys(languages), + + settings = { + rootMarkers = { ".git/" }, + languages = languages, + }, + + init_options = { + documentFormatting = true, + documentRangeFormatting = true, + }, +} diff --git a/config/plugins/efmls.nix b/config/plugins/efmls.nix deleted file mode 100644 index e3cfb07..0000000 --- a/config/plugins/efmls.nix +++ /dev/null @@ -1,74 +0,0 @@ -{ - plugins = { - lsp.servers.efm.extraOptions = { - init_options = { - documentFormatting = true; - documentRangeFormatting = true; - }; - }; - - efmls-configs = { - enable = true; - - setup = { - all = { - linter = [ - "alex" - "codespell" - ]; - }; - - bash = { - formatter = "beautysh"; - linter = "shellcheck"; - }; - - css = { - formatter = "prettier"; - }; - - fish = { - formatter = "fish_indent"; - }; - - html = { - formatter = "prettier"; - }; - - json = { - formatter = "prettier"; - }; - - lua = { - formatter = "stylua"; - }; - - nix = { - linter = "statix"; - }; - - sass = { - formatter = "prettier"; - }; - - scss = { - formatter = "prettier"; - }; - - sh = { - formatter = ["beautysh" "shellharden"]; - linter = "shellcheck"; - }; - - yaml = { - formatter = "prettier"; - linter = "actionlint"; - }; - - zsh = { - formatter = "beautysh"; - }; - }; - }; - }; -} diff --git a/config/plugins/fidget.lua b/config/plugins/fidget.lua new file mode 100644 index 0000000..4f1ab35 --- /dev/null +++ b/config/plugins/fidget.lua @@ -0,0 +1 @@ +require("fidget").setup() diff --git a/config/plugins/fidget.nix b/config/plugins/fidget.nix deleted file mode 100644 index 5d0a033..0000000 --- a/config/plugins/fidget.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.fidget = { - enable = true; - }; -} diff --git a/config/plugins/flash.lua b/config/plugins/flash.lua new file mode 100644 index 0000000..9f9c773 --- /dev/null +++ b/config/plugins/flash.lua @@ -0,0 +1 @@ +require("flash").setup() diff --git a/config/plugins/flash.nix b/config/plugins/flash.nix deleted file mode 100644 index 87446e9..0000000 --- a/config/plugins/flash.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.flash = { - enable = true; - }; -} diff --git a/config/plugins/gitsigns.lua b/config/plugins/gitsigns.lua new file mode 100644 index 0000000..d16d238 --- /dev/null +++ b/config/plugins/gitsigns.lua @@ -0,0 +1 @@ +require("gitsigns").setup() diff --git a/config/plugins/gitsigns.nix b/config/plugins/gitsigns.nix deleted file mode 100644 index 8ba3e72..0000000 --- a/config/plugins/gitsigns.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.gitsigns = { - enable = true; - }; -} diff --git a/config/plugins/ibl.lua b/config/plugins/ibl.lua new file mode 100644 index 0000000..b63139b --- /dev/null +++ b/config/plugins/ibl.lua @@ -0,0 +1,22 @@ +require("ibl").setup({ + exclude = { + filetypes = { + "help", + "neo-tree", + "Trouble", + "lazy", + "mason", + "notify", + "toggleterm", + }, + }, + + indent = { + char = "│", + tab_char = "│", + }, + + scope = { + enabled = false, + }, +}) diff --git a/config/plugins/ibl.nix b/config/plugins/ibl.nix deleted file mode 100644 index d794a6a..0000000 --- a/config/plugins/ibl.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - plugins.indent-blankline = { - enable = true; - - exclude.filetypes = [ - "help" - "neo-tree" - "Trouble" - "lazy" - "mason" - "notify" - "toggleterm" - ]; - - indent = { - char = "│"; - tabChar = "│"; - }; - - scope.enabled = false; - }; -} diff --git a/config/plugins/init.lua b/config/plugins/init.lua new file mode 100644 index 0000000..7b78aa2 --- /dev/null +++ b/config/plugins/init.lua @@ -0,0 +1,17 @@ +require("getchoo.plugins.bufferline") +require("getchoo.plugins.catppuccin") +require("getchoo.plugins.cmp") +require("getchoo.plugins.dressing") +require("getchoo.plugins.fidget") +require("getchoo.plugins.flash") +require("getchoo.plugins.gitsigns") +require("getchoo.plugins.ibl") +require("getchoo.plugins.lsp-format") +require("getchoo.plugins.lsp") +require("getchoo.plugins.lualine") +require("getchoo.plugins.mini") +require("getchoo.plugins.neo-tree") +require("getchoo.plugins.telescope") +require("getchoo.plugins.treesitter") +require("getchoo.plugins.trouble") +require("getchoo.plugins.which-key") diff --git a/config/plugins/lsp-format.lua b/config/plugins/lsp-format.lua new file mode 100644 index 0000000..6b57642 --- /dev/null +++ b/config/plugins/lsp-format.lua @@ -0,0 +1 @@ +require("lsp-format").setup() diff --git a/config/plugins/lsp-format.nix b/config/plugins/lsp-format.nix deleted file mode 100644 index af2ab05..0000000 --- a/config/plugins/lsp-format.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.lsp-format = { - enable = true; - }; -} diff --git a/config/plugins/lsp.lua b/config/plugins/lsp.lua new file mode 100644 index 0000000..9492df1 --- /dev/null +++ b/config/plugins/lsp.lua @@ -0,0 +1,93 @@ +local lsp_servers = { + bashls = { + binary = "bash-language-server", + }, + + clangd = {}, + + eslint = {}, + + efm = { + binary = "true", + extraOptions = require("getchoo.plugins.efmls"), + }, + + lua_ls = { + binary = "lua-language-server", + extraOptions = { + settings = { + Lua = { + runtime = { version = "LuaJIT" }, + diagnostics = { globals = "vim" }, + workspace = { library = vim.api.nvim_get_runtime_file("", true) }, + }, + }, + }, + }, + + nil_ls = { + binary = "nil", + extraOptions = { + settings = { + ["nil"] = { + formatting = { command = { "alejandra" } }, + }, + }, + }, + }, + + pyright = {}, + ruff_lsp = { + binary = "ruff-lsp", + extraOptions = { + on_attach = function(client, _) + require("lsp-format").on_attach(client) + -- pyright should handle this + client.server_capabilities.hoverProvider = false + end, + }, + }, + + rust_analyzer = { + binary = "rust-analyzer", + extraOptions = { + settings = { + checkOnSave = { command = "clippy" }, + }, + }, + }, + + denols = { + binary = "deno", + }, + + tsserver = { + binary = "typescript-language-server", + }, +} + +local caps = vim.tbl_deep_extend( + "force", + vim.lsp.protocol.make_client_capabilities(), + require("cmp_nvim_lsp").default_capabilities(), + -- for nil_ls + { workspace = { didChangeWatchedFiles = { dynamicRegistration = true } } } +) + +local setup = { + on_attach = function(client, _) + require("lsp-format").on_attach(client) + end, + + capabilities = caps, +} + +for server, config in pairs(lsp_servers) do + local binary = config.binary or server + + local options = (config.extraOptions == nil) and setup or vim.tbl_extend("keep", config.extraOptions, setup) + + if vim.fn.executable(binary) == 1 then + require("lspconfig")[server].setup(options) + end +end diff --git a/config/plugins/lsp.nix b/config/plugins/lsp.nix deleted file mode 100644 index 0b8e3cd..0000000 --- a/config/plugins/lsp.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ - plugins.lsp = { - enable = true; - - # nil-ls wants dynamicRegistration - capabilities = '' - capabilities = vim.tbl_deep_extend( - "force", - vim.lsp.protocol.make_client_capabilities(), - require("cmp_nvim_lsp").default_capabilities(), - { workspace = { didChangeWatchedFiles = { dynamicRegistration = true } } } - ) - ''; - - keymaps = { - diagnostic = { - "<leader>e" = "open_float"; - "[d" = "goto_prev"; - "]d" = "goto_next"; - "<leader>u" = "setloclist"; - }; - - lspBuf = { - "<leader>ca" = "code_action"; - }; - }; - - servers = let - enable = {enable = true;}; - - optional = - enable - // { - installLanguageServer = false; - autostart = false; - }; - in { - bashls = enable; - clangd = optional; - denols = optional; - eslint = optional; - - lua-ls = enable; - - nil_ls = - enable - // { - settings.formatting.command = ["alejandra"]; - }; - - pyright = optional; - ruff-lsp = - optional - // { - # let pyright handle it - onAttach.function = '' - client.server_capabilities.hoverProvider = false - ''; - }; - - rust-analyzer = - optional - // { - installRustc = false; - installCargo = false; - settings.check.command = "clippy"; - }; - - tsserver = optional; - }; - }; -} diff --git a/config/plugins/lualine.lua b/config/plugins/lualine.lua new file mode 100644 index 0000000..2727d75 --- /dev/null +++ b/config/plugins/lualine.lua @@ -0,0 +1,6 @@ +require("lualine").setup({ + options = { + theme = "catppuccin", + }, + extensions = { "neo-tree", "trouble" }, +}) diff --git a/config/plugins/lualine.nix b/config/plugins/lualine.nix deleted file mode 100644 index 43e2128..0000000 --- a/config/plugins/lualine.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - plugins.lualine = { - enable = true; - - theme = "catppuccin"; - extensions = ["neo-tree" "trouble"]; - }; -} diff --git a/config/plugins/mini.lua b/config/plugins/mini.lua new file mode 100644 index 0000000..075b2bd --- /dev/null +++ b/config/plugins/mini.lua @@ -0,0 +1,28 @@ +require("mini.comment").setup({ + options = { + custom_commentstring = function() + return require("ts_context_commentstring.internal").calculate_commentstring() + or vim.bo.context_commentstring + end, + }, +}) + +require("mini.pairs").setup() +require("mini.indentscope").setup({ + options = { try_as_border = true }, +}) + +vim.api.nvim_create_autocmd("FileType", { + pattern = { + "help", + "neo-tree", + "Trouble", + "lazy", + "mason", + "notify", + "toggleterm", + }, + callback = function() + vim.b.miniindentscope_disable = true + end, +}) diff --git a/config/plugins/mini.nix b/config/plugins/mini.nix deleted file mode 100644 index 48bb0ed..0000000 --- a/config/plugins/mini.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - plugins.mini = { - enable = true; - - modules = { - comment = {}; - pairs = {}; - indentscope = { - options.try_as_border = true; - }; - }; - }; - - autoCmd = [ - { - event = ["FileType"]; - pattern = [ - "help" - "neo-tree" - "Trouble" - "lazy" - "mason" - "notify" - "toggleterm" - ]; - - callback = { - __raw = '' - function() - vim.b.miniindentscope_disable = true - end - ''; - }; - } - ]; -} diff --git a/config/plugins/neo-tree.lua b/config/plugins/neo-tree.lua new file mode 100644 index 0000000..1d6f7f5 --- /dev/null +++ b/config/plugins/neo-tree.lua @@ -0,0 +1,5 @@ +require("neo-tree").setup({ + filetype_exclude = { "help", "neo-tree", "Trouble", "lazy", "mason", "notify", "toggleterm" }, + show_current_context = false, + show_trailing_blankline_indent = false, +}) diff --git a/config/plugins/neo-tree.nix b/config/plugins/neo-tree.nix deleted file mode 100644 index f99df9e..0000000 --- a/config/plugins/neo-tree.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - plugins.neo-tree = { - enable = true; - - extraOptions = { - filetype_exclude = ["help" "neo-tree" "Trouble" "lazy" "mason" "notify" "toggleterm"]; - show_current_context = false; - show_trailing_blankline_indent = false; - }; - }; -} diff --git a/config/plugins/telescope.lua b/config/plugins/telescope.lua new file mode 100644 index 0000000..be3366b --- /dev/null +++ b/config/plugins/telescope.lua @@ -0,0 +1 @@ +require("telescope").setup() diff --git a/config/plugins/telescope.nix b/config/plugins/telescope.nix deleted file mode 100644 index 68a5112..0000000 --- a/config/plugins/telescope.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.telescope = { - enable = true; - }; -} diff --git a/config/plugins/treesitter.lua b/config/plugins/treesitter.lua new file mode 100644 index 0000000..e9b88f2 --- /dev/null +++ b/config/plugins/treesitter.lua @@ -0,0 +1,11 @@ +require("nvim-treesitter.configs").setup({ + auto_install = false, + + highlight = { enable = true }, + indent = { enable = true }, + + -- nvim-ts-autotag + autotag = { enable = true }, +}) + +vim.g.skip_ts_context_commentstring_module = true diff --git a/config/plugins/treesitter.nix b/config/plugins/treesitter.nix deleted file mode 100644 index 047bd17..0000000 --- a/config/plugins/treesitter.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - pkgs, - self, - ... -}: { - extraPlugins = [pkgs.vimPlugins.vim-just]; - - plugins = { - treesitter = { - enable = true; - - grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars ++ [self.tree-sitter-just]; - - indent = true; - nixvimInjections = true; - }; - - ts-context-commentstring = { - enable = true; - disableAutoInitialization = true; - }; - - ts-autotag.enable = true; - }; -} diff --git a/config/plugins/trouble.lua b/config/plugins/trouble.lua new file mode 100644 index 0000000..38ef1e9 --- /dev/null +++ b/config/plugins/trouble.lua @@ -0,0 +1 @@ +require("trouble").setup() diff --git a/config/plugins/trouble.nix b/config/plugins/trouble.nix deleted file mode 100644 index 343c92f..0000000 --- a/config/plugins/trouble.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - plugins.trouble = { - enable = true; - }; -} diff --git a/config/plugins/which-key.lua b/config/plugins/which-key.lua new file mode 100644 index 0000000..32ca2ff --- /dev/null +++ b/config/plugins/which-key.lua @@ -0,0 +1,5 @@ +require("which-key").setup({ + plugins = { + spelling = { enable = true }, + }, +}) diff --git a/config/plugins/which-key.nix b/config/plugins/which-key.nix deleted file mode 100644 index ef43fc4..0000000 --- a/config/plugins/which-key.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - plugins.which-key = { - enable = true; - - plugins = { - spelling.enabled = true; - }; - }; -} |
