diff options
Diffstat (limited to '.config')
| -rw-r--r-- | .config/fish/config.fish | 4 | ||||
| -rw-r--r-- | .config/fish/functions/ls.fish | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/getchoo/ftdetect.lua | 7 | ||||
| -rw-r--r-- | .config/nvim/lua/getchoo/lsp/config.lua | 116 | ||||
| -rw-r--r-- | .config/nvim/lua/getchoo/lsp/keymap.lua | 18 | ||||
| -rw-r--r-- | .config/nvim/lua/getchoo/lsp/server.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/getchoo/plugins.lua | 110 | ||||
| -rw-r--r-- | .config/shell/aliases | 2 | ||||
| -rw-r--r-- | .config/zsh/.zshrc | 5 |
9 files changed, 133 insertions, 133 deletions
diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 45cca36..a151d10 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -26,9 +26,6 @@ function set_envvars # paths set -gx CARGO_HOME "$XDG_DATA_HOME/cargo" - if test -d "$CARGO_HOME" - fish_add_path "$CARGO_HOME/bin" - end set -gx RUSTUP_HOME "$XDG_DATA_HOME/rustup" set -gx LESSHISTFILE "$XDG_STATE_HOME/less/history" set -gx NPM_CONFIG_USERCONFIG "$XDG_CONFIG_HOME/npm/npmrc" @@ -36,7 +33,6 @@ function set_envvars end function load_plugins - #starship init fish | source if not test -f "$XDG_CONFIG_HOME/fish/functions/fisher.fish" echo 'bootstrapping fisher' curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher diff --git a/.config/fish/functions/ls.fish b/.config/fish/functions/ls.fish index 9d08de4..17d7861 100644 --- a/.config/fish/functions/ls.fish +++ b/.config/fish/functions/ls.fish @@ -1,3 +1,3 @@ function ls - exa $argv + exa $argv end diff --git a/.config/nvim/lua/getchoo/ftdetect.lua b/.config/nvim/lua/getchoo/ftdetect.lua index e95e87a..d12b9c2 100644 --- a/.config/nvim/lua/getchoo/ftdetect.lua +++ b/.config/nvim/lua/getchoo/ftdetect.lua @@ -6,9 +6,10 @@ vim.g.do_filetype_lua = 1 -- enable filetype.lua vim.g.did_load_filetypes = 0 local filetypes = { - filename = { - PKGBUILD = "text", - }, + filename = { + PKGBUILD = "text", + [".makepkg.conf"] = "text", + }, } vim.filetype.add(filetypes) diff --git a/.config/nvim/lua/getchoo/lsp/config.lua b/.config/nvim/lua/getchoo/lsp/config.lua index 857879a..60ece4d 100644 --- a/.config/nvim/lua/getchoo/lsp/config.lua +++ b/.config/nvim/lua/getchoo/lsp/config.lua @@ -10,51 +10,51 @@ local M = {} vim.g.coq_settings = { auto_start = "shut-up" } local sources = { - lsp_servers = { "rust_analyzer", "pyright", "bashls" }, - null_ls = { - diagnostics.alex, - diagnostics.codespell, - diagnostics.flake8, - formatting.black, - formatting.codespell, - formatting.prettier, - formatting.rustfmt, - formatting.stylua, - }, - mason = { - "alex", - "black", - "codespell", - "flake8", - "prettier", - "stylua", - }, + lsp_servers = { "rust_analyzer", "pyright", "bashls" }, + null_ls = { + diagnostics.alex, + diagnostics.codespell, + diagnostics.flake8, + formatting.black, + formatting.codespell, + formatting.prettier, + formatting.rustfmt, + formatting.stylua, + }, + mason = { + "alex", + "black", + "codespell", + "flake8", + "prettier", + "stylua", + }, } -- configure lsp servers local all_config = {} local servers = {} for _, server in ipairs(sources.lsp_servers) do - servers[server] = all_config + servers[server] = all_config end servers["sumneko_lua"] = { - settings = { - Lua = { - runtime = { - version = "LuaJIT", - }, - diagnostics = { - globals = { "vim" }, - }, - workspace = { - library = vim.api.nvim_get_runtime_file("", true), - }, - telemetry = { - enable = false, - }, - }, - }, + settings = { + Lua = { + runtime = { + version = "LuaJIT", + }, + diagnostics = { + globals = { "vim" }, + }, + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + }, + telemetry = { + enable = false, + }, + }, + }, } M.lsp_servers = servers @@ -73,44 +73,44 @@ M.lsp_servers = servers local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) local 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() - local params = require("vim.lsp.util").make_formatting_params({}) - client.request("textDocument/formatting", params, nil, bufnr) - -- lsp_formatting(bufnr) -- neovim >= 8 - end, - }) - end + 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() + local params = require("vim.lsp.util").make_formatting_params({}) + client.request("textDocument/formatting", params, nil, bufnr) + -- lsp_formatting(bufnr) -- neovim >= 8 + end, + }) + end end M.null_ls = { - on_attach = on_attach, - sources = sources.null_ls, + on_attach = on_attach, + sources = sources.null_ls, } M.mason_tool_installer = { - ensure_installed = sources.mason, + ensure_installed = sources.mason, } M.mason_lsp = { - automatic_installation = true, + automatic_installation = true, } -- etc plugins M.bufferline = { - options = { - numbers = "ordinal", - diagnostics = "nvim_lsp", - always_show_bufferline = false, - }, + options = { + numbers = "ordinal", + diagnostics = "nvim_lsp", + always_show_bufferline = false, + }, } M.tree = {} M.treesitter = { - auto_install = true, + auto_install = true, } M.trouble = {} diff --git a/.config/nvim/lua/getchoo/lsp/keymap.lua b/.config/nvim/lua/getchoo/lsp/keymap.lua index 8cb92ac..3264851 100644 --- a/.config/nvim/lua/getchoo/lsp/keymap.lua +++ b/.config/nvim/lua/getchoo/lsp/keymap.lua @@ -4,7 +4,7 @@ local opts = { noremap = true, silent = true } local set = function(mode, key, cmd) - vim.keymap.set(mode, key, cmd, opts) + vim.keymap.set(mode, key, cmd, opts) end set("n", "<space>e", vim.diagnostic.open_float) @@ -13,28 +13,28 @@ set("n", "]d", vim.diagnostic.goto_next) set("n", "<space>q", vim.diagnostic.setloclist) set("n", "<space>f", function() - vim.cmd([[:Clap]]) + vim.cmd([[:Clap]]) end) set("n", "<leader>t", function() - vim.cmd([[:NvimTreeToggle]]) + vim.cmd([[:NvimTreeToggle]]) end) set("n", "<space>t", function() - vim.cmd([[:TroubleToggle]]) + vim.cmd([[:TroubleToggle]]) end) local bufferline = require("bufferline") for i = 1, 9 do - set("n", "<leader>" .. i, function() - bufferline.go_to_buffer(i, true) - end) + set("n", "<leader>" .. i, function() + bufferline.go_to_buffer(i, true) + end) end set("n", "<leader>p", function() - bufferline.pick_buffer() + bufferline.pick_buffer() end) set("n", "<leader>q", function() - bufferline.close_buffer_with_pick() + bufferline.close_buffer_with_pick() end) diff --git a/.config/nvim/lua/getchoo/lsp/server.lua b/.config/nvim/lua/getchoo/lsp/server.lua index 8521801..2935a9c 100644 --- a/.config/nvim/lua/getchoo/lsp/server.lua +++ b/.config/nvim/lua/getchoo/lsp/server.lua @@ -12,7 +12,7 @@ require("mason-tool-installer").setup(config.mason_tool_installer) vim.opt.runtimepath:append("~/.local/share/nvim/mason/bin/") for server, settings in pairs(config.lsp_servers) do - lspconfig[server].setup(require("coq").lsp_ensure_capabilities(settings)) + lspconfig[server].setup(require("coq").lsp_ensure_capabilities(settings)) end null_ls.setup(config.null_ls) diff --git a/.config/nvim/lua/getchoo/plugins.lua b/.config/nvim/lua/getchoo/plugins.lua index 8cf0371..9e7166f 100644 --- a/.config/nvim/lua/getchoo/plugins.lua +++ b/.config/nvim/lua/getchoo/plugins.lua @@ -8,66 +8,66 @@ local cmd = vim.cmd local packer_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim" if fn.empty(fn.glob(packer_path)) > 0 then - Packer_bootstrap = fn.system({ - "git", - "clone", - "--depth", - "1", - "https://github.com/wbthomason/packer.nvim", - packer_path, - }) - cmd([[packadd packer.nvim]]) + Packer_bootstrap = fn.system({ + "git", + "clone", + "--depth", + "1", + "https://github.com/wbthomason/packer.nvim", + packer_path, + }) + cmd([[packadd packer.nvim]]) end require("packer").startup(function(use) - use("wbthomason/packer.nvim") - -- comsetic plugins - use({ "nvim-lualine/lualine.nvim", requires = { "kyazdani42/nvim-web-devicons", opt = true } }) - use("arcticicestudio/nord-vim") - use({ "rose-pine/neovim", as = "rose-pine" }) - -- lsp plugins - use("neovim/nvim-lspconfig") - use({ - "jose-elias-alvarez/null-ls.nvim", - requires = { "nvim-lua/plenary.nvim" }, - }) - use("williamboman/mason.nvim") - use("williamboman/mason-lspconfig") - use("WhoIsSethDaniel/mason-tool-installer.nvim") - use({ - "nvim-treesitter/nvim-treesitter", - run = function() - require("nvim-treesitter.install").update({ with_sync = true }) - end, - }) - use("ms-jpq/coq_nvim") - use("ms-jpq/coq.artifacts") - use("ms-jpq/coq.thirdparty") - use("kyazdani42/nvim-tree.lua") - use({ - "akinsho/bufferline.nvim", - tag = "v2.*", - requires = { "kyazdani42/nvim-web-devicons" }, - }) - use({ - "folke/trouble.nvim", - requires = { "kyazdani42/nvim-web-devicons" }, - }) - use({ - "liuchengxu/vim-clap", - run = function() - vim.cmd([[:Clap install-binary!]]) - end, - }) + use("wbthomason/packer.nvim") + -- comsetic plugins + use({ "nvim-lualine/lualine.nvim", requires = { "kyazdani42/nvim-web-devicons", opt = true } }) + use("arcticicestudio/nord-vim") + use({ "rose-pine/neovim", as = "rose-pine" }) + -- lsp plugins + use("neovim/nvim-lspconfig") + use({ + "jose-elias-alvarez/null-ls.nvim", + requires = { "nvim-lua/plenary.nvim" }, + }) + use("williamboman/mason.nvim") + use("williamboman/mason-lspconfig") + use("WhoIsSethDaniel/mason-tool-installer.nvim") + use({ + "nvim-treesitter/nvim-treesitter", + run = function() + require("nvim-treesitter.install").update({ with_sync = true }) + end, + }) + use("ms-jpq/coq_nvim") + use("ms-jpq/coq.artifacts") + use("ms-jpq/coq.thirdparty") + use("kyazdani42/nvim-tree.lua") + use({ + "akinsho/bufferline.nvim", + tag = "v2.*", + requires = { "kyazdani42/nvim-web-devicons" }, + }) + use({ + "folke/trouble.nvim", + requires = { "kyazdani42/nvim-web-devicons" }, + }) + use({ + "liuchengxu/vim-clap", + run = function() + vim.cmd([[:Clap install-binary!]]) + end, + }) - if Packer_bootstrap then - require("packer").sync() - end + if Packer_bootstrap then + require("packer").sync() + end end) require("lualine").setup({ - options = { - theme = "nord", - }, - extensions = { "nvim-tree" }, + options = { + theme = "nord", + }, + extensions = { "nvim-tree" }, }) diff --git a/.config/shell/aliases b/.config/shell/aliases new file mode 100644 index 0000000..1242b83 --- /dev/null +++ b/.config/shell/aliases @@ -0,0 +1,2 @@ +alias ls='ls --color=auto' +alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 1b345af..9a83c30 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -6,14 +6,15 @@ antidote_dir="${ZDOTDIR}/.antidote" # plugins :) if [[ ! -d ${antidote_dir} ]] then - git clone https://github.com/mattmc3/antidote.git ${antidote_dir}/.antidote + git clone https://github.com/mattmc3/antidote.git ${antidote_dir} fi if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi -source ${antidote_dir}/antidote.zsh && antidote load +source $antidote_dir/antidote.zsh +antidote load unset antidote_dir # zmodules |
