From 00ded90580ba40155adfb90d4f9aab8318140199 Mon Sep 17 00:00:00 2001 From: philw Date: Mon, 29 Apr 2024 23:44:01 +0200 Subject: Update readme and stuff --- README.md | 36 +++++++++--------------------------- init.lua | 12 ++++++++++++ 2 files changed, 21 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 77b2080..fdb43f7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ### Installation -Run checkhealth in your Neovim +Run checkhealth in your nvim to satisfy it's requirements ```vim :checkhealth @@ -13,21 +13,11 @@ Run checkhealth in your Neovim Make sure you analyzed the output properly: - Your neovim must be >= 0.7.0 to run this config -- You need to setup [Packer](https://github.com/wbthomason/packer.nvim) ```vim git clone --depth 1 https://github.com/wbthomason/packer.nvim\ ~/.local/share/nvim/site/pack/packer/start/packer.nvim ``` - -- You should install global python provider - -```python -pip install pynvim -``` - -- You should install clipboard tool (I use xclip but you can use something diffrent) - ### Installation > Easy way @@ -35,12 +25,12 @@ pip install pynvim You can just clone this repo to your .config folder ```bash -git clone https://github.com/dsrcr/nvim ~/.config +git clone https://codeberg.com/philw/nvim ~/.config ``` -> Recommended way +> My way -I use gnu-stow to manage my dotfiles, so I encourage you to use it too. +I use ![gnu-stow](https://www.gnu.org/software/stow/) to manage my ![dotfiles](https://codeberg.org/philw/rice), so I encourage you to use it too. Use your package manage of choice to get stow, for example: @@ -55,22 +45,14 @@ In order to do this you need an empty nvim directory in your .config folder ```bash cd ~/.config mkdir nvim -cd ~/yourDirectory -git clone https://github.com/dsrcr/nvim -stow -d ~/yourDirectory -t ~/.config/nvim nvim/ +cd ~/dir +git clone https://codeberg.org/philw/nvim +stow -d ~/dir -t ~/.config/nvim nvim/ ``` +Or use my ![script](https://codeberg.org/philw/scripts) -The last step is running this command in your neovim - -```vim -:PackerSync -``` - -This command should pull everything you need - -In the next step you will encounter a lot of errors, but don't worry about it. -Packer needs to pull specific plugins and then you need to install Treesitter's support for specific filetypes eg. lua, rust.... etc. +Everything should set up automatically. There is no need for additional setup(if there is report an error). ```bash :TSUpdate diff --git a/init.lua b/init.lua index 1864aee..3afc76a 100644 --- a/init.lua +++ b/init.lua @@ -4,6 +4,7 @@ local keymap = vim.keymap vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 vim.g.rustfmt_autosave = 1 +vim.g.mkdp_auto_start = 1 --Basic Editor Setup option.nu = true @@ -68,6 +69,15 @@ require("lazy").setup({ "williamboman/mason.nvim", "nvim-tree/nvim-web-devicons", "williamboman/mason-lspconfig.nvim", + { + "iamcco/markdown-preview.nvim", + cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, + build = "cd app && yarn install", + init = function() + vim.g.mkdp_filetypes = { "markdown" } + end, + ft = { "markdown" }, + }, 'nvimdev/lspsaga.nvim', config = function() require('lspsaga').setup({}) @@ -225,3 +235,5 @@ keymap.set("n", "", "u") keymap.set("v", "J", ":m '>+1gv=gv") keymap.set("v", "K", ":m '<-2gv=gv") keymap.set("n", "ca", "Lspsaga code_action") +keymap.set("n", "f", "Telescope find_files") +keymap.set("n", "g", "Telescope live_grep") -- cgit v1.2.3