summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorseth <[email protected]>2023-12-18 01:28:42 -0500
committerseth <[email protected]>2023-12-18 02:18:35 -0500
commit8faa242f21648e52a6bbdfa803fd4ea1b0e347e0 (patch)
treeeff6694cefb2f821bf19b0d8cb3d97bf48cb15b9 /lua
parent9fe8afd0c5f2b439176728d8863570bf22614dbd (diff)
port to nixvim
Diffstat (limited to 'lua')
-rw-r--r--lua/getchoo/globals.lua1
-rw-r--r--lua/getchoo/init.lua4
-rw-r--r--lua/getchoo/keymaps.lua47
-rw-r--r--lua/getchoo/options.lua12
-rw-r--r--lua/getchoo/plugins/bufferline.lua18
-rw-r--r--lua/getchoo/plugins/catppuccin.lua30
-rw-r--r--lua/getchoo/plugins/cmp.lua36
-rw-r--r--lua/getchoo/plugins/general.lua55
-rw-r--r--lua/getchoo/plugins/init.lua3
-rw-r--r--lua/getchoo/plugins/lsp.lua26
-rw-r--r--lua/getchoo/plugins/lspconfig.lua47
-rw-r--r--lua/getchoo/plugins/lualine.lua6
-rw-r--r--lua/getchoo/plugins/neo-tree.lua5
-rw-r--r--lua/getchoo/plugins/null-ls.lua49
-rw-r--r--lua/getchoo/plugins/ui.lua40
15 files changed, 0 insertions, 379 deletions
diff --git a/lua/getchoo/globals.lua b/lua/getchoo/globals.lua
deleted file mode 100644
index 79db9e3..0000000
--- a/lua/getchoo/globals.lua
+++ /dev/null
@@ -1 +0,0 @@
-vim.g.mapleader = ","
diff --git a/lua/getchoo/init.lua b/lua/getchoo/init.lua
deleted file mode 100644
index e7b816f..0000000
--- a/lua/getchoo/init.lua
+++ /dev/null
@@ -1,4 +0,0 @@
-require("getchoo.globals")
-require("getchoo.keymaps")
-require("getchoo.options")
-require("getchoo.plugins")
diff --git a/lua/getchoo/keymaps.lua b/lua/getchoo/keymaps.lua
deleted file mode 100644
index 8068db9..0000000
--- a/lua/getchoo/keymaps.lua
+++ /dev/null
@@ -1,47 +0,0 @@
-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()
- local vimcmd = "BufferLineGoToBuffer " .. i
- vim.cmd(vimcmd)
- end)
-end
-
-set("n", "<leader>q", function()
- vim.cmd("BufferLinePickClose")
-end)
-
-set("n", "<leader>e", vim.diagnostic.open_float)
-set("n", "[d", vim.diagnostic.goto_prev)
-set("n", "]d", vim.diagnostic.goto_next)
-set("n", "<leader>u", vim.diagnostic.setloclist)
-
-set("n", "<leader>f", function()
- vim.cmd("Telescope")
-end)
-
-set("n", "<leader>p", function()
- vim.cmd("TroubleToggle")
-end)
-
-set("n", "<leader>z", function()
- vim.api.nvim_clear_autocmds({ group = "LspFormatting" })
-end)
diff --git a/lua/getchoo/options.lua b/lua/getchoo/options.lua
deleted file mode 100644
index 7a13888..0000000
--- a/lua/getchoo/options.lua
+++ /dev/null
@@ -1,12 +0,0 @@
-local opt = vim.opt
-
--- text options
-opt.tabstop = 2
-opt.shiftwidth = 2
-opt.expandtab = false
-opt.smartindent = true
-opt.wrap = true
-
--- appearance
-opt.syntax = "on"
-opt.termguicolors = true
diff --git a/lua/getchoo/plugins/bufferline.lua b/lua/getchoo/plugins/bufferline.lua
deleted file mode 100644
index b945a62..0000000
--- a/lua/getchoo/plugins/bufferline.lua
+++ /dev/null
@@ -1,18 +0,0 @@
-require("bufferline").setup({
- options = {
- always_show_bufferline = false,
- highlights = require("catppuccin.groups.integrations.bufferline").get(),
- 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/lua/getchoo/plugins/catppuccin.lua b/lua/getchoo/plugins/catppuccin.lua
deleted file mode 100644
index 853d283..0000000
--- a/lua/getchoo/plugins/catppuccin.lua
+++ /dev/null
@@ -1,30 +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", -- mocha, macchiato, frappe, latte
- integrations = {
- cmp = true,
- flash = true,
- gitsigns = true,
- indent_blankline = {
- enabled = true,
- },
- lsp_trouble = true,
- native_lsp = {
- enabled = true,
- },
- neotree = true,
- notify = true,
- treesitter_context = true,
- treesitter = true,
- telescope = true,
- which_key = true,
- },
-
- no_italic = true,
-})
-
-vim.cmd.colorscheme("catppuccin")
diff --git a/lua/getchoo/plugins/cmp.lua b/lua/getchoo/plugins/cmp.lua
deleted file mode 100644
index 323e342..0000000
--- a/lua/getchoo/plugins/cmp.lua
+++ /dev/null
@@ -1,36 +0,0 @@
-local cmp = require("cmp")
-local luasnip = require("luasnip")
-local mapping = cmp.mapping
-
-require("cmp").setup({
- completion = {
- completeopt = "menu,menuone,noinsert",
- },
-
- snippet = {
- expand = function(args)
- luasnip.lsp_expand(args.body)
- end,
- },
-
- mapping = mapping.preset.insert({
- ["<C-n>"] = mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
- ["<C-p>"] = mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
- ["<C-b>"] = mapping.scroll_docs(-4),
- ["<C-f>"] = mapping.scroll_docs(4),
- ["<C-Space>"] = mapping.complete(),
- ["<C-e>"] = mapping.abort(),
- ["<CR>"] = mapping.confirm({ select = true }),
- ["<S-CR>"] = mapping.confirm({
- behavior = cmp.ConfirmBehavior.Replace,
- select = true,
- }),
- }),
-
- sources = cmp.config.sources({
- { name = "nvim_lsp" },
- { name = "luasnip" },
- { name = "async_path" },
- { name = "buffer" },
- }),
-})
diff --git a/lua/getchoo/plugins/general.lua b/lua/getchoo/plugins/general.lua
deleted file mode 100644
index e9806f3..0000000
--- a/lua/getchoo/plugins/general.lua
+++ /dev/null
@@ -1,55 +0,0 @@
-require("getchoo.plugins.bufferline")
-require("getchoo.plugins.catppuccin")
-require("getchoo.plugins.lualine")
-require("getchoo.plugins.neo-tree")
-
----- gitsigns
-require("gitsigns").setup()
-
----- indent-blankline.nvim
-require("ibl").setup({
- exclude = {
- filetypes = {
- "help",
- "neo-tree",
- "Trouble",
- "lazy",
- "mason",
- "notify",
- "toggleterm",
- },
- },
-
- indent = {
- char = "│",
- tab_char = "│",
- },
-
- scope = { enabled = false },
-})
-
----- mini.nvim
-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,
-})
-
----- which-key
-require("which-key").setup({
- plugins = { spelling = true },
-})
diff --git a/lua/getchoo/plugins/init.lua b/lua/getchoo/plugins/init.lua
deleted file mode 100644
index 95883c7..0000000
--- a/lua/getchoo/plugins/init.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-require("getchoo.plugins.general")
-require("getchoo.plugins.lsp")
-require("getchoo.plugins.ui")
diff --git a/lua/getchoo/plugins/lsp.lua b/lua/getchoo/plugins/lsp.lua
deleted file mode 100644
index 1732679..0000000
--- a/lua/getchoo/plugins/lsp.lua
+++ /dev/null
@@ -1,26 +0,0 @@
-require("getchoo.plugins.cmp")
-require("getchoo.plugins.lspconfig")
-require("getchoo.plugins.null-ls")
-
-require("gitsigns").setup()
-
-require("fidget").setup()
-
-require("mini.comment").setup({
- options = {
- custom_commentstring = function()
- return require("ts_context_commentstring.internal").calculate_commentstring()
- or vim.bo.context_commentstring
- end,
- },
-})
-
-require("nvim-treesitter.configs").setup({
- auto_install = false,
- highlight = { enable = true },
- indent = { enable = true },
-})
-
-vim.g.skip_ts_context_commentstring_module = true
-
-require("trouble").setup()
diff --git a/lua/getchoo/plugins/lspconfig.lua b/lua/getchoo/plugins/lspconfig.lua
deleted file mode 100644
index 8811e3f..0000000
--- a/lua/getchoo/plugins/lspconfig.lua
+++ /dev/null
@@ -1,47 +0,0 @@
-local sources = {
- ["bashls"] = "bash-language-server",
- ["clangd"] = "clangd",
- ["eslint"] = "eslint",
- ["nil_ls"] = "nil",
- ["pyright"] = "pyright-langserver",
- ["rust_analyzer"] = "rust-analyzer",
- ["tsserver"] = "typescript-language-server",
-}
-
-local capabilities = vim.tbl_deep_extend(
- "force",
- require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()),
- { workspace = { didChangeWatchedFiles = { dynamicRegistration = true } } }
-)
-
-local all_config = {
- capabilities = capabilities,
-}
-
-local servers = {}
-for server, binary in pairs(sources) do
- if vim.fn.executable(binary) == 1 then
- servers[server] = all_config
- end
-end
-
-servers["lua_ls"] = {
- capabilities = capabilities,
- settings = {
- Lua = {
- runtime = {
- version = "LuaJIT",
- },
- diagnostics = {
- globals = { "vim" },
- },
- workspace = {
- library = vim.api.nvim_get_runtime_file("", true),
- },
- },
- },
-}
-
-for server, settings in pairs(servers) do
- require("lspconfig")[server].setup(settings)
-end
diff --git a/lua/getchoo/plugins/lualine.lua b/lua/getchoo/plugins/lualine.lua
deleted file mode 100644
index 2727d75..0000000
--- a/lua/getchoo/plugins/lualine.lua
+++ /dev/null
@@ -1,6 +0,0 @@
-require("lualine").setup({
- options = {
- theme = "catppuccin",
- },
- extensions = { "neo-tree", "trouble" },
-})
diff --git a/lua/getchoo/plugins/neo-tree.lua b/lua/getchoo/plugins/neo-tree.lua
deleted file mode 100644
index 1d6f7f5..0000000
--- a/lua/getchoo/plugins/neo-tree.lua
+++ /dev/null
@@ -1,5 +0,0 @@
-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/lua/getchoo/plugins/null-ls.lua b/lua/getchoo/plugins/null-ls.lua
deleted file mode 100644
index a4f86dc..0000000
--- a/lua/getchoo/plugins/null-ls.lua
+++ /dev/null
@@ -1,49 +0,0 @@
-local null_ls = require("null-ls")
-local diagnostics = null_ls.builtins.diagnostics
-local formatting = null_ls.builtins.formatting
-
-local lsp_formatting = function(bufnr)
- vim.lsp.buf.format({
- filter = function(client)
- return client.name == "null-ls"
- end,
- bufnr = bufnr,
- })
-end
-
-local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
-
-null_ls.setup({
- on_attach = function(client, bufnr)
- if client.supports_method("textDocument/formatting") then
- vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
- vim.api.nvim_create_autocmd("BufWritePre", {
- group = augroup,
- buffer = bufnr,
- callback = function()
- lsp_formatting(bufnr)
- end,
- })
- end
- end,
-
- sources = {
- diagnostics.actionlint,
- diagnostics.alex,
- diagnostics.codespell,
- diagnostics.deadnix,
- diagnostics.pylint,
- diagnostics.shellcheck,
- diagnostics.statix,
- formatting.alejandra,
- formatting.beautysh,
- formatting.codespell,
- formatting.just,
- formatting.nimpretty,
- formatting.prettier,
- formatting.rustfmt,
- formatting.shellharden,
- formatting.stylua,
- formatting.yapf,
- },
-})
diff --git a/lua/getchoo/plugins/ui.lua b/lua/getchoo/plugins/ui.lua
deleted file mode 100644
index 7a8c085..0000000
--- a/lua/getchoo/plugins/ui.lua
+++ /dev/null
@@ -1,40 +0,0 @@
-require("dressing")
-
-vim.ui.select = function(...)
- return vim.ui.select(...)
-end
-
-vim.ui.input = function(...)
- return vim.ui.input(...)
-end
-
-vim.notify = require("notify")
-
-require("noice").setup({
- lsp = {
- override = {
- ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
- ["vim.lsp.util.stylize_markdown"] = true,
- ["cmp.entry.get_documentation"] = true,
- },
- },
- routes = {
- {
- filter = {
- event = "msg_show",
- any = {
- { find = "%d+L, %d+B" },
- { find = "; after #%d+" },
- { find = "; before #%d+" },
- },
- },
- view = "mini",
- },
- },
- presets = {
- bottom_search = true,
- command_palette = true,
- long_message_to_split = true,
- inc_rename = true,
- },
-})