diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/after/plugin/globals.lua | 4 | ||||
| -rw-r--r-- | config/after/plugin/keymaps.lua | 44 | ||||
| -rw-r--r-- | config/default.nix | 19 | ||||
| -rw-r--r-- | config/ftdetect/just.lua | 5 | ||||
| -rw-r--r-- | config/lua/getchoo/efmls.lua | 58 | ||||
| -rw-r--r-- | config/lua/getchoo/init.lua | 25 | ||||
| -rw-r--r-- | config/plugin/bufferline.lua | 25 | ||||
| -rw-r--r-- | config/plugin/catppuccin.lua | 33 | ||||
| -rw-r--r-- | config/plugin/cmp.lua | 47 | ||||
| -rw-r--r-- | config/plugin/dressing.lua | 6 | ||||
| -rw-r--r-- | config/plugin/fidget.lua | 6 | ||||
| -rw-r--r-- | config/plugin/flash.lua | 6 | ||||
| -rw-r--r-- | config/plugin/gitsigns.lua | 6 | ||||
| -rw-r--r-- | config/plugin/ibl.lua | 27 | ||||
| -rw-r--r-- | config/plugin/lsp-format.lua | 6 | ||||
| -rw-r--r-- | config/plugin/lsp.lua | 129 | ||||
| -rw-r--r-- | config/plugin/lualine.lua | 11 | ||||
| -rw-r--r-- | config/plugin/mini.lua | 26 | ||||
| -rw-r--r-- | config/plugin/telescope.lua | 6 | ||||
| -rw-r--r-- | config/plugin/treesitter.lua | 11 | ||||
| -rw-r--r-- | config/plugin/trouble.lua | 6 | ||||
| -rw-r--r-- | config/plugin/which-key.lua | 10 |
22 files changed, 0 insertions, 516 deletions
diff --git a/config/after/plugin/globals.lua b/config/after/plugin/globals.lua deleted file mode 100644 index f2d5650..0000000 --- a/config/after/plugin/globals.lua +++ /dev/null @@ -1,4 +0,0 @@ --- 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 deleted file mode 100644 index 9ff505a..0000000 --- a/config/after/plugin/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", "<leader>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", "<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("Trouble diagnostics toggle") -end) - -set("n", "<leader>z", function() - vim.cmd("FormatToggle") -end) diff --git a/config/default.nix b/config/default.nix deleted file mode 100644 index ece45ef..0000000 --- a/config/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - lib, - vimUtils, - version, -}: -vimUtils.buildVimPlugin { - pname = "neovim-config"; - inherit version; - - src = lib.fileset.toSource { - root = ./.; - fileset = lib.fileset.unions [ - ./after - ./ftdetect - ./lua - ./plugin - ]; - }; -} diff --git a/config/ftdetect/just.lua b/config/ftdetect/just.lua deleted file mode 100644 index 4c7098a..0000000 --- a/config/ftdetect/just.lua +++ /dev/null @@ -1,5 +0,0 @@ -vim.filetype.add({ - filename = { - ["justfile"] = "just", - }, -}) diff --git a/config/lua/getchoo/efmls.lua b/config/lua/getchoo/efmls.lua deleted file mode 100644 index 92d61e9..0000000 --- a/config/lua/getchoo/efmls.lua +++ /dev/null @@ -1,58 +0,0 @@ -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 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 statix = require("efmls-configs.linters.statix") -local stylua = require("efmls-configs.formatters.stylua") - -local languages = { - all = { alex }, - - 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 }, - - 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 deleted file mode 100644 index a919bc8..0000000 --- a/config/lua/getchoo/init.lua +++ /dev/null @@ -1,25 +0,0 @@ -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.number = true -opt.wrap = true -opt.syntax = "on" -opt.termguicolors = true -opt.mouse = "a" - -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/plugin/bufferline.lua b/config/plugin/bufferline.lua deleted file mode 100644 index f6e68ef..0000000 --- a/config/plugin/bufferline.lua +++ /dev/null @@ -1,25 +0,0 @@ -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 deleted file mode 100644 index 79b84ec..0000000 --- a/config/plugin/catppuccin.lua +++ /dev/null @@ -1,33 +0,0 @@ -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 = 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 deleted file mode 100644 index 10c750f..0000000 --- a/config/plugin/cmp.lua +++ /dev/null @@ -1,47 +0,0 @@ -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 = { - ["<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/plugin/dressing.lua b/config/plugin/dressing.lua deleted file mode 100644 index dc926fe..0000000 --- a/config/plugin/dressing.lua +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 59fbb0c..0000000 --- a/config/plugin/fidget.lua +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index f3e1c15..0000000 --- a/config/plugin/flash.lua +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 7f6f457..0000000 --- a/config/plugin/gitsigns.lua +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index d780c74..0000000 --- a/config/plugin/ibl.lua +++ /dev/null @@ -1,27 +0,0 @@ -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 deleted file mode 100644 index e21bdfd..0000000 --- a/config/plugin/lsp-format.lua +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 356add3..0000000 --- a/config/plugin/lsp.lua +++ /dev/null @@ -1,129 +0,0 @@ -if vim.g.did_load_lsp_plugin then - return -end -vim.g.did_load_lsp_plugin = true - -local lsp_servers = { - astro = { - binary = "astro-ls", - }, - - bashls = { - binary = "bash-language-server", - }, - - biome = {}, - - clangd = {}, - - denols = { - binary = "deno", - }, - - dprint = {}, - - eslint = { - binary = "vscode-eslint-language-server", - }, - - 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 = { "nixfmt" } }, - }, - }, - }, - }, - - nim_langserver = { - binary = "nimlangserver", - }, - - pyright = { - extraOptions = { - settings = { - -- ruff is used instead - pyright = { disableOrganizeImports = true }, - python = { ignore = { "*" } }, - }, - }, - }, - - 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" }, - }, - }, - }, - - tsserver = { - binary = "typescript-language-server", - }, - - typos_lsp = { - binary = "typos-lsp", - }, - - typst_lsp = { - binary = "typst-lsp", - }, -} - -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 deleted file mode 100644 index 8a8f87a..0000000 --- a/config/plugin/lualine.lua +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 1911516..0000000 --- a/config/plugin/mini.lua +++ /dev/null @@ -1,26 +0,0 @@ -if vim.g.did_load_mini_plugin then - return -end -vim.g.did_load_mini_plugin = true - -require("mini.comment").setup() -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 deleted file mode 100644 index d50d742..0000000 --- a/config/plugin/telescope.lua +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 4668fe8..0000000 --- a/config/plugin/treesitter.lua +++ /dev/null @@ -1,11 +0,0 @@ -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 }, -}) diff --git a/config/plugin/trouble.lua b/config/plugin/trouble.lua deleted file mode 100644 index e1e7768..0000000 --- a/config/plugin/trouble.lua +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index e6d5ecc..0000000 --- a/config/plugin/which-key.lua +++ /dev/null @@ -1,10 +0,0 @@ -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 }, - }, -}) |
