From 16a1126200932407f9f4562fba961b514a1c91d1 Mon Sep 17 00:00:00 2001 From: seth Date: Tue, 9 Apr 2024 19:49:37 -0400 Subject: auto import all files, cleanup + add a few things --- config/after/plugin/globals.lua | 4 ++ config/after/plugin/keymaps.lua | 44 ++++++++++++++++++ config/ftdetect/just.lua | 5 +++ config/globals.lua | 6 --- config/init.lua | 4 -- config/keymaps.lua | 44 ------------------ config/lua/getchoo/efmls.lua | 60 +++++++++++++++++++++++++ config/lua/getchoo/init.lua | 23 ++++++++++ config/options.lua | 18 -------- config/plugin/bufferline.lua | 25 +++++++++++ config/plugin/catppuccin.lua | 34 ++++++++++++++ config/plugin/cmp.lua | 47 ++++++++++++++++++++ config/plugin/dressing.lua | 6 +++ config/plugin/fidget.lua | 6 +++ config/plugin/flash.lua | 6 +++ config/plugin/gitsigns.lua | 6 +++ config/plugin/ibl.lua | 27 ++++++++++++ config/plugin/lsp-format.lua | 6 +++ config/plugin/lsp.lua | 98 +++++++++++++++++++++++++++++++++++++++++ config/plugin/lualine.lua | 11 +++++ config/plugin/mini.lua | 34 ++++++++++++++ config/plugin/telescope.lua | 6 +++ config/plugin/treesitter.lua | 16 +++++++ config/plugin/trouble.lua | 6 +++ config/plugin/which-key.lua | 10 +++++ config/plugins/bufferline.lua | 20 --------- config/plugins/catppuccin.lua | 29 ------------ config/plugins/cmp.lua | 42 ------------------ config/plugins/dressing.lua | 1 - config/plugins/efmls.lua | 59 ------------------------- config/plugins/fidget.lua | 1 - config/plugins/flash.lua | 1 - config/plugins/gitsigns.lua | 1 - config/plugins/ibl.lua | 22 --------- config/plugins/init.lua | 16 ------- config/plugins/lsp-format.lua | 1 - config/plugins/lsp.lua | 93 -------------------------------------- config/plugins/lualine.lua | 6 --- config/plugins/mini.lua | 29 ------------ config/plugins/telescope.lua | 1 - config/plugins/treesitter.lua | 11 ----- config/plugins/trouble.lua | 1 - config/plugins/which-key.lua | 5 --- 43 files changed, 480 insertions(+), 411 deletions(-) create mode 100644 config/after/plugin/globals.lua create mode 100644 config/after/plugin/keymaps.lua create mode 100644 config/ftdetect/just.lua delete mode 100644 config/globals.lua delete mode 100644 config/init.lua delete mode 100644 config/keymaps.lua create mode 100644 config/lua/getchoo/efmls.lua create mode 100644 config/lua/getchoo/init.lua delete mode 100644 config/options.lua create mode 100644 config/plugin/bufferline.lua create mode 100644 config/plugin/catppuccin.lua create mode 100644 config/plugin/cmp.lua create mode 100644 config/plugin/dressing.lua create mode 100644 config/plugin/fidget.lua create mode 100644 config/plugin/flash.lua create mode 100644 config/plugin/gitsigns.lua create mode 100644 config/plugin/ibl.lua create mode 100644 config/plugin/lsp-format.lua create mode 100644 config/plugin/lsp.lua create mode 100644 config/plugin/lualine.lua create mode 100644 config/plugin/mini.lua create mode 100644 config/plugin/telescope.lua create mode 100644 config/plugin/treesitter.lua create mode 100644 config/plugin/trouble.lua create mode 100644 config/plugin/which-key.lua delete mode 100644 config/plugins/bufferline.lua delete mode 100644 config/plugins/catppuccin.lua delete mode 100644 config/plugins/cmp.lua delete mode 100644 config/plugins/dressing.lua delete mode 100644 config/plugins/efmls.lua delete mode 100644 config/plugins/fidget.lua delete mode 100644 config/plugins/flash.lua delete mode 100644 config/plugins/gitsigns.lua delete mode 100644 config/plugins/ibl.lua delete mode 100644 config/plugins/init.lua delete mode 100644 config/plugins/lsp-format.lua delete mode 100644 config/plugins/lsp.lua delete mode 100644 config/plugins/lualine.lua delete mode 100644 config/plugins/mini.lua delete mode 100644 config/plugins/telescope.lua delete mode 100644 config/plugins/treesitter.lua delete mode 100644 config/plugins/trouble.lua delete mode 100644 config/plugins/which-key.lua (limited to 'config') diff --git a/config/after/plugin/globals.lua b/config/after/plugin/globals.lua new file mode 100644 index 0000000..f2d5650 --- /dev/null +++ b/config/after/plugin/globals.lua @@ -0,0 +1,4 @@ +-- for deno's lsp +vim.g.markdown_fenced_languages = { + "ts=typescript", +} diff --git a/config/after/plugin/keymaps.lua b/config/after/plugin/keymaps.lua new file mode 100644 index 0000000..8e46904 --- /dev/null +++ b/config/after/plugin/keymaps.lua @@ -0,0 +1,44 @@ +local opts = { noremap = true, silent = true } +local set = function(mode, key, vimcmd) + vim.keymap.set(mode, key, vimcmd, opts) +end + +set("n", "t", function() + local files = require("mini.files") + if not files.close() then + files.open() + end +end) + +set({ "n", "o", "x" }, "s", function() + require("flash").jump() +end) + +for i = 1, 9 do + set("n", "" .. i, function() + vim.cmd("BufferLineGoToBuffer " .. i) + end) +end + +set("n", "q", function() + vim.cmd("BufferLinePickClose") +end) + +local diagnostic = vim.diagnostic +set("n", "e", diagnostic.open_float) +set("n", "[d", diagnostic.goto_prev) +set("n", "]d", diagnostic.goto_next) +set("n", "u", diagnostic.setloclist) +set("n", "ca", vim.lsp.buf.code_action) + +set("n", "f", function() + vim.cmd("Telescope") +end) + +set("n", "p", function() + vim.cmd("TroubleToggle") +end) + +set("n", "z", function() + vim.cmd("FormatToggle") +end) diff --git a/config/ftdetect/just.lua b/config/ftdetect/just.lua new file mode 100644 index 0000000..4c7098a --- /dev/null +++ b/config/ftdetect/just.lua @@ -0,0 +1,5 @@ +vim.filetype.add({ + filename = { + ["justfile"] = "just", + }, +}) diff --git a/config/globals.lua b/config/globals.lua deleted file mode 100644 index ce1cd3b..0000000 --- a/config/globals.lua +++ /dev/null @@ -1,6 +0,0 @@ -vim.g.mapleader = "," - --- for deno's lsp -vim.g.markdown_fenced_languages = { - "ts=typescript", -} diff --git a/config/init.lua b/config/init.lua deleted file mode 100644 index e7b816f..0000000 --- a/config/init.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("getchoo.globals") -require("getchoo.keymaps") -require("getchoo.options") -require("getchoo.plugins") diff --git a/config/keymaps.lua b/config/keymaps.lua deleted file mode 100644 index 8e46904..0000000 --- a/config/keymaps.lua +++ /dev/null @@ -1,44 +0,0 @@ -local opts = { noremap = true, silent = true } -local set = function(mode, key, vimcmd) - vim.keymap.set(mode, key, vimcmd, opts) -end - -set("n", "t", function() - local files = require("mini.files") - if not files.close() then - files.open() - end -end) - -set({ "n", "o", "x" }, "s", function() - require("flash").jump() -end) - -for i = 1, 9 do - set("n", "" .. i, function() - vim.cmd("BufferLineGoToBuffer " .. i) - end) -end - -set("n", "q", function() - vim.cmd("BufferLinePickClose") -end) - -local diagnostic = vim.diagnostic -set("n", "e", diagnostic.open_float) -set("n", "[d", diagnostic.goto_prev) -set("n", "]d", diagnostic.goto_next) -set("n", "u", diagnostic.setloclist) -set("n", "ca", vim.lsp.buf.code_action) - -set("n", "f", function() - vim.cmd("Telescope") -end) - -set("n", "p", function() - vim.cmd("TroubleToggle") -end) - -set("n", "z", function() - vim.cmd("FormatToggle") -end) diff --git a/config/lua/getchoo/efmls.lua b/config/lua/getchoo/efmls.lua new file mode 100644 index 0000000..10d1dee --- /dev/null +++ b/config/lua/getchoo/efmls.lua @@ -0,0 +1,60 @@ +local alex = require("efmls-configs.linters.alex") +alex.rootMarkers = nil +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 selene = require("efmls-configs.linters.selene") +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, + }, + + css = { prettier }, + + fish = { fish_indent }, + + html = { prettier }, + + javascript = { prettier_eslint }, + + json = { prettier }, + + lua = { selene, 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/lua/getchoo/init.lua b/config/lua/getchoo/init.lua new file mode 100644 index 0000000..c73e88d --- /dev/null +++ b/config/lua/getchoo/init.lua @@ -0,0 +1,23 @@ +local opt = vim.opt + +opt.shiftwidth = 2 +opt.tabstop = 2 +-- https://www.reddit.com/r/neovim/comments/14n6iiy/if_you_have_treesitter_make_sure_to_disable +-- TLDR: this breaks things with treesitter indent +opt.smartindent = false +opt.wrap = true +opt.syntax = "on" +opt.termguicolors = true + +local backupDir = vim.fn.stdpath("state") .. "/backup" +local b = io.open(backupDir, "r") +if b then + b:close() +else + os.execute("mkdir -p " .. backupDir) +end + +opt.backupdir = backupDir + +vim.g.mapleader = "," +vim.g.do_filetype_lua = 1 diff --git a/config/options.lua b/config/options.lua deleted file mode 100644 index 5277299..0000000 --- a/config/options.lua +++ /dev/null @@ -1,18 +0,0 @@ -local opt = vim.opt - -opt.shiftwidth = 2 -opt.tabstop = 2 -opt.smartindent = true -opt.wrap = true -opt.syntax = "on" -opt.termguicolors = true - -local backupDir = vim.fn.stdpath("state") .. "/backup" -local b = io.open(backupDir, "r") -if b then - b:close() -else - os.execute("mkdir -p " .. backupDir) -end - -opt.backupdir = backupDir diff --git a/config/plugin/bufferline.lua b/config/plugin/bufferline.lua new file mode 100644 index 0000000..f6e68ef --- /dev/null +++ b/config/plugin/bufferline.lua @@ -0,0 +1,25 @@ +if vim.g.did_load_bufferline_plugin then + return +end +vim.g.did_load_bufferline_plugin = true + +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/plugin/catppuccin.lua b/config/plugin/catppuccin.lua new file mode 100644 index 0000000..f457fc2 --- /dev/null +++ b/config/plugin/catppuccin.lua @@ -0,0 +1,34 @@ +if vim.g.did_load_catppuccin_plugin then + return +end +vim.g.did_load_catppuccin_plugin = true + +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/plugin/cmp.lua b/config/plugin/cmp.lua new file mode 100644 index 0000000..10c750f --- /dev/null +++ b/config/plugin/cmp.lua @@ -0,0 +1,47 @@ +if vim.g.did_load_cmp_plugin then + return +end +vim.g.did_load_cmp_plugin = true + +local cmp = require("cmp") + +cmp.setup({ + completion = { + compleopt = "menu,menuone,insert", + }, + + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + + mapping = { + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.abort(), + [""] = 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/plugin/dressing.lua b/config/plugin/dressing.lua new file mode 100644 index 0000000..dc926fe --- /dev/null +++ b/config/plugin/dressing.lua @@ -0,0 +1,6 @@ +if vim.g.did_load_dressing_plugin then + return +end +vim.g.did_load_dressing_plugin = true + +require("dressing") diff --git a/config/plugin/fidget.lua b/config/plugin/fidget.lua new file mode 100644 index 0000000..59fbb0c --- /dev/null +++ b/config/plugin/fidget.lua @@ -0,0 +1,6 @@ +if vim.g.did_load_fidget_plugin then + return +end +vim.g.did_load_fidget_plugin = true + +require("fidget").setup() diff --git a/config/plugin/flash.lua b/config/plugin/flash.lua new file mode 100644 index 0000000..f3e1c15 --- /dev/null +++ b/config/plugin/flash.lua @@ -0,0 +1,6 @@ +if vim.g.did_load_flash_plugin then + return +end +vim.g.did_load_flash_plugin = true + +require("flash").setup() diff --git a/config/plugin/gitsigns.lua b/config/plugin/gitsigns.lua new file mode 100644 index 0000000..7f6f457 --- /dev/null +++ b/config/plugin/gitsigns.lua @@ -0,0 +1,6 @@ +if vim.g.did_load_gitsigns_plugin then + return +end +vim.g.did_load_gitsigns_plugin = true + +require("gitsigns").setup() diff --git a/config/plugin/ibl.lua b/config/plugin/ibl.lua new file mode 100644 index 0000000..d780c74 --- /dev/null +++ b/config/plugin/ibl.lua @@ -0,0 +1,27 @@ +if vim.g.did_load_ibl_plugin then + return +end +vim.g.did_load_ibl_plugin = true + +require("ibl").setup({ + exclude = { + filetypes = { + "help", + "neo-tree", + "Trouble", + "lazy", + "mason", + "notify", + "toggleterm", + }, + }, + + indent = { + char = "│", + tab_char = "│", + }, + + scope = { + enabled = false, + }, +}) diff --git a/config/plugin/lsp-format.lua b/config/plugin/lsp-format.lua new file mode 100644 index 0000000..e21bdfd --- /dev/null +++ b/config/plugin/lsp-format.lua @@ -0,0 +1,6 @@ +if vim.g.did_load_lsp_format_plugin then + return +end +vim.g.did_load_lsp_format_plugin = true + +require("lsp-format").setup() diff --git a/config/plugin/lsp.lua b/config/plugin/lsp.lua new file mode 100644 index 0000000..0312523 --- /dev/null +++ b/config/plugin/lsp.lua @@ -0,0 +1,98 @@ +if vim.g.did_load_lsp_plugin then + return +end +vim.g.did_load_lsp_plugin = true + +local lsp_servers = { + bashls = { + binary = "bash-language-server", + }, + + clangd = {}, + + eslint = {}, + + efm = { + binary = "efm-langserver", + extraOptions = require("getchoo.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/plugin/lualine.lua b/config/plugin/lualine.lua new file mode 100644 index 0000000..8a8f87a --- /dev/null +++ b/config/plugin/lualine.lua @@ -0,0 +1,11 @@ +if vim.g.did_load_lualine_plugin then + return +end +vim.g.did_load_lualine_plugin = true + +require("lualine").setup({ + options = { + theme = "catppuccin", + }, + extensions = { "neo-tree", "trouble" }, +}) diff --git a/config/plugin/mini.lua b/config/plugin/mini.lua new file mode 100644 index 0000000..a1ab447 --- /dev/null +++ b/config/plugin/mini.lua @@ -0,0 +1,34 @@ +if vim.g.did_load_mini_plugin then + return +end +vim.g.did_load_mini_plugin = true + +require("mini.comment").setup({ + options = { + custom_commentstring = function() + return require("ts_context_commentstring.internal").calculate_commentstring() + or vim.bo.context_commentstring + end, + }, +}) + +require("mini.files").setup() +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/plugin/telescope.lua b/config/plugin/telescope.lua new file mode 100644 index 0000000..d50d742 --- /dev/null +++ b/config/plugin/telescope.lua @@ -0,0 +1,6 @@ +if vim.g.did_load_telescope_plugin then + return +end +vim.g.did_load_telescope_plugin = true + +require("telescope").setup() diff --git a/config/plugin/treesitter.lua b/config/plugin/treesitter.lua new file mode 100644 index 0000000..f2da8f7 --- /dev/null +++ b/config/plugin/treesitter.lua @@ -0,0 +1,16 @@ +if vim.g.did_load_treesitter_plugin then + return +end +vim.g.did_load_treesitter_plugin = true + +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/plugin/trouble.lua b/config/plugin/trouble.lua new file mode 100644 index 0000000..e1e7768 --- /dev/null +++ b/config/plugin/trouble.lua @@ -0,0 +1,6 @@ +if vim.g.did_load_trouble_plugin then + return +end +vim.g.did_load_trouble_plugin = true + +require("trouble").setup() diff --git a/config/plugin/which-key.lua b/config/plugin/which-key.lua new file mode 100644 index 0000000..e6d5ecc --- /dev/null +++ b/config/plugin/which-key.lua @@ -0,0 +1,10 @@ +if vim.g.did_load_which_key_plugin then + return +end +vim.g.did_load_which_key_plugin = true + +require("which-key").setup({ + plugins = { + spelling = { enable = true }, + }, +}) diff --git a/config/plugins/bufferline.lua b/config/plugins/bufferline.lua deleted file mode 100644 index a74dfa2..0000000 --- a/config/plugins/bufferline.lua +++ /dev/null @@ -1,20 +0,0 @@ -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/catppuccin.lua b/config/plugins/catppuccin.lua deleted file mode 100644 index 6f8c367..0000000 --- a/config/plugins/catppuccin.lua +++ /dev/null @@ -1,29 +0,0 @@ -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 deleted file mode 100644 index eee5eb1..0000000 --- a/config/plugins/cmp.lua +++ /dev/null @@ -1,42 +0,0 @@ -local cmp = require("cmp") - -cmp.setup({ - completion = { - compleopt = "menu,menuone,insert", - }, - - snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - }, - - mapping = { - [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.abort(), - [""] = 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/dressing.lua b/config/plugins/dressing.lua deleted file mode 100644 index a4fcb44..0000000 --- a/config/plugins/dressing.lua +++ /dev/null @@ -1 +0,0 @@ -require("dressing") diff --git a/config/plugins/efmls.lua b/config/plugins/efmls.lua deleted file mode 100644 index 979cafb..0000000 --- a/config/plugins/efmls.lua +++ /dev/null @@ -1,59 +0,0 @@ -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/fidget.lua b/config/plugins/fidget.lua deleted file mode 100644 index 4f1ab35..0000000 --- a/config/plugins/fidget.lua +++ /dev/null @@ -1 +0,0 @@ -require("fidget").setup() diff --git a/config/plugins/flash.lua b/config/plugins/flash.lua deleted file mode 100644 index 9f9c773..0000000 --- a/config/plugins/flash.lua +++ /dev/null @@ -1 +0,0 @@ -require("flash").setup() diff --git a/config/plugins/gitsigns.lua b/config/plugins/gitsigns.lua deleted file mode 100644 index d16d238..0000000 --- a/config/plugins/gitsigns.lua +++ /dev/null @@ -1 +0,0 @@ -require("gitsigns").setup() diff --git a/config/plugins/ibl.lua b/config/plugins/ibl.lua deleted file mode 100644 index b63139b..0000000 --- a/config/plugins/ibl.lua +++ /dev/null @@ -1,22 +0,0 @@ -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/init.lua b/config/plugins/init.lua deleted file mode 100644 index 5610f2d..0000000 --- a/config/plugins/init.lua +++ /dev/null @@ -1,16 +0,0 @@ -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.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 deleted file mode 100644 index 6b57642..0000000 --- a/config/plugins/lsp-format.lua +++ /dev/null @@ -1 +0,0 @@ -require("lsp-format").setup() diff --git a/config/plugins/lsp.lua b/config/plugins/lsp.lua deleted file mode 100644 index 9492df1..0000000 --- a/config/plugins/lsp.lua +++ /dev/null @@ -1,93 +0,0 @@ -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/lualine.lua b/config/plugins/lualine.lua deleted file mode 100644 index 2727d75..0000000 --- a/config/plugins/lualine.lua +++ /dev/null @@ -1,6 +0,0 @@ -require("lualine").setup({ - options = { - theme = "catppuccin", - }, - extensions = { "neo-tree", "trouble" }, -}) diff --git a/config/plugins/mini.lua b/config/plugins/mini.lua deleted file mode 100644 index e2b3b46..0000000 --- a/config/plugins/mini.lua +++ /dev/null @@ -1,29 +0,0 @@ -require("mini.comment").setup({ - options = { - custom_commentstring = function() - return require("ts_context_commentstring.internal").calculate_commentstring() - or vim.bo.context_commentstring - end, - }, -}) - -require("mini.files").setup() -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/telescope.lua b/config/plugins/telescope.lua deleted file mode 100644 index be3366b..0000000 --- a/config/plugins/telescope.lua +++ /dev/null @@ -1 +0,0 @@ -require("telescope").setup() diff --git a/config/plugins/treesitter.lua b/config/plugins/treesitter.lua deleted file mode 100644 index e9b88f2..0000000 --- a/config/plugins/treesitter.lua +++ /dev/null @@ -1,11 +0,0 @@ -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/trouble.lua b/config/plugins/trouble.lua deleted file mode 100644 index 38ef1e9..0000000 --- a/config/plugins/trouble.lua +++ /dev/null @@ -1 +0,0 @@ -require("trouble").setup() diff --git a/config/plugins/which-key.lua b/config/plugins/which-key.lua deleted file mode 100644 index 32ca2ff..0000000 --- a/config/plugins/which-key.lua +++ /dev/null @@ -1,5 +0,0 @@ -require("which-key").setup({ - plugins = { - spelling = { enable = true }, - }, -}) -- cgit v1.2.3