Compare commits

...

5 Commits

Author SHA1 Message Date
mandlm 4c14041ca7
chore: nix flake update 2023-04-11 07:57:42 +02:00
mandlm 4d5b1c1630
feat: add vim-surround 2023-04-11 07:57:42 +02:00
mandlm 94e81693d9
style: auto-format 2023-04-11 07:57:42 +02:00
mandlm d443c729a9
feat: add json language server 2023-04-11 07:57:42 +02:00
mandlm 4b7e56c757
feat: replace sumneko with lua-language-server 2023-04-11 07:39:46 +02:00
3 changed files with 24 additions and 19 deletions

View File

@ -8,11 +8,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1677757546, "lastModified": 1681092193,
"narHash": "sha256-tA1ukoluctzLVyWRaKtD4KlTwgXbUsGB5vcyni1OJ9I=", "narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "86bb69b0b1e10d99a30c4352f230f03106dd0f8a", "rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -24,11 +24,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1677779205, "lastModified": 1681091990,
"narHash": "sha256-6DBjL9wjq86p2GczmwnHtFRnWPBPItc67gapWENBgX8=", "narHash": "sha256-ifIzhksUBZKp5WgCuoVhDY32qaEplXp7khzrB6zkaFc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "96e18717904dfedcd884541e5a92bf9ff632cf39", "rev": "ea96b4af6148114421fda90df33cf236ff5ecf1d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -40,11 +40,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1678654296, "lastModified": 1681036984,
"narHash": "sha256-aVfw3ThpY7vkUeF1rFy10NAkpKDS2imj3IakrzT0Occ=", "narHash": "sha256-AbScJXshYzbeUKHh+Y3OICc3iAtr+NqJ3Xb81GW+ptU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5a1dc8acd977ff3dccd1328b7c4a6995429a656b", "rev": "fd531dee22c9a3d4336cc2da39e8dd905e8f3de4",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -49,7 +49,7 @@ in
xclip xclip
# language servers # language servers
sumneko-lua-language-server lua-language-server
rnix-lsp rnix-lsp
terraform-ls terraform-ls
tflint tflint
@ -62,7 +62,7 @@ in
nodePackages.typescript-language-server nodePackages.typescript-language-server
nodePackages.typescript nodePackages.typescript
nodePackages.dockerfile-language-server-nodejs nodePackages.dockerfile-language-server-nodejs
nodePackages.vscode-html-languageserver-bin nodePackages.vscode-langservers-extracted
lldb lldb
vscode-extensions.vadimcn.vscode-lldb vscode-extensions.vadimcn.vscode-lldb
]; ];
@ -105,6 +105,7 @@ in
vim-illuminate vim-illuminate
registers-nvim registers-nvim
pre-commit-nvim pre-commit-nvim
vim-surround
# git # git
gitsigns-nvim gitsigns-nvim

View File

@ -6,9 +6,13 @@ local on_attach = function(client, bufnr)
end end
local function format_buffer() local function format_buffer()
vim.lsp.buf.format({ timeout_ms = 3000, async = false, filter = function(formatter) vim.lsp.buf.format({
timeout_ms = 3000,
async = false,
filter = function(formatter)
return formatter.name ~= "tsserver" and formatter.name ~= "volar" return formatter.name ~= "tsserver" and formatter.name ~= "volar"
end }) end
})
end end
local telescope = require("telescope.builtin") local telescope = require("telescope.builtin")
@ -50,10 +54,10 @@ lsp_status.register_progress()
-- setup lua language server for init.nvim and nvim plugin development -- setup lua language server for init.nvim and nvim plugin development
require("neodev").setup({ require("neodev").setup({
override = function(root_dir, library) override = function(root_dir, options)
if require("neodev.util").has_file(root_dir, "/etc/nixos") then if require("neodev.util").has_file(root_dir, "/etc/nixos") then
library.enabled = true options.enabled = true
library.plugins = true options.plugins = true
end end
end, end,
}) })
@ -63,6 +67,8 @@ local capabilities = require("cmp_nvim_lsp").default_capabilities(lsp_status.cap
local servers = { local servers = {
["bashls"] = {}, ["bashls"] = {},
["dockerls"] = {}, ["dockerls"] = {},
["jsonls"] = {},
["lua_ls"] = {},
["pylsp"] = { ["pylsp"] = {
pylsp = { pylsp = {
plugins = { plugins = {
@ -74,7 +80,6 @@ local servers = {
}, },
["pyright"] = {}, ["pyright"] = {},
["rnix"] = {}, ["rnix"] = {},
["sumneko_lua"] = {},
["terraformls"] = {}, ["terraformls"] = {},
["tflint"] = {}, ["tflint"] = {},
["tsserver"] = {}, ["tsserver"] = {},
@ -130,7 +135,6 @@ null_ls.setup({
null_ls.builtins.diagnostics.eslint_d, null_ls.builtins.diagnostics.eslint_d,
null_ls.builtins.diagnostics.tsc, null_ls.builtins.diagnostics.tsc,
}, },
on_attach = on_attach, on_attach = on_attach,
}) })