mirror of
https://github.com/gyoder/dots.git
synced 2026-02-27 17:03:45 +00:00
nvim: many changes
This commit is contained in:
parent
f571b53d32
commit
7f9cb6e767
7 changed files with 63 additions and 10 deletions
|
|
@ -52,7 +52,6 @@ end
|
||||||
-- vim.opt.spelllang = "en_us"
|
-- vim.opt.spelllang = "en_us"
|
||||||
--
|
--
|
||||||
|
|
||||||
-- For init.lua
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = "markdown",
|
pattern = "markdown",
|
||||||
callback = function()
|
callback = function()
|
||||||
|
|
@ -90,3 +89,6 @@ vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
osc52.copy("*")(contents)
|
osc52.copy("*")(contents)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Enable experimental UI in neovim-nightly
|
||||||
|
require('vim._extui').enable({})
|
||||||
|
|
|
||||||
10
vim/.config/nvim/lsp/astro.lua
Normal file
10
vim/.config/nvim/lsp/astro.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
return {
|
||||||
|
cmd = { 'astro-ls', '--stdio' },
|
||||||
|
filetypes = { 'astro' },
|
||||||
|
root_markers = { 'package.json', 'tsconfig.json', 'jsconfig.json', '.git' },
|
||||||
|
init_options = {
|
||||||
|
typescript = {
|
||||||
|
tsdk = "./node_modules/typescript/lib"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
23
vim/.config/nvim/lsp/cspell-ls.lua
Normal file
23
vim/.config/nvim/lsp/cspell-ls.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
---@brief
|
||||||
|
---
|
||||||
|
--- [cspell language server](https://github.com/vlabo/cspell-lsp)
|
||||||
|
---
|
||||||
|
return {
|
||||||
|
cmd = { 'cspell-lsp', '--stdio' },
|
||||||
|
filetypes = {"go", "rust", "js", "ts", "html", "css", "json", "yaml", "markdown", "gitcommit", "typst", "lua", "htmlua"},
|
||||||
|
root_markers = {
|
||||||
|
'.git',
|
||||||
|
'cspell.json',
|
||||||
|
'.cspell.json',
|
||||||
|
'cspell.json',
|
||||||
|
'.cSpell.json',
|
||||||
|
'cSpell.json',
|
||||||
|
'cspell.config.js',
|
||||||
|
'cspell.config.cjs',
|
||||||
|
'cspell.config.json',
|
||||||
|
'cspell.config.yaml',
|
||||||
|
'cspell.config.yml',
|
||||||
|
'cspell.yaml',
|
||||||
|
'cspell.yml',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
@ -54,13 +54,9 @@ vim.lsp.enable("gopls")
|
||||||
|
|
||||||
vim.lsp.enable("tinymist")
|
vim.lsp.enable("tinymist")
|
||||||
|
|
||||||
|
vim.lsp.enable("cspell-ls")
|
||||||
|
|
||||||
vim.lsp.config('textlsp', {
|
vim.lsp.enable("astro")
|
||||||
on_attach = function()
|
|
||||||
print('textlsp is now active in this file')
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
vim.lsp.enable("textlsp")
|
|
||||||
|
|
||||||
-- https://lsp-zero.netlify.app/blog/lsp-client-features.html
|
-- https://lsp-zero.netlify.app/blog/lsp-client-features.html
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,31 @@ return require('packer').startup(function(use)
|
||||||
|
|
||||||
-- use "folke/which-key.nvim"
|
-- use "folke/which-key.nvim"
|
||||||
|
|
||||||
|
use({
|
||||||
|
"andrewferrier/wrapping.nvim",
|
||||||
|
config = function()
|
||||||
|
require("wrapping").setup()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
use({
|
||||||
|
"iamcco/markdown-preview.nvim",
|
||||||
|
run = function() vim.fn["mkdp#util#install"]() end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
use {
|
||||||
|
'preservim/vim-pencil',
|
||||||
|
config = function()
|
||||||
|
vim.cmd([[
|
||||||
|
augroup PencilSetup
|
||||||
|
autocmd!
|
||||||
|
autocmd FileType markdown,text,tex,gitcommit setlocal formatoptions+=t
|
||||||
|
autocmd FileType markdown,text,tex,gitcommit PencilHard
|
||||||
|
augroup END augroup END
|
||||||
|
]])
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
------------------------
|
------------------------
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
WIP
|
|
||||||
Hardcoded
|
|
||||||
HTMLua
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue