New Neovim configuration

This commit is contained in:
Fabio Scotto di Santolo
2025-07-29 17:33:21 +02:00
parent ab2cd85cfc
commit 04c9854f5b
13 changed files with 149 additions and 40 deletions

View File

@@ -1,13 +0,0 @@
return {
"nvim-telescope/telescope-file-browser.nvim",
keys = {
{
"<leader>sB",
":Telescope file_browser path=%:p:h=%:p:h<cr>",
desc = "Browser Files",
},
},
config = function()
require("telescope").load_extension("file_browser")
end,
}

View File

@@ -0,0 +1,61 @@
return {
"neovim/nvim-lspconfig",
-- How to add an LSP for a specific programming language?
-- 1. Use `:Mason` to install the corresponding LSP.
-- 2. Add the configuration below. The syntax is `lspconfig.<name>.setup(...)`
-- Hint (find <name> here): https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md
config = function()
-- Set different settings for different languages' LSP.
-- Support List: https://github.com/neovim/nvim-lspconfig/blob/master/doc/configs.md
local lspconfig = require("lspconfig")
-- Case 1. For CMake Users
-- $ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .
-- Case 2. For Bazel Users, use https://github.com/hedronvision/bazel-compile-commands-extractor
-- Case 3. If you don't use any build tool and all files in a project use the same build flags
-- Place your compiler flags in the compile_flags.txt file, located in the root directory
-- of your project. Each line in the file should contain a single compiler flag.
-- src: https://clangd.llvm.org/installation#compile_commandsjson
lspconfig.clangd.setup({})
lspconfig.gopls.setup({})
lspconfig.bashls.setup({})
lspconfig.zls.setup({})
-- src: https://docs.astral.sh/ruff/editors/setup/#neovim
lspconfig.ruff.setup({})
lspconfig.pylsp.setup({
settings = {
-- configure plugins in pylsp
pylsp = {
plugins = {
pyflakes = { enabled = false },
pylint = { enabled = false },
pycodestyle = { enabled = false },
},
},
},
})
lspconfig.lua_ls.setup({
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim).
version = "LuaJIT",
},
diagnostics = {
-- Get the language server to recognize the `vim` global.
globals = { "vim" },
},
workspace = {
-- Make the server aware of Neovim runtime files.
library = vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier.
telemetry = {
enable = false,
},
},
},
})
end,
}

View File

@@ -0,0 +1,10 @@
return {
"mason-org/mason-lspconfig.nvim",
dependencies = {
"mason-org/mason.nvim",
"neovim/nvim-lspconfig",
},
opts = {
ensure_installed = { "pylsp", "lua_ls", "bash-language-server", "gopls", "clangd", "zls" },
},
}

View File

@@ -0,0 +1,12 @@
return {
"mason-org/mason.nvim",
opts = {
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = "",
},
},
},
}

View File

@@ -0,0 +1,5 @@
return {
"nvim-telescope/telescope.nvim",
tag = "0.1.8",
dependencies = { "nvim-lua/plenary.nvim" },
}