Add csharp and show hidden files in neotree

This commit is contained in:
Pablu23
2024-07-08 22:44:04 +02:00
parent 4bd04df779
commit 15585a2f55
3 changed files with 43 additions and 21 deletions

View File

@@ -22,6 +22,7 @@ return {
"pyright", "pyright",
"ols", "ols",
"clangd", "clangd",
"omnisharp",
}, },
handlers = { handlers = {
function(server_name) function(server_name)
@@ -29,6 +30,16 @@ return {
capabilities = capabilities, capabilities = capabilities,
handlers = handlers handlers = handlers
} }
end,
clangd = function()
local lspconfig = require("lspconfig")
lspconfig.clangd.setup({
capabilities = capabilities,
handlers = handlers,
init_options = {
fallbackFlags = { '--std=c++20' }
},
})
end end
} }
}) })

View File

@@ -1,22 +1,33 @@
return { return {
"nvim-neo-tree/neo-tree.nvim", "nvim-neo-tree/neo-tree.nvim",
branch = "v3.x", branch = "v3.x",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim", "MunifTanjim/nui.nvim",
}, },
config = function() config = function()
require("neo-tree").setup({ require("neo-tree").setup({
event_handlers = { event_handlers = {
{ {
event = "file_opened", event = "file_opened",
handler = function(file_path) handler = function(file_path)
require("neo-tree.command").execute({ action = "close" }) require("neo-tree.command").execute({ action = "close" })
end, end,
}, },
}, },
}) filesystem = {
vim.keymap.set("n", "<C-n>", ":Neotree filesystem reveal right toggle<CR>", {}) filtered_items = {
end, visible = false,
show_hidden_count = true,
hide_dotfiles = false,
hide_gitignored = false,
hide_by_name = {
'.git',
},
},
},
})
vim.keymap.set("n", "<C-n>", ":Neotree filesystem reveal right toggle<CR>", {})
end,
} }

View File

@@ -4,7 +4,7 @@ return {
config = function() config = function()
local config = require("nvim-treesitter.configs") local config = require("nvim-treesitter.configs")
config.setup({ config.setup({
ensure_installed = { "lua", "go", "zig", "markdown", "json", "yaml", "javascript", "typescript", "bash", "python" }, ensure_installed = { "lua", "go", "zig", "markdown", "json", "yaml", "javascript", "typescript", "bash", "python", "c_sharp", "cpp" },
highlight = { enable = true }, highlight = { enable = true },
indent = { enable = true }, indent = { enable = true },
}) })