-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Rewrite and synthetis the installation doc #6622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Pierre-Sassoulas
merged 8 commits into
pylint-dev:main
from
Pierre-Sassoulas:rewrite-the-installation-doc
May 16, 2022
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
78c30ea
Remove outdated dev/tarball install instruction
Pierre-Sassoulas 158e048
Move ide integration to the installation section
Pierre-Sassoulas d635cee
[doc] Better more useful links for ide integration
Pierre-Sassoulas bd98cd2
Add header for changelog
Pierre-Sassoulas 7ae4f99
[doc] Use internal link instead of url for run command line
Pierre-Sassoulas 363dd6c
[doc] Link to internal document if they exists
Pierre-Sassoulas 89cd480
[doc] Remove our own visual studio code duplicated from the official doc
Pierre-Sassoulas 1c1de9a
[doc] Remove our own pycharm section
Pierre-Sassoulas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
.. _pylint_in_flymake: | ||
|
||
Using Pylint through Flymake in Emacs | ||
===================================== | ||
|
||
.. warning:: | ||
If you're reading this doc and are actually using flymake please | ||
open a support question at https://github.com/PyCQA/pylint/issues/new/choose | ||
and tell us, we don't have any maintainers for emacs and are thinking about | ||
dropping the support. | ||
|
||
.. TODO 3.0, do we still need to support flymake ? | ||
|
||
To enable Flymake for Python, insert the following into your .emacs: | ||
|
||
.. sourcecode:: common-lisp | ||
|
||
;; Configure Flymake for Python | ||
(when (load "flymake" t) | ||
(defun flymake-pylint-init () | ||
(let* ((temp-file (flymake-init-create-temp-buffer-copy | ||
'flymake-create-temp-inplace)) | ||
(local-file (file-relative-name | ||
temp-file | ||
(file-name-directory buffer-file-name)))) | ||
(list "epylint" (list local-file)))) | ||
(add-to-list 'flymake-allowed-file-name-masks | ||
'("\\.py\\'" flymake-pylint-init))) | ||
|
||
;; Set as a minor mode for Python | ||
(add-hook 'python-mode-hook '(lambda () (flymake-mode))) | ||
|
||
Above stuff is in ``pylint/elisp/pylint-flymake.el``, which should be automatically | ||
installed on Debian systems, in which cases you don't have to put it in your ``.emacs`` file. | ||
|
||
Other things you may find useful to set: | ||
|
||
.. sourcecode:: common-lisp | ||
|
||
;; Configure to wait a bit longer after edits before starting | ||
(setq-default flymake-no-changes-timeout '3) | ||
|
||
;; Keymaps to navigate to the errors | ||
(add-hook 'python-mode-hook '(lambda () (define-key python-mode-map "\C-cn" 'flymake-goto-next-error))) | ||
(add-hook 'python-mode-hook '(lambda () (define-key python-mode-map "\C-cp" 'flymake-goto-prev-error))) | ||
|
||
|
||
Finally, by default Flymake only displays the extra information about the error when you | ||
hover the mouse over the highlighted line. The following will use the minibuffer to display | ||
messages when you the cursor is on the line. | ||
|
||
.. sourcecode:: common-lisp | ||
|
||
;; To avoid having to mouse hover for the error message, these functions make Flymake error messages | ||
;; appear in the minibuffer | ||
(defun show-fly-err-at-point () | ||
"If the cursor is sitting on a Flymake error, display the message in the minibuffer" | ||
(require 'cl) | ||
(interactive) | ||
(let ((line-no (line-number-at-pos))) | ||
(dolist (elem flymake-err-info) | ||
(if (eq (car elem) line-no) | ||
(let ((err (car (second elem)))) | ||
(message "%s" (flymake-ler-text err))))))) | ||
|
||
(add-hook 'post-command-hook 'show-fly-err-at-point) | ||
|
||
|
||
Alternative, if you only wish to pollute the minibuffer after an explicit flymake-goto-* then use | ||
the following instead of a post-command-hook | ||
|
||
.. sourcecode:: common-lisp | ||
|
||
(defadvice flymake-goto-next-error (after display-message activate compile) | ||
"Display the error in the mini-buffer rather than having to mouse over it" | ||
(show-fly-err-at-point)) | ||
|
||
(defadvice flymake-goto-prev-error (after display-message activate compile) | ||
"Display the error in the mini-buffer rather than having to mouse over it" | ||
(show-fly-err-at-point)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
########################### | ||
Editor and IDE integration | ||
########################### | ||
Pylint can be integrated in various editors and IDE's. Below you can find tutorials for some of the most common ones. | ||
|
||
Pierre-Sassoulas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:titlesonly: | ||
|
||
flymake-emacs.rst | ||
textmate.rst |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a warning here.