From d1b79a68df252697bfa5f8e514fe0b0293b5bb5b Mon Sep 17 00:00:00 2001 From: speedie Date: Fri, 19 Jan 2024 18:24:07 +0100 Subject: [PATCH] speedie-nvim | Add new config --- .config/nvim/init.lua | 11 ++++++- .config/nvim/lazy-lock.json | 2 ++ .config/nvim/lua/translate_config.lua | 17 +++++++++++ .config/nvim/lua/trouble_config.lua | 6 ++++ README.md | 43 +++++++++++++++++++++++++-- 5 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 .config/nvim/lua/translate_config.lua create mode 100644 .config/nvim/lua/trouble_config.lua diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 41b453a..70f5b71 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,6 +1,11 @@ --[[ speedie's neovim configuration -- https://git.speedie.site/speedie/speedie-nvim -- + + Dependencies: + + - Neovim 0.9 or later + - ]]-- local cmd = vim.cmd -- Convenient alias @@ -62,6 +67,8 @@ Plugins = { -- Plugins to use 'nvim-treesitter/nvim-treesitter', }, }, -- Indentation blankline + { 'folke/trouble.nvim' }, -- Display warnings and errors neatly + { 'uga-rosa/translate.nvim' }, -- Built in translate } require('bootstrap') -- Set up Lazy and plugins. @@ -114,8 +121,8 @@ keymap('n', '', ':set spelllang=sv_se', { noremap = true, silent = true keymap('n', '', ':silent execute "!setxkbmap us"', { noremap = true, silent = true }) keymap('n', '', ':silent execute "!setxkbmap se"', { noremap = true, silent = true }) keymap('n', '', ':NvimTreeToggle', { noremap = true, silent = true }) +keymap('n', '', ':TroubleToggle', { noremap = true, silent = true }) keymap('n', 'ca', 'z=', { noremap = true, silent = true }) -keymap('n', '', ':!ninja -C build', { noremap = true, silent = true }) keymap('n', 'H', ':vertical resize -10', { noremap = true, silent = true }) keymap('n', 'J', ':resize -10', { noremap = true, silent = true }) keymap('n', 'K', ':resize +10', { noremap = true, silent = true }) @@ -194,3 +201,5 @@ require('ibl_config') require('tree_config') require('ts_config') require('theme_config') +require('trouble_config') +require('translate_config') diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 0a0b48e..26416dd 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -19,5 +19,7 @@ "nvim-web-devicons": { "branch": "master", "commit": "140edfcf25093e8b321d13e154cbce89ee868ca0" }, "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, + "translate.nvim": { "branch": "main", "commit": "30cc9e9f339b61e7bd40bc1ba7af73ea193bf589" }, + "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, "vim-fugitive": { "branch": "master", "commit": "ec8f7eed103c6d5b75eac69196bb87db0825629a" } } \ No newline at end of file diff --git a/.config/nvim/lua/translate_config.lua b/.config/nvim/lua/translate_config.lua new file mode 100644 index 0000000..9f78978 --- /dev/null +++ b/.config/nvim/lua/translate_config.lua @@ -0,0 +1,17 @@ +--[[ + speedie's neovim configuration + -- https://git.speedie.site/speedie/speedie-nvim -- +]]-- + +require('translate').setup({ + default = { + output = "insert", + }, + preset = { + output = { + split = { + append = true, + }, + }, + }, +}) diff --git a/.config/nvim/lua/trouble_config.lua b/.config/nvim/lua/trouble_config.lua new file mode 100644 index 0000000..f1463a9 --- /dev/null +++ b/.config/nvim/lua/trouble_config.lua @@ -0,0 +1,6 @@ +--[[ + speedie's neovim configuration + -- https://git.speedie.site/speedie/speedie-nvim -- +]]-- + +require("trouble").setup({}) diff --git a/README.md b/README.md index f2ecc4b..147563c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,44 @@ # speedie-nvim -speedie's neovim config +![img](/preview.png) -run ./install.sh to install it, ./commit.sh to update +My personal neovim configuration. Designed to be an IDE replacement for me. +If you prefer something lighter, check out my [speedie-vim](https://git.speedie.site/speedie/speedie-vim) configuration instead. + +If you plan on using this, I recommend that you fork it and make it your own rather than relying on upstream which +can change whenever I feel like it. **This is not a NeoVim distro.** + +## Features + +- Fully configured in Lua +- Easy, clean and concise configuration file +- Neovim-native LSP for different languages (default: HTML, CSS, C, C++, PHP, Lua, VimScript and Markdown) (using lsp-zero) +- Language syntax highlighting (using Treesitter) +- Tabs (using barbar) +- Doom-One colorscheme (using doom-one.vim) +- Automatic code formatting (using autoclose, conform, indent-blankline) +- Git integration (using vim-fugitive) +- Built-in file manager (using nvim-tree) +- Nice keybinds for working with splits +- Easy translating (using nvim-translate) +- Built in keyboard layout and spell check switching (default: English (US) and Swedish) + +## Requirements + +- Neovim 0.9 or later. +- curl. +- Good internet connection so you can download things. +- Preferably also nerd fonts, or stuff might look a bit weird. + +## Installation + +Run ./install.sh. Note that this will remove your +existing Neovim configuration so if you care about it, back it up before running the script. + +To uninstall, simply remove ~/.config/nvim/ (and optionally ~/.local/share/nvim) + +## Fork + +If you want to fork it like I told you to, make a fork, change the remote, +and run `./commit.sh` whenever you want to upload your fork to the remote. This +automatically copies in the dotfiles.