Merge branch 'main' of https://github.com/StevanFreeborn/nvim-config
This commit is contained in:
+24
-10
@@ -67,16 +67,16 @@ return {
|
|||||||
|
|
||||||
lspconfig.ts_ls.setup({
|
lspconfig.ts_ls.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
init_options = {
|
init_options = {
|
||||||
plugins = {
|
plugins = {
|
||||||
{
|
{
|
||||||
name = "@vue/typescript-plugin",
|
name = "@vue/typescript-plugin",
|
||||||
location = vue_language_server,
|
location = vue_language_server,
|
||||||
languages = { "vue" },
|
languages = { "vue" },
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue" }
|
filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue" },
|
||||||
})
|
})
|
||||||
|
|
||||||
lspconfig.html.setup({
|
lspconfig.html.setup({
|
||||||
@@ -160,6 +160,20 @@ return {
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||||
|
callback = function()
|
||||||
|
-- check if treesitter has parser
|
||||||
|
if require("nvim-treesitter.parsers").has_parser() then
|
||||||
|
-- use treesitter folding
|
||||||
|
vim.opt.foldmethod = "expr"
|
||||||
|
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
|
else
|
||||||
|
-- use alternative foldmethod
|
||||||
|
vim.opt.foldmethod = "syntax"
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
vim.keymap.set(
|
vim.keymap.set(
|
||||||
"n",
|
"n",
|
||||||
"<leader>ca",
|
"<leader>ca",
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ vim.g.mapleader = " "
|
|||||||
vim.g.maplocalleader = "\\"
|
vim.g.maplocalleader = "\\"
|
||||||
vim.opt.wrap = false
|
vim.opt.wrap = false
|
||||||
vim.opt.shadafile = "NONE"
|
vim.opt.shadafile = "NONE"
|
||||||
|
vim.opt.foldlevelstart = 99
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>y", '"+y', { desc = "Yank to system clipboard" })
|
vim.keymap.set("n", "<leader>y", '"+y', { desc = "Yank to system clipboard" })
|
||||||
vim.keymap.set("v", "<leader>y", '"+y', { desc = "Yank to system clipboard" })
|
vim.keymap.set("v", "<leader>y", '"+y', { desc = "Yank to system clipboard" })
|
||||||
|
|||||||
Reference in New Issue
Block a user