personal changes

This commit is contained in:
Sakamoto Hiroshi
2024-06-22 13:10:22 -05:00
parent aad624221a
commit 70167bf1c8
6 changed files with 138 additions and 31 deletions
+3 -2
View File
@@ -1,8 +1,9 @@
local options = {
formatters_by_ft = {
lua = { "stylua" },
-- css = { "prettier" },
-- html = { "prettier" },
python = { "black" },
css = { "prettier" },
html = { "prettier" },
},
-- format_on_save = {
+29
View File
@@ -21,3 +21,32 @@ lspconfig.tsserver.setup {
on_init = on_init,
capabilities = capabilities,
}
-- python
lspconfig.basedpyright.setup{
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
filetypes = { "python" },
settings = {
basedpyright = {
typeCheckingMode = "standard",
}
}
}
---- ruff_lsp and pyright compatibility
local on_attach = function(client, bufnr)
if client.name == 'ruff_lsp' then
-- hover in favor of Pyright
client.server_capabilities.hoverProvider = false
end
end
lspconfig.ruff_lsp.setup{
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
}
+3
View File
@@ -6,5 +6,8 @@ local map = vim.keymap.set
map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>")
map("n", "<leader>gh", ":Neogit <cr>")
map("n", "<leader>gm", ":Gitmoji <cr>")
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
+2 -1
View File
@@ -1,6 +1,7 @@
require "nvchad.options"
-- add yours here!
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
-- local o = vim.o
-- o.cursorlineopt ='both' -- to enable cursorline!
+73 -28
View File
@@ -7,32 +7,77 @@ return {
end,
},
-- These are some examples, uncomment them if you want to see them work!
-- {
-- "neovim/nvim-lspconfig",
-- config = function()
-- require("nvchad.configs.lspconfig").defaults()
-- require "configs.lspconfig"
-- end,
-- },
--
-- {
-- "williamboman/mason.nvim",
-- opts = {
-- ensure_installed = {
-- "lua-language-server", "stylua",
-- "html-lsp", "css-lsp" , "prettier"
-- },
-- },
-- },
--
-- {
-- "nvim-treesitter/nvim-treesitter",
-- opts = {
-- ensure_installed = {
-- "vim", "lua", "vimdoc",
-- "html", "css"
-- },
-- },
-- },
{
"neovim/nvim-lspconfig",
config = function()
require("nvchad.configs.lspconfig").defaults()
require "configs.lspconfig"
end,
},
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"lua-language-server",
"stylua",
"html-lsp",
"css-lsp",
"prettier",
"basedpyright",
"mypy",
"black",
"ruff-lsp",
},
},
},
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"vim",
"lua",
"vimdoc",
"html",
"css",
"python",
},
},
},
{
"NeogitOrg/neogit",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
config = true,
},
{
"kylechui/nvim-surround",
version = "*", -- Use for stability; omit to use `main` branch for the latest features
event = "VeryLazy",
config = function()
require("nvim-surround").setup {
-- Configuration here, or leave empty to use defaults
}
end,
},
{
"Dynge/gitmoji.nvim",
dependencies = {
"hrsh7th/nvim-cmp",
},
opts = {
filetypes = { "gitcommit" },
completion = {
append_space = false,
complete_as = "emoji",
},
},
ft = "gitcommit",
},
}