Attempted to tidy nvim configuration

This commit is contained in:
pfych 2024-08-17 09:38:44 +10:00
parent 92bc844a10
commit b4224d0023
8 changed files with 36 additions and 25 deletions

29
.config/nvim/README.md Normal file
View File

@ -0,0 +1,29 @@
# Neovim Configuration
Running neovim with packer for plugins and lsp stuff.
## Plugins & LSP
```sh
:PackerInstall
:PackerUpdate
:Mason -> U # Update all LSP servers
```
Mason should auto-install LSP servers. However, the following is what should be installed:
- `prettier`
- `lua-language-server`
- `luaformatter`
- `eslint_d`
- `typescript-language-server`
- `stylelint-lsp`
`prettierd` and `eslintd` will need to be installed manually via pnpm as a global package.
## Custom key binds
- `<space>f` to toggle NerdTREE
- `?` to view code action items
- `>` to go to next diagnostic
- `<` to go to previous diagnostic

View File

@ -1,8 +1,3 @@
-- If stuff is broken try the following
-- 1. :PackerUpdate
-- 2. :Mason -> U
-- 3. :TSUpdate
require('pfych.base')
require('pfych.plugins')
require('pfych.colours')

View File

@ -1,5 +0,0 @@
{
"diagnostics.disable": [
"unused-local"
]
}

View File

@ -13,30 +13,19 @@ packer.startup(function(use)
use 'hrsh7th/cmp-nvim-lsp' -- nvim-cmp source for neovim's built-in LSP
use 'hrsh7th/nvim-cmp' -- Completion
use 'L3MON4D3/LuaSnip'
use 'neovim/nvim-lspconfig' -- LSP
use 'jose-elias-alvarez/null-ls.nvim'
use 'williamboman/mason.nvim' -- LSP Installer
use 'williamboman/mason-lspconfig.nvim'
use 'nvim-tree/nvim-web-devicons'
use { 'catppuccin/nvim', as = "catppuccin" }
use {
'nvim-telescope/telescope.nvim', tag = '0.1.8', -- For file searching :Telescope find_files
requires = { { 'nvim-lua/plenary.nvim' } }
}
use { 'prettier/vim-prettier', build = 'pnpm install' }
use { 'weilbith/nvim-code-action-menu', cmd = 'CodeActionMenu' }
use 'bellinitte/uxntal.vim'
use { 'edkolev/tmuxline.vim', run = ':Tmuxline vim_statusline_2' }
use 'preservim/nerdtree' -- For filebrowser :NERDTree
use 'preservim/nerdtree' -- For file-browser :NERDTree
use 'elkowar/yuck.vim'
end)

View File

@ -1,5 +1,8 @@
local status, nvim_lsp = pcall(require, "lspconfig")
if (not status) then return end
if (not status) then
print("LSPConfig is not installed")
return
end
local protocol = require('vim.lsp.protocol')

View File

@ -1,6 +1,6 @@
local status, mason = pcall(require, "mason")
if (not status) then
print("mason is not installed")
print("Mason is not installed")
return
end

View File

@ -1,6 +1,6 @@
local status, telescope = pcall(require, "telescope")
if (not status) then
print("telescope is not installed")
print("Telescope is not installed")
return
end