summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/getchoo/init.lua21
-rw-r--r--lua/getchoo/keybinds.lua49
-rw-r--r--lua/getchoo/plugins/general.lua107
-rw-r--r--lua/getchoo/plugins/init.lua11
-rw-r--r--lua/getchoo/plugins/lazy.lua93
-rw-r--r--lua/getchoo/plugins/lsp.lua183
-rw-r--r--lua/getchoo/plugins/mason.lua7
-rw-r--r--lua/getchoo/plugins/ui.lua40
8 files changed, 0 insertions, 511 deletions
diff --git a/lua/getchoo/init.lua b/lua/getchoo/init.lua
deleted file mode 100644
index d33f072..0000000
--- a/lua/getchoo/init.lua
+++ /dev/null
@@ -1,21 +0,0 @@
-local cmd = vim.cmd
-local opt = vim.opt
-
--- text options
-opt.tabstop = 2
-opt.shiftwidth = 2
-opt.expandtab = false
-opt.smartindent = true
-opt.wrap = true
-opt.relativenumber = true
-
--- appearance
-opt.syntax = "on"
-cmd("filetype plugin indent on")
-opt.termguicolors = true
-
-require("getchoo.keybinds")
-
-if vim.g.use_plugins then
- require("getchoo.plugins")
-end
diff --git a/lua/getchoo/keybinds.lua b/lua/getchoo/keybinds.lua
deleted file mode 100644
index 7dab12e..0000000
--- a/lua/getchoo/keybinds.lua
+++ /dev/null
@@ -1,49 +0,0 @@
-vim.g.mapleader = ","
-
-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/plugins/general.lua b/lua/getchoo/plugins/general.lua
deleted file mode 100644
index f9a0c2c..0000000
--- a/lua/getchoo/plugins/general.lua
+++ /dev/null
@@ -1,107 +0,0 @@
----- catppuccin
-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,
- native_lsp = {
- enabled = true,
- },
- neotree = true,
- treesitter_context = true,
- treesitter = true,
- telescope = true,
- lsp_trouble = true,
- },
- no_italic = true,
-})
-vim.api.nvim_command("colorscheme catppuccin")
-
----- bufferline
-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",
- },
- },
- },
-})
-
----- gitsigns
-require("gitsigns").setup()
-
----- indent-blankline.nvim
-require("indent_blankline").setup({
- filetype_exclude = {
- "help",
- "neo-tree",
- "Trouble",
- "lazy",
- "mason",
- "notify",
- "toggleterm",
- },
- show_trailing_blankline_indent = false,
- show_current_context = false,
-})
-
----- lualine
-require("lualine").setup({
- options = {
- theme = "catppuccin",
- },
- extensions = { "neo-tree", "trouble" },
-})
-
----- 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,
-})
-
----- nvim-tree
-require("neo-tree").setup({
- sources = { "filesystem", "buffers", "git_status", "document_symbols" },
- open_files_do_not_replace_types = { "terminal", "Trouble", "qf", "Outline" },
- filesystem = {
- bind_to_cwd = false,
- follow_current_file = { enabled = true },
- use_libuv_file_watcher = true,
- },
-})
-
----- 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 43daa5b..0000000
--- a/lua/getchoo/plugins/init.lua
+++ /dev/null
@@ -1,11 +0,0 @@
-if vim.g.use_lazy then
- require("getchoo.plugins.lazy")
-end
-
-require("getchoo.plugins.general")
-require("getchoo.plugins.lsp")
-require("getchoo.plugins.ui")
-
-if vim.g.auto_install then
- require("getchoo.plugins.mason")
-end
diff --git a/lua/getchoo/plugins/lazy.lua b/lua/getchoo/plugins/lazy.lua
deleted file mode 100644
index 917bf33..0000000
--- a/lua/getchoo/plugins/lazy.lua
+++ /dev/null
@@ -1,93 +0,0 @@
-local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
-
--- bootstrap lazy
-if not vim.loop.fs_stat(lazypath) then
- vim.fn.system({
- "git",
- "clone",
- "--filter=blob:none",
- "https://github.com/folke/lazy.nvim.git",
- "--branch=stable", -- latest stable release
- lazypath,
- })
-end
-
-vim.opt.rtp:prepend(lazypath)
-
-require("lazy").setup({
- --- general
-
- { "catppuccin/nvim", name = "catppuccin", priority = 1000 },
-
- { "j-hui/fidget.nvim", tag = "legacy" },
- { "folke/flash.nvim", event = "VeryLazy" },
-
- "lewis6991/gitsigns.nvim",
- "lukas-reineke/indent-blankline.nvim",
-
- { "nvim-lualine/lualine.nvim", dependencies = "nvim-tree/nvim-web-devicons" },
-
- {
- "nvim-neo-tree/neo-tree.nvim",
- branch = "v3.x",
- dependencies = {
- "nvim-lua/plenary.nvim",
- "nvim-tree/nvim-web-devicons",
- "MunifTanjim/nui.nvim",
- },
- },
-
- { "echasnovski/mini.nvim", version = false, event = "VeryLazy" },
-
- --- completion
-
- {
- "hrsh7th/nvim-cmp",
- dependencies = {
- "hrsh7th/cmp-nvim-lsp",
- "hrsh7th/cmp-buffer",
- "saadparwaiz1/cmp_luasnip",
- "FelipeLema/cmp-async-path",
- "L3MON4D3/LuaSnip",
- },
- },
-
- --- ui
-
- { "stevearc/dressing.nvim", lazy = true },
- { "folke/noice.nvim", event = "VeryLazy" },
- { "MunifTanjim/nui.nvim", lazy = true },
- "rcarriga/nvim-notify",
-
- --- lsp
-
- "neovim/nvim-lspconfig",
-
- {
- "nvim-treesitter/nvim-treesitter",
- dependencies = {
- "JoosepAlviste/nvim-ts-context-commentstring",
- },
- },
- {
- "jose-elias-alvarez/null-ls.nvim",
- dependencies = {
- "nvim-lua/plenary.nvim",
- },
- },
-
- {
- "williamboman/mason.nvim",
- dependencies = {
- "williamboman/mason-lspconfig.nvim",
- "jay-babu/mason-null-ls.nvim",
- },
- },
-
- --- utils
-
- { "akinsho/bufferline.nvim", version = "*", dependencies = "nvim-tree/nvim-web-devicons" },
- { "nvim-telescope/telescope.nvim", tag = "0.1.2" },
- { "folke/trouble.nvim", dependencies = { "nvim-tree/nvim-web-devicons" } },
- { "folke/which-key.nvim", event = "VeryLazy" },
-})
diff --git a/lua/getchoo/plugins/lsp.lua b/lua/getchoo/plugins/lsp.lua
deleted file mode 100644
index e19b53b..0000000
--- a/lua/getchoo/plugins/lsp.lua
+++ /dev/null
@@ -1,183 +0,0 @@
----- cmp
-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" },
- }),
-})
-
----- gitsigns
-require("gitsigns").setup()
-
----- fidget
-require("fidget").setup()
-
----- lsp sources
-local null_ls = require("null-ls")
-local diagnostics = null_ls.builtins.diagnostics
-local formatting = null_ls.builtins.formatting
-
-local sources = {
- lsp_servers = {
- ["bashls"] = "bash-language-server",
- ["clangd"] = "clangd",
- ["pyright"] = "pyright-langserver",
- ["rust_analyzer"] = "rust-analyzer",
- ["tsserver"] = "typescript-language-server",
- },
- null_ls = {
- diagnostics.actionlint,
- diagnostics.alex,
- diagnostics.codespell,
- diagnostics.deadnix,
- diagnostics.eslint,
- 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,
- },
-}
-
---- lsp config
-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.lsp_servers) 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),
- },
- },
- },
-}
-
-servers["nil_ls"] = {
- capabilities = capabilities,
- settings = {
- ["nil"] = {
- nix = {
- flake = {
- autoArchive = false,
- autoEvalInputs = false,
- },
- },
- },
- },
-}
-
-for server, settings in pairs(servers) do
- require("lspconfig")[server].setup(settings)
-end
-
----- null-ls
--- auto-format
-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", {})
-local formatting_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
-
-require("mini.comment").setup({
- options = {
- custom_commentstring = function()
- return require("ts_context_commentstring.internal").calculate_commentstring()
- or vim.bo.context_commentstring
- end,
- },
-})
-
-require("null-ls").setup({
- on_attach = formatting_on_attach,
- sources = sources.null_ls,
-})
-
-require("nvim-treesitter.configs").setup({
- auto_install = (not vim.g.auto_install == nil) and vim.g.auto_install,
- highlight = { enable = true },
- indent = { enable = true },
- context_commentstring = {
- enable = true,
- enable_autocmd = false,
- },
-})
-
----- trouble
-require("trouble").setup()
diff --git a/lua/getchoo/plugins/mason.lua b/lua/getchoo/plugins/mason.lua
deleted file mode 100644
index 083d97c..0000000
--- a/lua/getchoo/plugins/mason.lua
+++ /dev/null
@@ -1,7 +0,0 @@
-local commonArgs = {
- automatic_installation = true,
-}
-
-require("mason").setup()
-require("mason-null-ls").setup(commonArgs)
-require("mason-lspconfig").setup(commonArgs)
diff --git a/lua/getchoo/plugins/ui.lua b/lua/getchoo/plugins/ui.lua
deleted file mode 100644
index 3a0cc2e..0000000
--- a/lua/getchoo/plugins/ui.lua
+++ /dev/null
@@ -1,40 +0,0 @@
-require("dressing")
-
-vim.notify = require("notify")
-
-vim.ui.select = function(...)
- return vim.ui.select(...)
-end
-
-vim.ui.input = function(...)
- return vim.ui.input(...)
-end
-
-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,
- },
-})