Dump nixos config after scrubing
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
require'lspconfig'.arduino_language_server.setup {
|
||||
cmd = {
|
||||
"arduino-language-server",
|
||||
"-cli-config", "/Users/aym/Library/Arduino15/arduino-cli.yaml",
|
||||
"-fqbn", "adafruit:nrf52:feather52841",
|
||||
"-cli", "arduino-cli",
|
||||
"-clangd", "clangd"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
local elixir_ls_binary = "/Users/" .. USER .. "/.config/nvim/lang-srvrs/elixir-ls/language_server.sh"
|
||||
|
||||
require'lspconfig'.elixirls.setup{
|
||||
cmd = { elixir_ls_binary };
|
||||
}
|
||||
|
||||
vim.api.nvim_command('autocmd BufWritePost *.ex :lua vim.lsp.buf.formatting()')
|
||||
vim.api.nvim_command('autocmd BufWritePost *.exs :lua vim.lsp.buf.formatting()')
|
||||
@@ -0,0 +1,3 @@
|
||||
require("flutter-tools").setup{
|
||||
} -- use defaults
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
local lspconfig = require "lspconfig"
|
||||
-- local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
lspconfig.gopls.setup {
|
||||
on_attach = function(client, bufnr)
|
||||
require "lsp_signature".on_attach({
|
||||
bind = true,
|
||||
-- floating_window = true,
|
||||
--hint_enable = true,
|
||||
fix_pos = true,
|
||||
use_lspsaga = true,
|
||||
handler_opts = {
|
||||
border = "rounded" -- double, single, shadow, none
|
||||
},
|
||||
})
|
||||
end,
|
||||
cmd = {"gopls", "serve"},
|
||||
settings = {
|
||||
autostart = true,
|
||||
gopls = {
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
},
|
||||
staticcheck = true,
|
||||
},
|
||||
},
|
||||
autostart = true,
|
||||
root_dir = lspconfig.util.root_pattern(".git","go.mod"),
|
||||
init_options = {usePlaceholders = true, completeUnimported = true},
|
||||
-- capabilities = capabilities,
|
||||
single_file_support = true;
|
||||
}
|
||||
|
||||
|
||||
------ Configre vim-go
|
||||
-- Disable autocomplete since we already have it with native lsp.
|
||||
vim.g.go_code_completion_enabled = 0
|
||||
-- Disable gopls for the same reasons as above.
|
||||
vim.g.go_gopls_enabled = 0
|
||||
|
||||
-- Simplify code when formatting.
|
||||
vim.g.go_fmt_command = 'gofmt'
|
||||
vim.g.go_fmt_options = {
|
||||
gofmt = '-s',
|
||||
}
|
||||
|
||||
vim.g.go_imports_mode = 'goimports'
|
||||
|
||||
-- Could confilg with lsp saga, should experiment.
|
||||
vim.g.go_doc_keywordprg_enabled = 0
|
||||
|
||||
-- Use my own universal mappings for lsp.
|
||||
vim.g.go_def_mapping_enabled = 0
|
||||
|
||||
-- Use globally installed binaries first. (gopls) installed through brew.
|
||||
vim.g.go_search_bin_path_first = 0
|
||||
|
||||
-- When auto-creating a template file, use the package rather than a file.
|
||||
vim.g.go_template_use_pkg = 1
|
||||
|
||||
-- Configure folding.
|
||||
-- vim.cmd("autocmd FileType go setlocal foldmethod=syntax")
|
||||
-- vim.g.go_fmt_experimental = 1
|
||||
|
||||
-- Use a ruler for go files.
|
||||
vim.cmd("autocmd FileType go setlocal colorcolumn=80")
|
||||
-- Automatically add comment symbol on next line and wrap it.
|
||||
vim.cmd("autocmd FileType go setlocal fo+=c fo+=r")
|
||||
|
||||
-- Highlights.
|
||||
vim.g.go_highlight_operators = 1
|
||||
vim.g.go_highlight_types = 1
|
||||
vim.g.go_highlight_extra_types = 1
|
||||
vim.g.go_highlight_functions = 1
|
||||
vim.g.go_highlight_function_calls = 1
|
||||
@@ -0,0 +1,35 @@
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
require'lspconfig'.lua_ls.setup {
|
||||
on_init = function(client)
|
||||
if client.workspace_folders then
|
||||
local path = client.workspace_folders[1].name
|
||||
if vim.uv.fs_stat(path..'/.luarc.json') or vim.uv.fs_stat(path..'/.luarc.jsonc') then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using
|
||||
-- (most likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT'
|
||||
},
|
||||
-- Make the server aware of Neovim runtime files
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME
|
||||
-- Depending on the usage, you might want to add additional paths here.
|
||||
-- "${3rd}/luv/library"
|
||||
-- "${3rd}/busted/library",
|
||||
}
|
||||
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower and will cause issues when working on your own configuration (see https://github.com/neovim/nvim-lspconfig/issues/3189)
|
||||
-- library = vim.api.nvim_get_runtime_file("", true)
|
||||
}
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
Lua = {}
|
||||
},
|
||||
capabilities = capabilities,
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
require("lsp-format").setup{}
|
||||
require'lspconfig'.ocamllsp.setup{
|
||||
on_attach = require("lsp-format").on_attach
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
-- require'lspconfig'.pyright.setup{}
|
||||
|
||||
-- Autoformat on save.
|
||||
-- vim.cmd("autocmd BufWritePre *.py execute ':Black'")
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
require'lspconfig'.roc_ls.setup{
|
||||
offset_encoding = "utf-8",
|
||||
}
|
||||
|
||||
-- Should get rid of this once semantic highlighting gets better!
|
||||
vim.api.nvim_create_autocmd('LspAttach', {
|
||||
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
|
||||
callback = function(ev)
|
||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||
client.server_capabilities.semanticTokensProvider = nil
|
||||
end,
|
||||
})
|
||||
@@ -0,0 +1,7 @@
|
||||
local lspconfig = require "lspconfig"
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
lspconfig.millet.setup{
|
||||
cmd = { "millet-ls" },
|
||||
capabilities = capabilities,
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
require'lspconfig'.ts_ls.setup{
|
||||
filetypes = { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" },
|
||||
root_dir = require('lspconfig/util').root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git")
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
require'lspconfig'.zls.setup{}
|
||||
Reference in New Issue
Block a user