Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fusillicode committed Nov 29, 2023
1 parent 39fa7e5 commit 28a1eb9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 31 deletions.
56 changes: 30 additions & 26 deletions nvim/lua/mason-tools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,44 @@ return {
helm_ls = {},
jsonls = {},
lua_ls = {
Lua = {
completion = {
callSnippet = 'Both',
callKeyword = 'Both',
},
format = {
defaultConfig = {
quote_style = 'single',
trailing_table_separator = 'always',
insert_final_newline = 'true',
settings = {
Lua = {
completion = {
callSnippet = 'Both',
callKeyword = 'Both',
},
format = {
defaultConfig = {
quote_style = 'single',
trailing_table_separator = 'always',
insert_final_newline = 'true',
},
},
hint = { enable = true, setType = true, },
diagnostics = { globals = { 'vim', }, },
telemetry = { enable = false, },
workspace = { checkThirdParty = false, },
},
hint = { enable = true, setType = true, },
diagnostics = { globals = { 'vim', }, },
telemetry = { enable = false, },
workspace = { checkThirdParty = false, },
},
},
marksman = {},
ruff_lsp = {},
rust_analyzer = {
['rust-analyzer'] = {
cargo = {
build_script = { enable = true, },
extraArgs = { '--profile', 'rust-analyzer', },
extraEnv = { CARGO_PROFILE_RUST_ANALYZER_INHERITS = 'dev', },
settings = {
['rust-analyzer'] = {
cargo = {
build_script = { enable = true, },
extraArgs = { '--profile', 'rust-analyzer', },
extraEnv = { CARGO_PROFILE_RUST_ANALYZER_INHERITS = 'dev', },
},
check = { command = 'clippy', },
checkOnSave = { command = 'clippy', },
completion = { autoimport = { enable = true, }, },
imports = { enforce = true, granularity = { group = 'item', }, prefix = 'crate', },
lens = { debug = { enable = false, }, implementations = { enable = false, }, run = { enable = false, }, },
proc_macro = { enable = true, },
showUnlinkedFileNotification = false,
},
check = { command = 'clippy', },
checkOnSave = { command = 'clippy', },
completion = { autoimport = { enable = true, }, },
imports = { enforce = true, granularity = { group = 'item', }, prefix = 'crate', },
lens = { debug = { enable = false, }, implementations = { enable = false, }, run = { enable = false, }, },
proc_macro = { enable = true, },
showUnlinkedFileNotification = false,
},
},
sqlls = {},
Expand Down
8 changes: 3 additions & 5 deletions nvim/lua/plugins/nvim-lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ return {
vim.keymap.set('n', '<leader>a', vim.lsp.buf.code_action, { buffer = bufnr, })
end

for lsp, settings in pairs(require('../mason-tools')['lsps']) do
if lsp == 'typos_lsp' then
print(vim.inspect(settings))
end
for lsp, config in pairs(require('../mason-tools')['lsps']) do
lspconfig[lsp].setup({
capabilities = capabilities,
on_attach = on_attach,
settings = settings,
settings = config['settings'] or {},
init_options = config['init_options'] or {},
})
end

Expand Down

0 comments on commit 28a1eb9

Please sign in to comment.