on contrôle la zone
This commit is contained in:
parent
41590ba3dd
commit
0d48265e07
2 changed files with 130 additions and 3 deletions
82
init.lua
82
init.lua
|
|
@ -537,8 +537,83 @@ require('lazy').setup({
|
|||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||
local servers = {
|
||||
typos_lsp = {},
|
||||
clangd = {},
|
||||
gopls = {},
|
||||
clangd = {
|
||||
keys = {
|
||||
{ '<leader>cR', '<cmd>ClangdSwitchSourceHeader<cr>', desc = 'Switch Source/Header (C/C++)' },
|
||||
},
|
||||
root_dir = function(fname)
|
||||
return require('lspconfig.util').root_pattern(
|
||||
'Makefile',
|
||||
'configure.ac',
|
||||
'configure.in',
|
||||
'config.h.in',
|
||||
'meson.build',
|
||||
'meson_options.txt',
|
||||
'build.ninja'
|
||||
)(fname) or require('lspconfig.util').root_pattern('compile_commands.json', 'compile_flags.txt')(fname) or require('lspconfig.util').find_git_ancestor(
|
||||
fname
|
||||
)
|
||||
end,
|
||||
capabilities = {
|
||||
offsetEncoding = { 'utf-16' },
|
||||
},
|
||||
cmd = {
|
||||
'clangd',
|
||||
'--background-index',
|
||||
'--clang-tidy',
|
||||
'--header-insertion=iwyu',
|
||||
'--completion-style=detailed',
|
||||
'--function-arg-placeholders',
|
||||
'--fallback-style=llvm',
|
||||
},
|
||||
init_options = {
|
||||
usePlaceholders = true,
|
||||
completeUnimported = true,
|
||||
clangdFileStatus = true,
|
||||
},
|
||||
},
|
||||
gopls = {
|
||||
keys = {
|
||||
-- Workaround for the lack of a DAP strategy in neotest-go: https://github.com/nvim-neotest/neotest-go/issues/12
|
||||
{ '<leader>td', "<cmd>lua require('dap-go').debug_test()<CR>", desc = 'Debug Nearest (Go)' },
|
||||
},
|
||||
settings = {
|
||||
gopls = {
|
||||
gofumpt = true,
|
||||
codelenses = {
|
||||
gc_details = false,
|
||||
generate = true,
|
||||
regenerate_cgo = true,
|
||||
run_govulncheck = true,
|
||||
test = true,
|
||||
tidy = true,
|
||||
upgrade_dependency = true,
|
||||
vendor = true,
|
||||
},
|
||||
hints = {
|
||||
assignVariableTypes = true,
|
||||
compositeLiteralFields = true,
|
||||
compositeLiteralTypes = true,
|
||||
constantValues = true,
|
||||
functionTypeParameters = true,
|
||||
parameterNames = true,
|
||||
rangeVariableTypes = true,
|
||||
},
|
||||
analyses = {
|
||||
fieldalignment = true,
|
||||
nilness = true,
|
||||
unusedparams = true,
|
||||
unusedwrite = true,
|
||||
useany = true,
|
||||
},
|
||||
usePlaceholders = true,
|
||||
completeUnimported = true,
|
||||
staticcheck = true,
|
||||
directoryFilters = { '-.git', '-.vscode', '-.idea', '-.vscode-test', '-node_modules' },
|
||||
semanticTokens = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
-- pylyzer = {},
|
||||
rust_analyzer = {},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
|
|
@ -723,6 +798,7 @@ require('lazy').setup({
|
|||
end,
|
||||
},
|
||||
|
||||
{ 'catppuccin/nvim', name = 'catppuccin', priority = 1000 },
|
||||
{ -- You can easily change to a different colorscheme.
|
||||
-- Change the name of the colorscheme plugin below, and then
|
||||
-- change the command in the config to whatever the name of that colorscheme is
|
||||
|
|
@ -733,7 +809,7 @@ require('lazy').setup({
|
|||
priority = 1000, -- make sure to load this before all the other start plugins
|
||||
config = function()
|
||||
-- Load the colorscheme here
|
||||
vim.cmd.colorscheme 'tokyonight-moon'
|
||||
vim.cmd.colorscheme 'catppuccin-mocha'
|
||||
|
||||
-- You can configure highlights by doing something like
|
||||
vim.cmd.hi 'Comment gui=none'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue