diff options
author | Tyler Davis <tyler@gluecode.net> | 2025-03-16 03:36:10 +0000 |
---|---|---|
committer | Tyler Davis <tyler@gluecode.net> | 2025-03-16 03:36:10 +0000 |
commit | b64f6533406d7affc7c7c6011ee9a6d8bfc8e78f (patch) | |
tree | 51257b65f1ce82e57be8ce20457b3d71821a2d74 | |
parent | 88e15be0f0fd9ff137acb29aba6a69a0080927ca (diff) | |
download | dotfiles-b64f6533406d7affc7c7c6011ee9a6d8bfc8e78f.tar.gz dotfiles-b64f6533406d7affc7c7c6011ee9a6d8bfc8e78f.zip |
neovim: more configs
-rw-r--r-- | .config/alacritty/alacritty.toml | 31 | ||||
-rw-r--r-- | .config/alacritty/themes/gruvbox_dark.toml | 30 | ||||
-rw-r--r-- | .config/alacritty/themes/gruvbox_light.toml | 30 | ||||
-rw-r--r-- | .config/nvim/ftplugin/c.lua | 5 | ||||
-rw-r--r-- | .config/nvim/ftplugin/rust.lua | 5 | ||||
-rw-r--r-- | .config/nvim/init.lua | 1 | ||||
-rw-r--r-- | .config/nvim/lua/config/lazy.lua | 35 | ||||
-rw-r--r-- | .config/nvim/lua/wavefunction/init.lua | 2 | ||||
-rw-r--r-- | .config/nvim/lua/wavefunction/lazy.nvim | 17 | ||||
-rw-r--r-- | .config/nvim/lua/wavefunction/lazy/init.lua | 4 | ||||
-rw-r--r-- | .config/nvim/lua/wavefunction/lazy/lsp.lua | 113 | ||||
-rw-r--r-- | .config/nvim/lua/wavefunction/lazy_init.lua | 26 | ||||
-rw-r--r-- | .config/nvim/lua/wavefunction/remap.lua | 32 | ||||
-rw-r--r-- | .config/nvim/lua/wavefunction/set.lua | 31 | ||||
l--------- | .local/share/nvim/lazy-rocks/hererocks/bin/lua | 1 | ||||
l--------- | .local/share/nvim/lazy-rocks/hererocks/bin/luarocks | 1 |
16 files changed, 76 insertions, 288 deletions
diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml deleted file mode 100644 index 39671bd..0000000 --- a/.config/alacritty/alacritty.toml +++ /dev/null @@ -1,31 +0,0 @@ - -[window] - -dimensions.columns = 140 -dimensions.lines = 40 - -[font] -size = 14.0 - -normal.family = "JetBrains Mono NL" -normal.style = "Regular" - -bold.family = "JetBrains Mono NL" -bold.style = "Bold" - -italic.family = "JetBrains Mono NL" -italic.style = "Italic" - -bold_italic.family = "JetBrains Mono NL" -bold_italic.style = "Bold Italic" - -[scrolling] - -history = 10_000 -multiplier = 3 - -[general] - -live_config_reload = true -import = [ "~/.config/alacritty/themes/gruvbox_dark.toml", ] - diff --git a/.config/alacritty/themes/gruvbox_dark.toml b/.config/alacritty/themes/gruvbox_dark.toml deleted file mode 100644 index d2845cd..0000000 --- a/.config/alacritty/themes/gruvbox_dark.toml +++ /dev/null @@ -1,30 +0,0 @@ -# Colors (Gruvbox dark) - -# Default colors -[colors.primary] -# hard contrast background = = '#1d2021' -background = '#282828' -# soft contrast background = = '#32302f' -foreground = '#ebdbb2' - -# Normal colors -[colors.normal] -black = '#282828' -red = '#cc241d' -green = '#98971a' -yellow = '#d79921' -blue = '#458588' -magenta = '#b16286' -cyan = '#689d6a' -white = '#a89984' - -# Bright colors -[colors.bright] -black = '#928374' -red = '#fb4934' -green = '#b8bb26' -yellow = '#fabd2f' -blue = '#83a598' -magenta = '#d3869b' -cyan = '#8ec07c' -white = '#ebdbb2' diff --git a/.config/alacritty/themes/gruvbox_light.toml b/.config/alacritty/themes/gruvbox_light.toml deleted file mode 100644 index d2852db..0000000 --- a/.config/alacritty/themes/gruvbox_light.toml +++ /dev/null @@ -1,30 +0,0 @@ -# Colors (Gruvbox light) - -# Default colors -[colors.primary] -# hard contrast background = = '#f9f5d7' -background = '#fbf1c7' -# soft contrast background = = '#f2e5bc' -foreground = '#3c3836' - -# Normal colors -[colors.normal] -black = '#fbf1c7' -red = '#cc241d' -green = '#98971a' -yellow = '#d79921' -blue = '#458588' -magenta = '#b16286' -cyan = '#689d6a' -white = '#7c6f64' - -# Bright colors -[colors.bright] -black = '#928374' -red = '#9d0006' -green = '#79740e' -yellow = '#b57614' -blue = '#076678' -magenta = '#8f3f71' -cyan = '#427b58' -white = '#3c3836' diff --git a/.config/nvim/ftplugin/c.lua b/.config/nvim/ftplugin/c.lua new file mode 100644 index 0000000..f5c4b86 --- /dev/null +++ b/.config/nvim/ftplugin/c.lua @@ -0,0 +1,5 @@ +vim.lsp.start({ + name = 'clangd', + cmd = {'clangd'}, + root_dir = vim.fs.dirname(vim.fs.find({'Makefile', 'main.c'}, { upward = true })[1]), +}) diff --git a/.config/nvim/ftplugin/rust.lua b/.config/nvim/ftplugin/rust.lua new file mode 100644 index 0000000..2d477b3 --- /dev/null +++ b/.config/nvim/ftplugin/rust.lua @@ -0,0 +1,5 @@ +vim.lsp.start({ + name = 'rust-analyzer', + cmd = {'rust-analyzer'}, + root_dir = vim.fs.dirname(vim.fs.find({'Cargo.toml', 'main.rs'}, { upward = true })[1]), +}) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index dead8eb..c9c08e4 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,2 +1 @@ -require("config.lazy") require("wavefunction") diff --git a/.config/nvim/lua/config/lazy.lua b/.config/nvim/lua/config/lazy.lua deleted file mode 100644 index 61654d0..0000000 --- a/.config/nvim/lua/config/lazy.lua +++ /dev/null @@ -1,35 +0,0 @@ --- Bootstrap lazy.nvim -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end -vim.opt.rtp:prepend(lazypath) - --- Make sure to setup `mapleader` and `maplocalleader` before --- loading lazy.nvim so that mappings are correct. --- This is also a good place to setup other settings (vim.opt) -vim.g.mapleader = " " -vim.g.maplocalleader = "\\" - --- Setup lazy.nvim -require("lazy").setup({ - spec = { - -- import your plugins - { import = "wavefunction" }, - }, - -- Configure any other settings here. See the documentation for more details. - -- colorscheme that will be used when installing plugins. - --install = { colorscheme = { "habamax" } }, - -- automatically check for plugin updates - checker = { enabled = true }, -}) diff --git a/.config/nvim/lua/wavefunction/init.lua b/.config/nvim/lua/wavefunction/init.lua index e69de29..b206d42 100644 --- a/.config/nvim/lua/wavefunction/init.lua +++ b/.config/nvim/lua/wavefunction/init.lua @@ -0,0 +1,2 @@ +require("wavefunction.remap") +require("wavefunction.lazy_init") diff --git a/.config/nvim/lua/wavefunction/lazy.nvim b/.config/nvim/lua/wavefunction/lazy.nvim deleted file mode 100644 index 8f2e68d..0000000 --- a/.config/nvim/lua/wavefunction/lazy.nvim +++ /dev/null @@ -1,17 +0,0 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -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({ - spec = "wavefunction.lazy", - change_detection = { notify = false } -}) diff --git a/.config/nvim/lua/wavefunction/lazy/init.lua b/.config/nvim/lua/wavefunction/lazy/init.lua new file mode 100644 index 0000000..9179e0f --- /dev/null +++ b/.config/nvim/lua/wavefunction/lazy/init.lua @@ -0,0 +1,4 @@ +return{ + { 'hrsh7th/cmp-nvim-lsp' }, + { 'hrsh7th/nvim-cmp' }, +} diff --git a/.config/nvim/lua/wavefunction/lazy/lsp.lua b/.config/nvim/lua/wavefunction/lazy/lsp.lua deleted file mode 100644 index 264ff22..0000000 --- a/.config/nvim/lua/wavefunction/lazy/lsp.lua +++ /dev/null @@ -1,113 +0,0 @@ -return { - "neovim/nvim-lspconfig", - dependencies = { - "stevearc/conform.nvim", - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-cmdline", - "hrsh7th/nvim-cmp", - "L3MON4D3/LuaSnip", - "saadparwaiz1/cmp_luasnip", - "j-hui/fidget.nvim", - }, - - config = function() - require("conform").setup({ - formatters_by_ft = { - } - }) - local cmp = require('cmp') - local cmp_lsp = require("cmp_nvim_lsp") - local capabilities = vim.tbl_deep_extend( - "force", - {}, - vim.lsp.protocol.make_client_capabilities(), - cmp_lsp.default_capabilities()) - - require("fidget").setup({}) - require("mason").setup() - require("mason-lspconfig").setup({ - ensure_installed = { - "lua_ls", - "rust_analyzer", - "gopls", - }, - handlers = { - function(server_name) -- default handler (optional) - require("lspconfig")[server_name].setup { - capabilities = capabilities - } - end, - - zls = function() - local lspconfig = require("lspconfig") - lspconfig.zls.setup({ - root_dir = lspconfig.util.root_pattern(".git", "build.zig", "zls.json"), - settings = { - zls = { - enable_inlay_hints = true, - enable_snippets = true, - warn_style = true, - }, - }, - }) - vim.g.zig_fmt_parse_errors = 0 - vim.g.zig_fmt_autosave = 0 - - end, - ["lua_ls"] = function() - local lspconfig = require("lspconfig") - lspconfig.lua_ls.setup { - capabilities = capabilities, - settings = { - Lua = { - runtime = { version = "Lua 5.1" }, - diagnostics = { - globals = { "bit", "vim", "it", "describe", "before_each", "after_each" }, - } - } - } - } - end, - } - }) - - local cmp_select = { behavior = cmp.SelectBehavior.Select } - - cmp.setup({ - snippet = { - expand = function(args) - require('luasnip').lsp_expand(args.body) -- For `luasnip` users. - end, - }, - mapping = cmp.mapping.preset.insert({ - ['<C-p>'] = cmp.mapping.select_prev_item(cmp_select), - ['<C-n>'] = cmp.mapping.select_next_item(cmp_select), - ['<C-y>'] = cmp.mapping.confirm({ select = true }), - ["<C-Space>"] = cmp.mapping.complete(), - }), - sources = cmp.config.sources({ - { name = "copilot", group_index = 2 }, - { name = 'nvim_lsp' }, - { name = 'luasnip' }, -- For luasnip users. - }, { - { name = 'buffer' }, - }) - }) - - vim.diagnostic.config({ - -- update_in_insert = true, - float = { - focusable = false, - style = "minimal", - border = "rounded", - source = "always", - header = "", - prefix = "", - }, - }) - end -} diff --git a/.config/nvim/lua/wavefunction/lazy_init.lua b/.config/nvim/lua/wavefunction/lazy_init.lua new file mode 100644 index 0000000..8d87526 --- /dev/null +++ b/.config/nvim/lua/wavefunction/lazy_init.lua @@ -0,0 +1,26 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. +-- This is also a good place to setup other settings (vim.opt) +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" + +require("lazy").setup({ + spec = "wavefunction.lazy", + change_detection = { notify = false } +}) diff --git a/.config/nvim/lua/wavefunction/remap.lua b/.config/nvim/lua/wavefunction/remap.lua index 7088a1a..c553f04 100644 --- a/.config/nvim/lua/wavefunction/remap.lua +++ b/.config/nvim/lua/wavefunction/remap.lua @@ -1 +1,33 @@ vim.g.mapleader = "\\" + +vim.opt.guicursor = "" + +vim.opt.nu = true +vim.opt.relativenumber = true + +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true + +vim.opt.smartindent = true + +vim.opt.wrap = false + +vim.opt.swapfile = false +vim.opt.backup = false +vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" +vim.opt.undofile = true + +vim.opt.hlsearch = false +vim.opt.incsearch = true + +vim.opt.termguicolors = true + +vim.opt.scrolloff = 8 +vim.opt.signcolumn = "yes" +vim.opt.isfname:append("@-@") + +vim.opt.updatetime = 50 + +vim.opt.colorcolumn = "80" diff --git a/.config/nvim/lua/wavefunction/set.lua b/.config/nvim/lua/wavefunction/set.lua deleted file mode 100644 index 2c9ad6e..0000000 --- a/.config/nvim/lua/wavefunction/set.lua +++ /dev/null @@ -1,31 +0,0 @@ -vim.opt.guicursor = "" - -vim.opt.nu = true -vim.opt.relativenumber = true - -vim.opt.tabstop = 4 -vim.opt.softtabstop = 4 -vim.opt.shiftwidth = 4 -vim.opt.expandtab = true - -vim.opt.smartindent = true - -vim.opt.wrap = false - -vim.opt.swapfile = false -vim.opt.backup = false -vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" -vim.opt.undofile = true - -vim.opt.hlsearch = false -vim.opt.incsearch = true - -vim.opt.termguicolors = true - -vim.opt.scrolloff = 8 -vim.opt.signcolumn = "yes" -vim.opt.isfname:append("@-@") - -vim.opt.updatetime = 50 - -vim.opt.colorcolumn = "80" diff --git a/.local/share/nvim/lazy-rocks/hererocks/bin/lua b/.local/share/nvim/lazy-rocks/hererocks/bin/lua new file mode 120000 index 0000000..e16160b --- /dev/null +++ b/.local/share/nvim/lazy-rocks/hererocks/bin/lua @@ -0,0 +1 @@ +/usr/local/bin/lua51
\ No newline at end of file diff --git a/.local/share/nvim/lazy-rocks/hererocks/bin/luarocks b/.local/share/nvim/lazy-rocks/hererocks/bin/luarocks new file mode 120000 index 0000000..b5f5ad7 --- /dev/null +++ b/.local/share/nvim/lazy-rocks/hererocks/bin/luarocks @@ -0,0 +1 @@ +/usr/local/bin/luarocks51
\ No newline at end of file |