Personal Nix setup
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add flow language server

+16 -1
+1 -1
modules/nvim/default.nix
··· 12 12 cssls = '${pkgs.vscode-langservers-extracted}/bin/vscode-css-language-server', 13 13 htmlls = '${pkgs.vscode-langservers-extracted}/bin/vscode-html-language-server', 14 14 jsonls = '${pkgs.vscode-langservers-extracted}/bin/vscode-json-language-server', 15 - 15 + npx = '${pkgs.nodejs-18_x}/bin/npx', 16 16 ripgrep = '${pkgs.ripgrep}/bin/rg', 17 17 astrols = '${pkgs.nodePackages."@astrojs/language-server"}/bin/astro-ls', 18 18 rustanalyzer = '${pkgs.rust-analyzer}/bin/rust-analyzer',
+15
modules/nvim/init.lua
··· 302 302 303 303 -- lspconfig 304 304 local lsp = require('lspconfig') 305 + local lsp_util = require('lspconfig.util') 305 306 306 307 local function lsp_on_attach(client, buf) 307 308 if client.config.flags then ··· 384 385 lsp_setup('tsserver', { 385 386 cmd = { nix_bins.tsserver, "--stdio" }, 386 387 flags = { debounce_text_changes = 200 }, 388 + single_file_support = false, 387 389 settings = { 388 390 disableAutomaticTypingAcquisition = true, 389 391 preferences = { 390 392 importModuleSpecifierPreference = 'project-relative', 391 393 }, 392 394 }, 395 + root_dir = function(fname) 396 + if lsp_util.root_pattern('.flowconfig')(fname) ~= nil then 397 + return nil 398 + else 399 + return lsp_util.root_pattern('tsconfig.json', 'package.json', 'jsconfig.json', '.git')(fname) 400 + end 401 + end, 402 + }) 403 + 404 + lsp_setup('flow', { 405 + cmd = { nix_bins.npx, "--no-install", "flow", "lsp" }, 406 + flags = { debounce_text_changes = 200 }, 407 + single_file_support = false, 393 408 }) 394 409 395 410 lsp_setup('eslint', {