Compare commits

..

5 Commits

Author SHA1 Message Date
biscuit 6da85f36a9 upd 2025-05-21 17:34:04 -05:00
biscuit a03e484ca6 added MarkdownPreview 2025-05-21 17:24:33 -05:00
biscuit 30449ae49c minor ts_ls fix 2025-05-19 17:01:40 -05:00
biscuit 477caaefbb added ts_ls and nix 2025-05-19 16:59:44 -05:00
hakase 5fc3341ac4 update 2025-05-13 11:24:30 -05:00
5 changed files with 96 additions and 7 deletions
+3 -2
View File
@@ -1,8 +1,9 @@
local options = { local options = {
formatters_by_ft = { formatters_by_ft = {
lua = { "stylua" }, lua = { "stylua" },
-- css = { "prettier" }, css = { "prettier" },
-- html = { "prettier" }, html = { "prettier" },
nix = { "alejandra" },
}, },
-- format_on_save = { -- format_on_save = {
+70 -3
View File
@@ -1,4 +1,71 @@
require("nvchad.configs.lspconfig").defaults() local nvlsp = require "nvchad.configs.lspconfig"
local lspconfig = require "lspconfig"
local servers = { "html", "cssls" } nvlsp.defaults() -- loads nvchad's defaults
vim.lsp.enable(servers)
local servers = { "html", "cssls", "clangd" }
-- lsps with default config
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = nvlsp.on_attach,
on_init = nvlsp.on_init,
capabilities = nvlsp.capabilities,
}
end
lspconfig.basedpyright.setup {
on_attach = nvlsp.on_attach,
-- on_init = nvlsp.on_init,
capabilities = nvlsp.capabilities,
settings = {
pyright = {
disableOrganizeImports = true,
},
python = {
analysis = {
ignore = { '*' }
},
},
},
}
lspconfig.ruff.setup {
on_attach = nvlsp.on_attach,
-- on_init = nvlsp.on_init,
capabilities = nvlsp.capabilities,
settings = {
}
}
lspconfig.rust_analyzer.setup {
on_attach = nvlsp.on_attach,
-- on_init = nvlsp.on_init,
capabilities = nvlsp.capabilities,
settings = {
}
}
lspconfig.bashls.setup {
on_attach = nvlsp.on_attach,
-- on_init = nvlsp.on_init,
capabilities = nvlsp.capabilities,
settings = {
}
}
lspconfig.ts_ls.setup {
on_attach = nvlsp.on_attach,
-- on_init = nvlsp.on_init,
capabilities = nvlsp.capabilities,
settings = {
}
}
lspconfig.rnix.setup {
on_attach = nvlsp.on_attach,
capabilities = nvlsp.capabilities,
settings = {
}
}
+6
View File
@@ -8,3 +8,9 @@ map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>") map("i", "jk", "<ESC>")
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>") -- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
-- custom
map("n", "<leader>ss", ":lua vim.diagnostic.open_float(nil,{focus=false}) <cr>")
map("n", "<leader>sd", ":lua vim.diagnostic.setqflist() <cr>")
-- vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
+4
View File
@@ -2,5 +2,9 @@ require "nvchad.options"
-- add yours here! -- add yours here!
-- Show line diagnostics automatically in hover window
-- vim.o.updatetime = 250
-- vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
-- local o = vim.o -- local o = vim.o
-- o.cursorlineopt ='both' -- to enable cursorline! -- o.cursorlineopt ='both' -- to enable cursorline!
+13 -2
View File
@@ -21,7 +21,8 @@ return {
opts = { opts = {
ensure_installed = { ensure_installed = {
"vim", "lua", "vimdoc", "vim", "lua", "vimdoc",
"html", "css" "html", "css", "python",
"rust",
}, },
}, },
}, },
@@ -45,5 +46,15 @@ return {
keys = { keys = {
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" } { "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" }
}, },
} },
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
build = "cd app && yarn install",
init = function()
vim.g.mkdp_filetypes = { "markdown" }
end,
ft = { "markdown" },
},
} }