diff options
| -rw-r--r-- | README.md | 36 | ||||
| -rw-r--r-- | init.lua | 12 |
2 files changed, 21 insertions, 27 deletions
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | ### Installation | 5 | ### Installation |
| 6 | 6 | ||
| 7 | Run checkhealth in your Neovim | 7 | Run checkhealth in your nvim to satisfy it's requirements |
| 8 | 8 | ||
| 9 | ```vim | 9 | ```vim |
| 10 | :checkhealth | 10 | :checkhealth |
| @@ -13,21 +13,11 @@ Run checkhealth in your Neovim | |||
| 13 | Make sure you analyzed the output properly: | 13 | Make sure you analyzed the output properly: |
| 14 | 14 | ||
| 15 | - Your neovim must be >= 0.7.0 to run this config | 15 | - Your neovim must be >= 0.7.0 to run this config |
| 16 | - You need to setup [Packer](https://github.com/wbthomason/packer.nvim) | ||
| 17 | 16 | ||
| 18 | ```vim | 17 | ```vim |
| 19 | git clone --depth 1 https://github.com/wbthomason/packer.nvim\ | 18 | git clone --depth 1 https://github.com/wbthomason/packer.nvim\ |
| 20 | ~/.local/share/nvim/site/pack/packer/start/packer.nvim | 19 | ~/.local/share/nvim/site/pack/packer/start/packer.nvim |
| 21 | ``` | 20 | ``` |
| 22 | |||
| 23 | - You should install global python provider | ||
| 24 | |||
| 25 | ```python | ||
| 26 | pip install pynvim | ||
| 27 | ``` | ||
| 28 | |||
| 29 | - You should install clipboard tool (I use xclip but you can use something diffrent) | ||
| 30 | |||
| 31 | ### Installation | 21 | ### Installation |
| 32 | 22 | ||
| 33 | > Easy way | 23 | > Easy way |
| @@ -35,12 +25,12 @@ pip install pynvim | |||
| 35 | You can just clone this repo to your .config folder | 25 | You can just clone this repo to your .config folder |
| 36 | 26 | ||
| 37 | ```bash | 27 | ```bash |
| 38 | git clone https://github.com/dsrcr/nvim ~/.config | 28 | git clone https://codeberg.com/philw/nvim ~/.config |
| 39 | ``` | 29 | ``` |
| 40 | 30 | ||
| 41 | > Recommended way | 31 | > My way |
| 42 | 32 | ||
| 43 | I use gnu-stow to manage my dotfiles, so I encourage you to use it too. | 33 | I use  to manage my , so I encourage you to use it too. |
| 44 | 34 | ||
| 45 | Use your package manage of choice to get stow, for example: | 35 | Use your package manage of choice to get stow, for example: |
| 46 | 36 | ||
| @@ -55,22 +45,14 @@ In order to do this you need an empty nvim directory in your .config folder | |||
| 55 | ```bash | 45 | ```bash |
| 56 | cd ~/.config | 46 | cd ~/.config |
| 57 | mkdir nvim | 47 | mkdir nvim |
| 58 | cd ~/yourDirectory | 48 | cd ~/dir |
| 59 | git clone https://github.com/dsrcr/nvim | 49 | git clone https://codeberg.org/philw/nvim |
| 60 | stow -d ~/yourDirectory -t ~/.config/nvim nvim/ | 50 | stow -d ~/dir -t ~/.config/nvim nvim/ |
| 61 | 51 | ||
| 62 | ``` | 52 | ``` |
| 53 | Or use my  | ||
| 63 | 54 | ||
| 64 | The last step is running this command in your neovim | 55 | Everything should set up automatically. There is no need for additional setup(if there is report an error). |
| 65 | |||
| 66 | ```vim | ||
| 67 | :PackerSync | ||
| 68 | ``` | ||
| 69 | |||
| 70 | This command should pull everything you need | ||
| 71 | |||
| 72 | In the next step you will encounter a lot of errors, but don't worry about it. | ||
| 73 | Packer needs to pull specific plugins and then you need to install Treesitter's support for specific filetypes eg. lua, rust.... etc. | ||
| 74 | 56 | ||
| 75 | ```bash | 57 | ```bash |
| 76 | :TSUpdate | 58 | :TSUpdate |
| @@ -4,6 +4,7 @@ local keymap = vim.keymap | |||
| 4 | vim.g.loaded_netrw = 1 | 4 | vim.g.loaded_netrw = 1 |
| 5 | vim.g.loaded_netrwPlugin = 1 | 5 | vim.g.loaded_netrwPlugin = 1 |
| 6 | vim.g.rustfmt_autosave = 1 | 6 | vim.g.rustfmt_autosave = 1 |
| 7 | vim.g.mkdp_auto_start = 1 | ||
| 7 | 8 | ||
| 8 | --Basic Editor Setup | 9 | --Basic Editor Setup |
| 9 | option.nu = true | 10 | option.nu = true |
| @@ -68,6 +69,15 @@ require("lazy").setup({ | |||
| 68 | "williamboman/mason.nvim", | 69 | "williamboman/mason.nvim", |
| 69 | "nvim-tree/nvim-web-devicons", | 70 | "nvim-tree/nvim-web-devicons", |
| 70 | "williamboman/mason-lspconfig.nvim", | 71 | "williamboman/mason-lspconfig.nvim", |
| 72 | { | ||
| 73 | "iamcco/markdown-preview.nvim", | ||
| 74 | cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, | ||
| 75 | build = "cd app && yarn install", | ||
| 76 | init = function() | ||
| 77 | vim.g.mkdp_filetypes = { "markdown" } | ||
| 78 | end, | ||
| 79 | ft = { "markdown" }, | ||
| 80 | }, | ||
| 71 | 'nvimdev/lspsaga.nvim', | 81 | 'nvimdev/lspsaga.nvim', |
| 72 | config = function() | 82 | config = function() |
| 73 | require('lspsaga').setup({}) | 83 | require('lspsaga').setup({}) |
| @@ -225,3 +235,5 @@ keymap.set("n", "<C-z>", "u") | |||
| 225 | keymap.set("v", "J", ":m '>+1<CR>gv=gv") | 235 | keymap.set("v", "J", ":m '>+1<CR>gv=gv") |
| 226 | keymap.set("v", "K", ":m '<-2<CR>gv=gv") | 236 | keymap.set("v", "K", ":m '<-2<CR>gv=gv") |
| 227 | keymap.set("n", "<leader>ca", "<cmd>Lspsaga code_action<cr>") | 237 | keymap.set("n", "<leader>ca", "<cmd>Lspsaga code_action<cr>") |
| 238 | keymap.set("n", "<leader>f", "<cmd>Telescope find_files<cr>") | ||
| 239 | keymap.set("n", "<leader>g", "<cmd>Telescope live_grep<cr>") | ||
