Merge branch 'main' of github.com:JohnCosta27/dotfiles

This commit is contained in:
2023-02-24 13:32:20 +00:00
5 changed files with 36 additions and 1 deletions

4
CopyNvchad.bash Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
rm -r nvchad
cp -r ~/.config/nvim/lua/custom ./nvchad

8
README.md Normal file
View File

@ -0,0 +1,8 @@
# Nvim config
I use [NvChad](https://nvchad.com/) as the base of my config, with some custom plugins and key mappings, as well as language servers. I haven't tested this config on other machines except my own so your experience may vary.
* NvChad switched to Mason to manage Lsps so you will need to install the ones you want.
* TreeSitter for syntax highlighting, doesn't automatically install new languages, so you have to do this yourself.
To use my NvChad config, take the files inside `nvchad`, and copy them inside `~/.config/nvim/lua/custom`, a folder NvChad uses for custom configurations.

View File

@ -8,4 +8,26 @@ M.formatter = {
}
}
M.nvimtree = {
n = {
-- focus
["<leader>e"] = { "<cmd> NvimTreeFocus <CR>", "focus nvimtree" },
["<leader>co"] = {"<cmd> NvimTreeCollapse <CR>", "Collapse nvimtree"},
},
}
M.diffview = {
n = {
["<leader>df"] = {"<cmd> DiffviewOpen <CR>", "Open git view"},
["<leader>dr"] = {"<cmd> DiffviewRefresh <CR>", "Open git view"},
}
}
M.custom = {
n = {
["<leader>nt"] = {"<cmd> tabnew <CR>", "New tab"},
["<leader>ct"] = {"<cmd> tabclose <CR>", "Close tab"},
}
}
return M

View File

@ -20,4 +20,5 @@ return {
end
},
["lervag/vimtex"] = {},
["sindrets/diffview.nvim"] = {},
}

View File

@ -2,7 +2,7 @@ local on_attach = require("plugins.configs.lspconfig").on_attach
local capabilities = require("plugins.configs.lspconfig").capabilities
local lspconfig = require("lspconfig")
local servers = {"tsserver", "tailwindcss", "eslint", "cssls", "prismals", "gopls" }
local servers = {"tsserver", "tailwindcss", "eslint", "cssls", "prismals", "gopls", "dockerls", "yamlls", "hls" }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup({